> For the complete documentation index, see [llms.txt](https://docs.usepylon.com/pylon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usepylon.com/pylon-docs/developer/api/api-reference/users.md).

# Users

## Get a list of users

> Returns all users for the organization.\
> \
> \*\*Rate limit:\*\* 300 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetUsersResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUsersResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetUsersResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/User"},"type":"array"},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"User":{"properties":{"avatar_url":{"description":"The avatar URL of the user.","type":"string"},"email":{"description":"The primary email of the user.","type":"string"},"emails":{"description":"The list of all emails of the user.","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"The ID of the user.","type":"string"},"is_deactivated":{"description":"Whether the user is deactivated.","type":"boolean"},"name":{"description":"The name of the user.","type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/MiniRole"}],"deprecated":true,"description":"Deprecated: Use roles to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","nullable":true},"role_id":{"deprecated":true,"description":"Deprecated: Use role_ids to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","type":"string"},"role_ids":{"description":"All assigned role IDs, sorted by ID. The order does not imply precedence.","items":{"type":"string"},"nullable":true,"type":"array"},"roles":{"description":"All assigned roles, including SCIM-derived roles, sorted by ID. Empty when no roles are assigned.","items":{"$ref":"#/components/schemas/MiniRole"},"nullable":true,"type":"array"},"skills":{"description":"The user's routing skills. Null when the caller lacks permission to read team settings.","items":{"$ref":"#/components/schemas/UserSkill"},"nullable":true,"type":"array"},"status":{"description":"The status of the user. Standard values are `active`, `away`, and `out_of_office`; custom status slugs are also supported. See GET /user-statuses for each status's category.","type":"string"}},"required":["avatar_url","email","id","is_deactivated","name","role_id","status"],"type":"object"},"MiniRole":{"properties":{"id":{"description":"The ID of the role.","type":"string"},"name":{"description":"The name of the role.","type":"string"},"slug":{"description":"The slug of the role.","type":"string"}},"required":["id","name","slug"],"type":"object"},"UserSkill":{"properties":{"attribute":{"description":"The issue custom field ID when attribute_type is `custom_field`, or the issue property, such as `language`, when attribute_type is `default_field`.","type":"string"},"attribute_type":{"description":"The kind of attribute the skill routes on.\n\nKnown values: `custom_field`, `default_field`. This list is not exhaustive.","type":"string"},"values":{"description":"The attribute values the user is skilled in, with their levels.","items":{"$ref":"#/components/schemas/UserSkillValue"},"nullable":true,"type":"array"}},"required":["attribute","attribute_type"],"type":"object"},"UserSkillValue":{"properties":{"level":{"description":"The skill level, where 1 is the lowest. Pylon assigns levels 1 to 3.","format":"int64","type":"integer"},"value":{"description":"The attribute value, such as a select option slug, a user ID, or a language code.","type":"string"}},"required":["level","value"],"type":"object"},"Pagination":{"description":"Pagination information for list responses. Absent when there are no more results.","properties":{"cursor":{"description":"The cursor for the next page of results.","type":"string"},"has_next_page":{"description":"Indicates if there is a next page of results.","type":"boolean"}},"required":["cursor","has_next_page"],"title":"Pagination","type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"filter_errors":{"description":"One entry per problem found in the request's filter. Present only when code is\n\"invalid_filter\"; errors carries the same messages as plain text.","items":{"$ref":"#/components/schemas/FilterError"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"FilterError":{"properties":{"allowed":{"description":"What is accepted in place of the rejected field, operator, value, or relationship.\nLong lists are cut off after 100 entries.","items":{"type":"string"},"type":"array"},"code":{"description":"A stable machine-readable identifier for this problem.\n\nKnown values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.","type":"string"},"field":{"description":"The field of the filter at path, when it has one.","type":"string"},"message":{"description":"What is wrong and how to fix it.","type":"string"},"operator":{"description":"The operator of the filter at path, when it has one.","type":"string"},"path":{"description":"Where the problem is, as a JSONPath from the root of the filter, such as\n\"$.subfilters[1].related_object.filter\".","type":"string"},"suggestion":{"description":"The accepted entry closest to the rejected one, when one is close enough.","type":"string"}},"required":["code","message","path"],"type":"object"}}},"paths":{"/users":{"get":{"description":"Returns all users for the organization.\n\n**Rate limit:** 300 requests per minute","operationId":"GetUsers","parameters":[{"description":"Whether to include deactivated users. Defaults to false.","in":"query","name":"include_deactivated","schema":{"type":"boolean"}}],"responses":{"200":{"$ref":"#/components/responses/GetUsersResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get a list of users","tags":["users"]}}}}
```

## Get a user by its ID

> Returns a single user by ID.\
> \
> \*\*Rate limit:\*\* 300 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetUserResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/User"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"User":{"properties":{"avatar_url":{"description":"The avatar URL of the user.","type":"string"},"email":{"description":"The primary email of the user.","type":"string"},"emails":{"description":"The list of all emails of the user.","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"The ID of the user.","type":"string"},"is_deactivated":{"description":"Whether the user is deactivated.","type":"boolean"},"name":{"description":"The name of the user.","type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/MiniRole"}],"deprecated":true,"description":"Deprecated: Use roles to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","nullable":true},"role_id":{"deprecated":true,"description":"Deprecated: Use role_ids to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","type":"string"},"role_ids":{"description":"All assigned role IDs, sorted by ID. The order does not imply precedence.","items":{"type":"string"},"nullable":true,"type":"array"},"roles":{"description":"All assigned roles, including SCIM-derived roles, sorted by ID. Empty when no roles are assigned.","items":{"$ref":"#/components/schemas/MiniRole"},"nullable":true,"type":"array"},"skills":{"description":"The user's routing skills. Null when the caller lacks permission to read team settings.","items":{"$ref":"#/components/schemas/UserSkill"},"nullable":true,"type":"array"},"status":{"description":"The status of the user. Standard values are `active`, `away`, and `out_of_office`; custom status slugs are also supported. See GET /user-statuses for each status's category.","type":"string"}},"required":["avatar_url","email","id","is_deactivated","name","role_id","status"],"type":"object"},"MiniRole":{"properties":{"id":{"description":"The ID of the role.","type":"string"},"name":{"description":"The name of the role.","type":"string"},"slug":{"description":"The slug of the role.","type":"string"}},"required":["id","name","slug"],"type":"object"},"UserSkill":{"properties":{"attribute":{"description":"The issue custom field ID when attribute_type is `custom_field`, or the issue property, such as `language`, when attribute_type is `default_field`.","type":"string"},"attribute_type":{"description":"The kind of attribute the skill routes on.\n\nKnown values: `custom_field`, `default_field`. This list is not exhaustive.","type":"string"},"values":{"description":"The attribute values the user is skilled in, with their levels.","items":{"$ref":"#/components/schemas/UserSkillValue"},"nullable":true,"type":"array"}},"required":["attribute","attribute_type"],"type":"object"},"UserSkillValue":{"properties":{"level":{"description":"The skill level, where 1 is the lowest. Pylon assigns levels 1 to 3.","format":"int64","type":"integer"},"value":{"description":"The attribute value, such as a select option slug, a user ID, or a language code.","type":"string"}},"required":["level","value"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"filter_errors":{"description":"One entry per problem found in the request's filter. Present only when code is\n\"invalid_filter\"; errors carries the same messages as plain text.","items":{"$ref":"#/components/schemas/FilterError"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"FilterError":{"properties":{"allowed":{"description":"What is accepted in place of the rejected field, operator, value, or relationship.\nLong lists are cut off after 100 entries.","items":{"type":"string"},"type":"array"},"code":{"description":"A stable machine-readable identifier for this problem.\n\nKnown values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.","type":"string"},"field":{"description":"The field of the filter at path, when it has one.","type":"string"},"message":{"description":"What is wrong and how to fix it.","type":"string"},"operator":{"description":"The operator of the filter at path, when it has one.","type":"string"},"path":{"description":"Where the problem is, as a JSONPath from the root of the filter, such as\n\"$.subfilters[1].related_object.filter\".","type":"string"},"suggestion":{"description":"The accepted entry closest to the rejected one, when one is close enough.","type":"string"}},"required":["code","message","path"],"type":"object"}}},"paths":{"/users/{id}":{"get":{"description":"Returns a single user by ID.\n\n**Rate limit:** 300 requests per minute","operationId":"GetUser","parameters":[{"description":"The ID of the user to fetch.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/GetUserResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get a user by its ID","tags":["user"]}}}}
```

## Update a user

> Updates an existing user. Only provided fields are modified.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"UpdateUserRequestBody":{"properties":{"avatar_url":{"description":"The avatar URL of the user. Must be a square .png, .jpg or .jpeg.","type":"string"},"is_deactivated":{"description":"Whether the user is deactivated. Changing it requires admin permissions. Deactivating revokes the user's API tokens, removes their team\nschedules and skills, disconnects their calendars, and reassigns their open issues in the background. Reactivating does not\nrestore any of these. Users provisioned through SCIM must be deactivated and reactivated in the identity provider.","type":"boolean"},"name":{"description":"The name of the user.","type":"string"},"reassign_open_issues_to_user_id":{"description":"The ID of the user to reassign the deactivated user's open issues to. Only valid with `is_deactivated: true`. If omitted, the issues are unassigned.","type":"string"},"role_id":{"description":"The role_id of the user.","type":"string"},"status":{"description":"The new status for the user: `active`, `away`, `out_of_office`, or a custom status slug from GET /user-statuses.","type":"string"}},"type":"object"},"GetUserResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/User"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"User":{"properties":{"avatar_url":{"description":"The avatar URL of the user.","type":"string"},"email":{"description":"The primary email of the user.","type":"string"},"emails":{"description":"The list of all emails of the user.","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"The ID of the user.","type":"string"},"is_deactivated":{"description":"Whether the user is deactivated.","type":"boolean"},"name":{"description":"The name of the user.","type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/MiniRole"}],"deprecated":true,"description":"Deprecated: Use roles to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","nullable":true},"role_id":{"deprecated":true,"description":"Deprecated: Use role_ids to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","type":"string"},"role_ids":{"description":"All assigned role IDs, sorted by ID. The order does not imply precedence.","items":{"type":"string"},"nullable":true,"type":"array"},"roles":{"description":"All assigned roles, including SCIM-derived roles, sorted by ID. Empty when no roles are assigned.","items":{"$ref":"#/components/schemas/MiniRole"},"nullable":true,"type":"array"},"skills":{"description":"The user's routing skills. Null when the caller lacks permission to read team settings.","items":{"$ref":"#/components/schemas/UserSkill"},"nullable":true,"type":"array"},"status":{"description":"The status of the user. Standard values are `active`, `away`, and `out_of_office`; custom status slugs are also supported. See GET /user-statuses for each status's category.","type":"string"}},"required":["avatar_url","email","id","is_deactivated","name","role_id","status"],"type":"object"},"MiniRole":{"properties":{"id":{"description":"The ID of the role.","type":"string"},"name":{"description":"The name of the role.","type":"string"},"slug":{"description":"The slug of the role.","type":"string"}},"required":["id","name","slug"],"type":"object"},"UserSkill":{"properties":{"attribute":{"description":"The issue custom field ID when attribute_type is `custom_field`, or the issue property, such as `language`, when attribute_type is `default_field`.","type":"string"},"attribute_type":{"description":"The kind of attribute the skill routes on.\n\nKnown values: `custom_field`, `default_field`. This list is not exhaustive.","type":"string"},"values":{"description":"The attribute values the user is skilled in, with their levels.","items":{"$ref":"#/components/schemas/UserSkillValue"},"nullable":true,"type":"array"}},"required":["attribute","attribute_type"],"type":"object"},"UserSkillValue":{"properties":{"level":{"description":"The skill level, where 1 is the lowest. Pylon assigns levels 1 to 3.","format":"int64","type":"integer"},"value":{"description":"The attribute value, such as a select option slug, a user ID, or a language code.","type":"string"}},"required":["level","value"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"filter_errors":{"description":"One entry per problem found in the request's filter. Present only when code is\n\"invalid_filter\"; errors carries the same messages as plain text.","items":{"$ref":"#/components/schemas/FilterError"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"FilterError":{"properties":{"allowed":{"description":"What is accepted in place of the rejected field, operator, value, or relationship.\nLong lists are cut off after 100 entries.","items":{"type":"string"},"type":"array"},"code":{"description":"A stable machine-readable identifier for this problem.\n\nKnown values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.","type":"string"},"field":{"description":"The field of the filter at path, when it has one.","type":"string"},"message":{"description":"What is wrong and how to fix it.","type":"string"},"operator":{"description":"The operator of the filter at path, when it has one.","type":"string"},"path":{"description":"Where the problem is, as a JSONPath from the root of the filter, such as\n\"$.subfilters[1].related_object.filter\".","type":"string"},"suggestion":{"description":"The accepted entry closest to the rejected one, when one is close enough.","type":"string"}},"required":["code","message","path"],"type":"object"}},"responses":{"GetUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/users/{id}":{"patch":{"description":"Updates an existing user. Only provided fields are modified.\n\n**Rate limit:** 120 requests per minute","operationId":"UpdateUser","parameters":[{"description":"The ID of the user to update.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestBody"}}}},"responses":{"200":{"$ref":"#/components/responses/GetUserResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Update a user","tags":["user"]}}}}
```

## Invite a user

> Creates a user and emails them an invitation to join the organization. If a user with this email already exists,\
> they are reactivated if needed and sent a new invitation, and any pending invitation is canceled. Requires admin permissions.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"InviteUserRequestBody":{"properties":{"email":{"description":"The email address to send the invitation to.","type":"string"},"name":{"description":"The name of the user to invite.","type":"string"},"role_id":{"description":"The ID of the role to give the user. See GET /user-roles. Defaults to the organization's default role.","type":"string"}},"required":["name","email"],"type":"object"},"GetUserResponseBody":{"properties":{"data":{"$ref":"#/components/schemas/User"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"User":{"properties":{"avatar_url":{"description":"The avatar URL of the user.","type":"string"},"email":{"description":"The primary email of the user.","type":"string"},"emails":{"description":"The list of all emails of the user.","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"The ID of the user.","type":"string"},"is_deactivated":{"description":"Whether the user is deactivated.","type":"boolean"},"name":{"description":"The name of the user.","type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/MiniRole"}],"deprecated":true,"description":"Deprecated: Use roles to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","nullable":true},"role_id":{"deprecated":true,"description":"Deprecated: Use role_ids to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","type":"string"},"role_ids":{"description":"All assigned role IDs, sorted by ID. The order does not imply precedence.","items":{"type":"string"},"nullable":true,"type":"array"},"roles":{"description":"All assigned roles, including SCIM-derived roles, sorted by ID. Empty when no roles are assigned.","items":{"$ref":"#/components/schemas/MiniRole"},"nullable":true,"type":"array"},"skills":{"description":"The user's routing skills. Null when the caller lacks permission to read team settings.","items":{"$ref":"#/components/schemas/UserSkill"},"nullable":true,"type":"array"},"status":{"description":"The status of the user. Standard values are `active`, `away`, and `out_of_office`; custom status slugs are also supported. See GET /user-statuses for each status's category.","type":"string"}},"required":["avatar_url","email","id","is_deactivated","name","role_id","status"],"type":"object"},"MiniRole":{"properties":{"id":{"description":"The ID of the role.","type":"string"},"name":{"description":"The name of the role.","type":"string"},"slug":{"description":"The slug of the role.","type":"string"}},"required":["id","name","slug"],"type":"object"},"UserSkill":{"properties":{"attribute":{"description":"The issue custom field ID when attribute_type is `custom_field`, or the issue property, such as `language`, when attribute_type is `default_field`.","type":"string"},"attribute_type":{"description":"The kind of attribute the skill routes on.\n\nKnown values: `custom_field`, `default_field`. This list is not exhaustive.","type":"string"},"values":{"description":"The attribute values the user is skilled in, with their levels.","items":{"$ref":"#/components/schemas/UserSkillValue"},"nullable":true,"type":"array"}},"required":["attribute","attribute_type"],"type":"object"},"UserSkillValue":{"properties":{"level":{"description":"The skill level, where 1 is the lowest. Pylon assigns levels 1 to 3.","format":"int64","type":"integer"},"value":{"description":"The attribute value, such as a select option slug, a user ID, or a language code.","type":"string"}},"required":["level","value"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"filter_errors":{"description":"One entry per problem found in the request's filter. Present only when code is\n\"invalid_filter\"; errors carries the same messages as plain text.","items":{"$ref":"#/components/schemas/FilterError"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"FilterError":{"properties":{"allowed":{"description":"What is accepted in place of the rejected field, operator, value, or relationship.\nLong lists are cut off after 100 entries.","items":{"type":"string"},"type":"array"},"code":{"description":"A stable machine-readable identifier for this problem.\n\nKnown values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.","type":"string"},"field":{"description":"The field of the filter at path, when it has one.","type":"string"},"message":{"description":"What is wrong and how to fix it.","type":"string"},"operator":{"description":"The operator of the filter at path, when it has one.","type":"string"},"path":{"description":"Where the problem is, as a JSONPath from the root of the filter, such as\n\"$.subfilters[1].related_object.filter\".","type":"string"},"suggestion":{"description":"The accepted entry closest to the rejected one, when one is close enough.","type":"string"}},"required":["code","message","path"],"type":"object"}},"responses":{"GetUserResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/users/invite":{"post":{"description":"Creates a user and emails them an invitation to join the organization. If a user with this email already exists,\nthey are reactivated if needed and sent a new invitation, and any pending invitation is canceled. Requires admin permissions.\n\n**Rate limit:** 30 requests per minute","operationId":"InviteUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteUserRequestBody"}}},"required":true},"responses":{"200":{"$ref":"#/components/responses/GetUserResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Invite a user","tags":["users"]}}}}
```

## Get all user statuses

> Returns the built-in and custom user statuses for the organization. Use \`slug\` in a team's \`assignment\_configuration.assignable\_user\_statuses\`.\
> \
> \*\*Rate limit:\*\* 30 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"responses":{"GetUserStatusesResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserStatusesResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}},"schemas":{"GetUserStatusesResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/UserStatus"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"UserStatus":{"properties":{"category":{"description":"The category of the user status. One of active, away, out_of_office.","type":"string"},"is_archived":{"description":"Indicates if the user status is archived.","type":"boolean"},"is_default_status":{"description":"Indicates if the user status is a built-in status.","type":"boolean"},"label":{"description":"The label of the user status.","type":"string"},"slug":{"description":"The slug of the user status. Use it in a team's assignment_configuration.assignable_user_statuses.","type":"string"}},"required":["category","is_archived","is_default_status","label","slug"],"type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"filter_errors":{"description":"One entry per problem found in the request's filter. Present only when code is\n\"invalid_filter\"; errors carries the same messages as plain text.","items":{"$ref":"#/components/schemas/FilterError"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"FilterError":{"properties":{"allowed":{"description":"What is accepted in place of the rejected field, operator, value, or relationship.\nLong lists are cut off after 100 entries.","items":{"type":"string"},"type":"array"},"code":{"description":"A stable machine-readable identifier for this problem.\n\nKnown values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.","type":"string"},"field":{"description":"The field of the filter at path, when it has one.","type":"string"},"message":{"description":"What is wrong and how to fix it.","type":"string"},"operator":{"description":"The operator of the filter at path, when it has one.","type":"string"},"path":{"description":"Where the problem is, as a JSONPath from the root of the filter, such as\n\"$.subfilters[1].related_object.filter\".","type":"string"},"suggestion":{"description":"The accepted entry closest to the rejected one, when one is close enough.","type":"string"}},"required":["code","message","path"],"type":"object"}}},"paths":{"/user-statuses":{"get":{"description":"Returns the built-in and custom user statuses for the organization. Use `slug` in a team's `assignment_configuration.assignable_user_statuses`.\n\n**Rate limit:** 30 requests per minute","operationId":"GetUserStatuses","responses":{"200":{"$ref":"#/components/responses/GetUserStatusesResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Get all user statuses","tags":["user-statuses"]}}}}
```

## Search for users by a given filter

> Filterable fields and their allowed operators:\
> \
> &#x20;Field | Allowed operators |\
> &#x20;\--- | --- |\
> &#x20;\`email\` | \`equals\`, \`in\`, \`not\_in\` |\
> \
> \### Filter syntax and operators\
> \
> See \[Search filters]\(<https://docs.usepylon.com/pylon-docs/developer/api/conventions#search-filters>) for filter structure and operator definitions. The table above lists the operators supported by each field.\
> \
> \*\*Rate limit:\*\* 120 requests per minute

```json
{"openapi":"3.0.3","info":{"title":"Pylon API.","version":"1.0.0"},"tags":[],"servers":[{"description":"US region","url":"https://api.usepylon.com"},{"description":"EU region","url":"https://api.eu.usepylon.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"description":"Authorization: Bearer <token>","scheme":"bearer","type":"http"}},"schemas":{"SearchUsersRequest":{"properties":{"cursor":{"description":"The cursor to use for pagination.","type":"string"},"filter":{"$ref":"#/components/schemas/Filter"},"limit":{"description":"The number of users to fetch. Defaults to 100. Must be between 1 and 1000.","format":"int64","type":"integer"}},"type":"object"},"Filter":{"properties":{"field":{"description":"The field for this filter.  For allowed fields, see the documentation for\nthe specific endpoint you are using.\nFor non-compound filters (any operators other than \"and\", \"or\", or \"not\"),\nfield must be set, along with either value or values, depending on the operator.","type":"string"},"operator":{"description":"The operator for this filter. Required unless related_object is set.","enum":["equals","not_equals","contains","does_not_contain","in","not_in","and","or","not","time_is_after","time_is_before","time_range","string_contains","string_does_not_contain","is_set","is_unset","greater_than","less_than","greater_than_or_equals","less_than_or_equals","includes_all_of","starts_with","ends_with","time_is_in_last","time_is_not_in_last","time_is_in_next","time_is_not_in_next","includes_exactly","belongs_to","not_belongs_to"],"type":"string"},"related_object":{"$ref":"#/components/schemas/FilterRelatedObject"},"subfilters":{"description":"Sub-filters for this filter.  Valid only when operator is \"and\", \"or\", or \"not\"; \"not\"\ntakes exactly one subfilter.\nThe maximum allowed depth for a tree of filters is 5, counting the top-level filter.","items":{"$ref":"#/components/schemas/Filter"},"type":"array"},"value":{"description":"The value for this filter. Used by single-valued operators: \"equals\", \"not_equals\",\n\"contains\", \"does_not_contain\", \"string_contains\", \"string_does_not_contain\",\n\"starts_with\", \"ends_with\", \"time_is_after\", \"time_is_before\", \"time_is_in_last\",\n\"time_is_not_in_last\", \"time_is_in_next\", \"time_is_not_in_next\", \"greater_than\",\n\"less_than\", \"greater_than_or_equals\", and \"less_than_or_equals\".\nOn fields that hold user IDs, \"current_user\" means the API token's user; on fields that\nhold team IDs, \"my_teams\" means that user's teams. The same applies to values.","type":"string"},"values":{"description":"The values for this filter. Used by multi-valued operators: \"in\", \"not_in\", \"includes_all_of\",\n\"includes_exactly\", \"belongs_to\", and \"not_belongs_to\". For \"time_range\", set to [start, end].","items":{"type":"string"},"type":"array"}},"type":"object"},"FilterRelatedObject":{"properties":{"custom_field":{"description":"The slug of a relationship custom field to follow. Returned when reading stored filters,\nsuch as ticket form conditions; search filters don't accept it yet.","type":"string"},"filter":{"$ref":"#/components/schemas/Filter"},"relationship":{"description":"The built-in relationship to follow, such as \"account\". Each search endpoint lists the\nrelationships its filter accepts. Exactly one of relationship and custom_field is set.","type":"string"}},"required":["filter"],"type":"object"},"SearchUsersResponseBody":{"properties":{"data":{"description":"The data payload of the response.","items":{"$ref":"#/components/schemas/User"},"type":"array"},"pagination":{"$ref":"#/components/schemas/Pagination"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["data","request_id"],"type":"object"},"User":{"properties":{"avatar_url":{"description":"The avatar URL of the user.","type":"string"},"email":{"description":"The primary email of the user.","type":"string"},"emails":{"description":"The list of all emails of the user.","items":{"type":"string"},"nullable":true,"type":"array"},"id":{"description":"The ID of the user.","type":"string"},"is_deactivated":{"description":"Whether the user is deactivated.","type":"boolean"},"name":{"description":"The name of the user.","type":"string"},"role":{"allOf":[{"$ref":"#/components/schemas/MiniRole"}],"deprecated":true,"description":"Deprecated: Use roles to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","nullable":true},"role_id":{"deprecated":true,"description":"Deprecated: Use role_ids to retrieve all assigned roles. This field returns only one assignment for backwards compatibility, not a primary role.","type":"string"},"role_ids":{"description":"All assigned role IDs, sorted by ID. The order does not imply precedence.","items":{"type":"string"},"nullable":true,"type":"array"},"roles":{"description":"All assigned roles, including SCIM-derived roles, sorted by ID. Empty when no roles are assigned.","items":{"$ref":"#/components/schemas/MiniRole"},"nullable":true,"type":"array"},"skills":{"description":"The user's routing skills. Null when the caller lacks permission to read team settings.","items":{"$ref":"#/components/schemas/UserSkill"},"nullable":true,"type":"array"},"status":{"description":"The status of the user. Standard values are `active`, `away`, and `out_of_office`; custom status slugs are also supported. See GET /user-statuses for each status's category.","type":"string"}},"required":["avatar_url","email","id","is_deactivated","name","role_id","status"],"type":"object"},"MiniRole":{"properties":{"id":{"description":"The ID of the role.","type":"string"},"name":{"description":"The name of the role.","type":"string"},"slug":{"description":"The slug of the role.","type":"string"}},"required":["id","name","slug"],"type":"object"},"UserSkill":{"properties":{"attribute":{"description":"The issue custom field ID when attribute_type is `custom_field`, or the issue property, such as `language`, when attribute_type is `default_field`.","type":"string"},"attribute_type":{"description":"The kind of attribute the skill routes on.\n\nKnown values: `custom_field`, `default_field`. This list is not exhaustive.","type":"string"},"values":{"description":"The attribute values the user is skilled in, with their levels.","items":{"$ref":"#/components/schemas/UserSkillValue"},"nullable":true,"type":"array"}},"required":["attribute","attribute_type"],"type":"object"},"UserSkillValue":{"properties":{"level":{"description":"The skill level, where 1 is the lowest. Pylon assigns levels 1 to 3.","format":"int64","type":"integer"},"value":{"description":"The attribute value, such as a select option slug, a user ID, or a language code.","type":"string"}},"required":["level","value"],"type":"object"},"Pagination":{"description":"Pagination information for list responses. Absent when there are no more results.","properties":{"cursor":{"description":"The cursor for the next page of results.","type":"string"},"has_next_page":{"description":"Indicates if there is a next page of results.","type":"boolean"}},"required":["cursor","has_next_page"],"title":"Pagination","type":"object"},"ErrorApiResponseBody":{"properties":{"code":{"description":"A stable machine-readable identifier for this failure, safe to branch on\ninstead of the message text. Omitted when the failure has no assigned code.\n\nKnown values: `recipients_suppressed`, `email_bounced`, `internal_issue_reply_not_allowed`, `duplicate_object`, `invalid_authorization_header`, `invalid_api_token`, `invalid_oauth_token`, `wrong_region_token`, `organization_deactivated`, `organization_suspended`, `permission_denied`, `oauth_not_permitted`, `rate_limited`, `not_found`, `method_not_allowed`, `payload_too_large`, `invalid_request_body`, `internal_error`, `invalid_webhook_credentials`, `organization_inactive`, `invalid_filter`. This list is not exhaustive.","type":"string"},"errors":{"description":"The list of errors.","items":{"type":"string"},"type":"array"},"exists_id":{"description":"The ID of the object that already exists if this is a duplicate object error.","type":"string"},"filter_errors":{"description":"One entry per problem found in the request's filter. Present only when code is\n\"invalid_filter\"; errors carries the same messages as plain text.","items":{"$ref":"#/components/schemas/FilterError"},"type":"array"},"request_id":{"description":"The request ID for tracking.","type":"string"}},"required":["request_id"],"type":"object"},"FilterError":{"properties":{"allowed":{"description":"What is accepted in place of the rejected field, operator, value, or relationship.\nLong lists are cut off after 100 entries.","items":{"type":"string"},"type":"array"},"code":{"description":"A stable machine-readable identifier for this problem.\n\nKnown values: `invalid_shape`, `too_deep`, `unknown_operator`, `unknown_field`, `operator_not_allowed`, `missing_value`, `unexpected_value`, `invalid_value`, `unknown_relationship`, `unsupported`. This list is not exhaustive.","type":"string"},"field":{"description":"The field of the filter at path, when it has one.","type":"string"},"message":{"description":"What is wrong and how to fix it.","type":"string"},"operator":{"description":"The operator of the filter at path, when it has one.","type":"string"},"path":{"description":"Where the problem is, as a JSONPath from the root of the filter, such as\n\"$.subfilters[1].related_object.filter\".","type":"string"},"suggestion":{"description":"The accepted entry closest to the rejected one, when one is close enough.","type":"string"}},"required":["code","message","path"],"type":"object"}},"responses":{"SearchUsersResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersResponseBody"}}},"description":""},"BadRequestApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request was invalid or could not be completed."},"UnauthorizedApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request could not be authenticated for this API."},"ForbiddenApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The authenticated caller or organization is not allowed to access this endpoint or operation."},"ErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":""},"TooManyRequestsApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"The request exceeded the applicable rate limit.","headers":{"Retry-After":{"description":"Seconds until the next request to this endpoint is permitted.","schema":{"format":"int64","type":"integer"}},"X-Retry-After":{"description":"Seconds until the full per-minute allowance is restored. Capacity returns gradually before then.","schema":{"format":"int64","type":"integer"}}}},"InternalServerErrorApiResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorApiResponseBody"}}},"description":"An unexpected internal error occurred."}}},"paths":{"/users/search":{"post":{"description":"Filterable fields and their allowed operators:\n\n Field | Allowed operators |\n --- | --- |\n `email` | `equals`, `in`, `not_in` |\n\n### Filter syntax and operators\n\nSee [Search filters](https://docs.usepylon.com/pylon-docs/developer/api/conventions#search-filters) for filter structure and operator definitions. The table above lists the operators supported by each field.\n\n**Rate limit:** 120 requests per minute","operationId":"SearchUsers","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchUsersRequest"}}}},"responses":{"200":{"$ref":"#/components/responses/SearchUsersResponse"},"400":{"$ref":"#/components/responses/BadRequestApiResponse"},"401":{"$ref":"#/components/responses/UnauthorizedApiResponse"},"403":{"$ref":"#/components/responses/ForbiddenApiResponse"},"404":{"$ref":"#/components/responses/ErrorApiResponse"},"429":{"$ref":"#/components/responses/TooManyRequestsApiResponse"},"500":{"$ref":"#/components/responses/InternalServerErrorApiResponse"}},"summary":"Search for users by a given filter","tags":["users"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.usepylon.com/pylon-docs/developer/api/api-reference/users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
