openapi: 3.2.0 info: title: Karbonhq Users API version: v3 contact: name: API Support url: https://developers.karbonhq.com/issues/ license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://karbonhq.com/terms-of-use/ description: 'Operations tagged Users across 2 of this provider''s published API definitions: KarbonAPI.json, karbonhq-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.karbonhq.com description: The production API server security: - ApiKeyAuth: [] BearerAuth: [] tags: - name: Users description: Create and view the basics & defaults for colleagues, teams and job roles to customize Karbon to represent the way you and your team work. Read more paths: /v3/Roles: get: tags: - Users summary: Gets a list of Roles description: Returns the active, non-default Roles configured for your tenant, sorted by `Name` ascending. Returns a maximum of 200 Roles per page. operationId: getAllRoles parameters: - in: query name: $filter schema: type: string examples: name: value: Name eq 'Manager' summary: Return only the Role whose Name matches 'Manager'. description: When this parameter is combined with the URI, this endpoint will return a subset of the Roles that satisfy the `$filter` expression. Only `Name` with the `eq` operator is supported. - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetRoles' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/Teams: get: tags: - Users summary: Gets a list of Teams operationId: getAllTeams parameters: - in: query name: $filter schema: type: string examples: name: value: Name eq 'Audit' summary: Return only the Team whose Name matches 'Audit'. description: When this parameter is combined with the URI, this endpoint will return a subset of the Teams that satisfy the `$filter` expression. Only `Name` with the `eq` operator is supported. - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/GetTeams' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/Teams/{TeamKey}: get: tags: - Users summary: Gets a single Team, including its members operationId: getTeamByKey parameters: - in: path name: TeamKey required: true schema: type: string description: The key of the Team to retrieve. responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/TeamProfile' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/Teams/{TeamKey}/AddMembers: post: tags: - Users summary: Adds one or more members to a Team description: 'Adds one or more existing, active users to a Team. Users who are already members are skipped, so this endpoint is safe to call again with the same `UserKeys`. Only individual users can be added. A Team can contain another Team as a sub-team, but adding a sub-team is not supported here — that can only be done in the Karbon app. This is invoked as a bound OData action; despite the URL shape, it is always a `POST`.' operationId: addTeamMembers parameters: - in: path name: TeamKey required: true schema: type: string example: 2Nw8tnxwQCVf description: The key of the Team to add members to. requestBody: description: The user profile keys to add as members of the Team. required: true content: application/json: schema: $ref: '#/components/schemas/AddTeamMembers' responses: '204': description: No Content '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Inactive Or Unknown User: value: error: code: '4002' message: Cannot find an active user for 3VQ8Qrq944NW Empty UserKeys: value: error: code: '4002' message: '''User Keys'' must not be empty.' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/Teams/{TeamKey}/RemoveMember: post: tags: - Users summary: Removes a member from a Team description: 'Removes a single user from a Team. Returns `204 No Content` whether or not the user was a member, so this endpoint is safe to retry. Only individual users can be removed this way. Removing a sub-team from a Team is not supported here — that can only be done in the Karbon app. This is invoked as a bound OData action; despite the URL shape, it is always a `POST`.' operationId: removeTeamMember parameters: - in: path name: TeamKey required: true schema: type: string example: 2Nw8tnxwQCVf description: The key of the Team to remove a member from. requestBody: description: The user profile key to remove from the Team. required: true content: application/json: schema: $ref: '#/components/schemas/RemoveTeamMember' responses: '204': description: No Content '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server /v3/Users: get: tags: - Users summary: Gets a list of Users parameters: - in: query name: $filter schema: type: string examples: Name: value: Name eq 'John Smith' summary: Return the Users with the name 'John Smith' EmailAddress: value: EmailAddress eq 'joe@samplecompany.com' summary: Return the Users with the Email Eddress 'joe@samplecompany.com' description: 'When this parameter is combined with the URI, this endpoint will return a subset of the Users that satisfy the `$filter` expression. ' - $ref: '#/components/parameters/SkipRecords' - $ref: '#/components/parameters/TopRecords' description: 'Use the `GET` method on this endpoint to receive a paginated list of Users from your tenant. Using the query parameters available to this endpoint, you can also filter the list of Users by their Name, and EmailAddress. **Notes** * This endpoint returns a maximum of 100 Users at once. * If the query results in more than 100 Users, a link to the next set of the results will be given in the `@odata.nextLink` field of the response. * The `$filter` query parameter supports 3 logical operators (`eq`, `contains`, and `and`), and 2 properties to help you form an expression. They are listed below with examples of usage. Logical Operators Purpose Name EmailAddress eq Full-text search /v3/Users?$filter=Name eq ''Joe Min'' /v3/Users?$filter=EmailAddress eq ''joe@samplecompany.com'' contains Partial-text search /v3/Users?$filter=(contains(Name, ''Min'')) /v3/Users?$filter=(contains(EmailAddress, ''joe'')) and Combines properties /v3/Users?$filter=Name eq ''Joe Min'' and contains(EmailAddress, ''joe'')' operationId: getAllUsers responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetUsers' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Unsupported Logical Operator: $ref: '#/components/examples/Unsupported_Logical_Operator' $top limit exceeded: $ref: '#/components/examples/Limit_Exceeded_Top' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' post: tags: - Users summary: Creates a new User description: Use the `POST` method on this endpoint to create a new User in your tenant. operationId: createUser responses: '200': description: Successful operation content: application/json: schema: allOf: - type: object properties: '@odata.context': type: string description: The information about Karbon controllers generating this response. example: https://api.karbonhq.com/v3/$metadata#Users/$entity - $ref: '#/components/schemas/GetSingleUser' headers: Location: description: The endpoint URL to the newly created User. schema: type: string example: https://api.karbonhq.com/v3/Users('4LR9qmR5NQ6T') '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Incorrect or Missing Data: $ref: '#/components/examples/Missing_Create_Data' Unsupported Option: $ref: '#/components/examples/Unsupported_option' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Name or Email Is Empty: $ref: '#/components/examples/Name_or_Email_Is_Empty' Undefined Error: $ref: '#/components/examples/elongated_5001' requestBody: description: Refer to the table below for more information on each field in the request body. required: true content: application/json: schema: type: object required: - Name - EmailAddress properties: Name: type: string description: The name of the User example: Joe Min EmailAddress: type: string description: The email address of the User example: joe@samplecompany.com servers: - url: https://api.karbonhq.com description: The production API server /v3/Users/{UserId}: get: tags: - Users summary: Gets the details of a single User parameters: - required: true in: path name: UserId schema: type: string example: 2bYxtn94ZSdY description: The unique ID of the User to get description: Use the `GET` method on this endpoint to receive the details of a single User from your tenant. operationId: getUserById responses: '200': description: Successful operation content: application/json: schema: $ref: '#/components/schemas/GetUserById' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ResourceNotFound' examples: Unauthorized Access: $ref: '#/components/examples/UnauthorizedAccess' '429': description: Rate Limit Exceeded content: application/json: schema: $ref: '#/components/schemas/RateLimitErrorMessage' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorMessages' examples: Undefined Error: $ref: '#/components/examples/elongated_5001' servers: - url: https://api.karbonhq.com description: The production API server components: examples: Unsupported_option: description: The error returned when the query option in a request is not allowed for by the API value: error: code: '4002' message: Query option '