/api/v2/trigger_categories/{trigger_category_id}
Returns the trigger category with the specified ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_category_id | path | required | string | The id of the trigger category to retrieve |
The requested trigger category
Error
GET /api/v2/trigger_categories/{trigger_category_id}
/api/v2/trigger_categories/{trigger_category_id}
Updates the trigger category with the specified ID.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_category_id | path | required | string | The id of the trigger category to update |
application/json
TriggerCategoriesUpdateCategoryByIdRequest
| Property | Type | Required |
|---|---|---|
| trigger_category | object | optional |
| └ name | string | optional |
| └ position | integer | optional |
The updated trigger category
Error
Error
PATCH /api/v2/trigger_categories/{trigger_category_id}
/api/v2/triggers
Lists all triggers for the current account.
See Pagination.
Returns a maximum of 100 records per page.
The following sideloads are supported. The usage sideloads are only supported on the Support Professional or Suite Growth plan or above.
| Name | Will sideload |
|---|---|
| app_installation | The app installation that requires each trigger, if present |
| permissions | The permissions for each trigger |
| usage_1h | The number of times each trigger has been used in the past hour |
| usage_24h | The number of times each trigger has been used in the past day |
| usage_7d | The number of times each trigger has been used in the past week |
| usage_30d | The number of times each trigger has been used in the past thirty days |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| active | query | optional | boolean | Filter by active triggers if true or inactive triggers if false |
| sort | query | optional | string | Cursor-based pagination only. Possible values are “alphabetical”, “created_at”, “updated_at”, or “position”. |
| sort_by | query | optional | string | Offset pagination only. Possible values are “alphabetical”, “created_at”, “updated_at”, “usage_1h”, “usage_24h”, or “usage_7d”. Defaults to “position” |
| sort_order | query | optional | string | One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others |
| category_id | query | optional | string | Filter triggers by category ID |
Success response
GET /api/v2/triggers
/api/v2/triggers
application/json
TriggerWithCategoryRequest
| Property | Type | Required |
|---|---|---|
| trigger | object | optional |
| └ id | integer | optional |
| └ url | string | optional |
| └ title | string | required |
| └ active | boolean | optional |
| └ actions | array | required |
| └ field | string | optional |
| └ value | object | optional |
| └ default | boolean | optional |
| └ position | integer | optional |
| └ raw_title | string | optional |
| └ conditions | object | required |
| └ all | array | optional |
| └ field | string | optional |
| └ value | object | optional |
| └ operator | string | optional |
| └ any | array | optional |
| └ field | string | optional |
| └ value | object | optional |
| └ operator | string | optional |
| └ created_at | string | optional |
| └ updated_at | string | optional |
| └ category_id | string | optional |
| └ description | string | optional |
Created response
POST /api/v2/triggers
/api/v2/triggers/active
Lists all active triggers.
See Pagination.
Returns a maximum of 100 records per page.
The following sideloads are supported:
| Name | Will sideload |
|---|---|
| app_installation | The app installation that requires each trigger, if present |
| permissions | The permissions for each trigger |
| usage_1h | The number of times each trigger has been used in the past hour |
| usage_24h | The number of times each trigger has been used in the past day |
| usage_7d | The number of times each trigger has been used in the past week |
| usage_30d | The number of times each trigger has been used in the past thirty days |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sort | query | optional | string | Cursor-based pagination only. Possible values are “alphabetical”, “created_at”, “updated_at”, or “position”. |
| sort_by | query | optional | string | Offset pagination only. Possible values are “alphabetical”, “created_at”, “updated_at”, “usage_1h”, “usage_24h”, or “usage_7d”. Defaults to “position” |
| sort_order | query | optional | string | One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others |
| category_id | query | optional | string | Filter triggers by category ID |
Success response
GET /api/v2/triggers/active
/api/v2/triggers/definitions
Returns the definitions of the actions a trigger can perform and the
definitions of the conditions under which a trigger can execute. The
definition of the action includes a title (“Status”), a type (“list”), and
possible values. The definition of the condition includes the same fields
as well as the possible operators.
For a list of supported actions, see the Actions reference
For a list of supported conditions, see the Conditions reference
Success response
GET /api/v2/triggers/definitions
/api/v2/triggers/destroy_many
Deletes the triggers corresponding to the provided comma-separated list of IDs.
The DELETE request takes one parameter, an ids object that lists the
triggers to delete.
| Name | Description |
|---|---|
| ids | The IDs of the triggers to delete |
{
"ids": "25,23,27,22"
}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | string | A comma separated list of trigger IDs |
No content response
DELETE /api/v2/triggers/destroy_many
/api/v2/triggers/reorder
Alters the firing order of triggers in the account. See
Reordering and sorting triggers
in the Zendesk Help Center. The firing order is set in a trigger_ids array in the request body.
You must include every trigger id in your account to reorder the triggers. If not, the endpoint will return 404 Forbidden.
Reordering triggers via the API is not permitted if you have more than one trigger category. If there is more than one
trigger category, the endpoint will return a LimitOneCategory error.
Success response
PUT /api/v2/triggers/reorder
/api/v2/triggers/search
The following sideloads are supported. For more information, see Side-loading.
| Name | Will sideload |
|---|---|
| app_installation | The app installation that requires each trigger, if present |
| permissions | The permissions for each trigger |
| usage_1h | The number of times each trigger has been used in the past hour |
| usage_24h | The number of times each trigger has been used in the past day |
| usage_7d | The number of times each trigger has been used in the past week |
| usage_30d | The number of times each trigger has been used in the past thirty days |
Use the filter query parameter to filter a trigger search by one or more attributes. For example, the following filter argument filters triggers by the description attribute:
{
"json": {
"description": "Close a ticket"
}
}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| query | query | optional | string | Query string used to find all triggers with matching title |
| filter | query | optional | object | Trigger attribute filters for the search. See Filter |
| active | query | optional | boolean | Filter by active triggers if true or inactive triggers if false |
| sort | query | optional | string | Cursor-based pagination only. Possible values are “alphabetical”, “created_at”, “updated_at”, or “position”. |
| sort_by | query | optional | string | Offset pagination only. Possible values are “alphabetical”, “created_at”, “updated_at”, “usage_1h”, “usage_24h”, or “usage_7d”. Defaults to “position” |
| sort_order | query | optional | string | One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others |
| include | query | optional | string | A sideload to include in the response. See Sideloads |
Success response
GET /api/v2/triggers/search
/api/v2/triggers/update_many
Updates the position or the active status of multiple triggers. Any additional properties are ignored.
The PUT request expects a triggers object that lists the triggers to update.
Each trigger may have the following properties:
| Name | Mandatory | Description |
|---|---|---|
| id | yes | The ID of the trigger to update |
| position | no | The new position of the trigger |
| active | no | The active status of the trigger (true or false) |
| category_id | no | The ID of the new category the trigger is to be moved to |
{
"triggers": [
{"id": 25, "position": 3},
{"id": 23, "position": 5},
{"id": 27, "position": 9},
{"id": 22, "position": 7}
]
}
application/json
TriggerBulkUpdateRequest
| Property | Type | Required |
|---|---|---|
| triggers | array | optional |
| └ id | integer | required |
| └ active | boolean | optional |
| └ position | integer | optional |
| └ category_id | string | optional |
Success response
PUT /api/v2/triggers/update_many
/api/v2/triggers/{trigger_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_id | path | optional | integer | The ID of the trigger |
No Content response
DELETE /api/v2/triggers/{trigger_id}
/api/v2/triggers/{trigger_id}
The Via Type value is a number instead of a text string. See Via types reference for the keys.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_id | path | optional | integer | The ID of the trigger |
Success response
GET /api/v2/triggers/{trigger_id}
/api/v2/triggers/{trigger_id}
Updating a condition or action updates both the conditions and actions arrays,
clearing all existing values of both arrays. Include all your conditions
and actions when updating any condition or action.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_id | path | optional | integer | The ID of the trigger |
application/json
TriggerWithCategoryRequest
| Property | Type | Required |
|---|---|---|
| trigger | object | optional |
| └ id | integer | optional |
| └ url | string | optional |
| └ title | string | required |
| └ active | boolean | optional |
| └ actions | array | required |
| └ field | string | optional |
| └ value | object | optional |
| └ default | boolean | optional |
| └ position | integer | optional |
| └ raw_title | string | optional |
| └ conditions | object | required |
| └ all | array | optional |
| └ field | string | optional |
| └ value | object | optional |
| └ operator | string | optional |
| └ any | array | optional |
| └ field | string | optional |
| └ value | object | optional |
| └ operator | string | optional |
| └ created_at | string | optional |
| └ updated_at | string | optional |
| └ category_id | string | optional |
| └ description | string | optional |
Success response
PUT /api/v2/triggers/{trigger_id}
/api/v2/triggers/{trigger_id}/revisions
List the revisions associated with a trigger. Trigger revision history is only available on Enterprise plans.
The following sideloads are supported:
| Name | Will sideload |
|---|---|
| users | The user that authored each revision |
This endpoint uses cursor-based pagination. The records are ordered in
descending order by the created_at timestamp, then by id on duplicate
created_at values.
The cursor parameter is a non-human-readable argument you can use to move
forward or backward in time.
Each JSON response will contain the following attributes to help you get
more results:
after_url requests more recent resultsbefore_url requests older resultsafter_cursor is the cursor to build the request yourselfbefore_cursor is the cursor to build the request yourselfThe properties are null if no more records are available.
You can request a maximum of 1000 records using the limit parameter. If
no limit parameter is supplied, it will default to 1,000.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_id | path | optional | integer | The ID of the trigger |
Success response
GET /api/v2/triggers/{trigger_id}/revisions
/api/v2/triggers/{trigger_id}/revisions/{trigger_revision_id}
Fetches a revision associated with a trigger. Trigger revision history is only available on Enterprise plans.
The following sideloads are supported:
| Name | Will sideload |
|---|---|
| users | The user that authored each revision |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| trigger_id | path | optional | integer | The ID of the trigger |
| trigger_revision_id | path | optional | integer | The ID of the revision for a particular trigger |
Success response
GET /api/v2/triggers/{trigger_id}/revisions/{trigger_revision_id}
/api/v2/user_fields
Returns a list of custom user fields in your account. Fields are returned in the order that you specify in your user fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each User Field to the values returned under the user_fields attribute on the User resource.
See Pagination.
Returns a maximum of 100 records per page.
Success response
GET /api/v2/user_fields
/api/v2/user_fields
Creates any of the following custom field types:
See About custom field types in Zendesk help.
Created response
POST /api/v2/user_fields
/api/v2/user_fields/reorder
Success response
PUT /api/v2/user_fields/reorder
/api/v2/user_fields/{user_field_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
No Content response
DELETE /api/v2/user_fields/{user_field_id}
/api/v2/user_fields/{user_field_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
Success response
GET /api/v2/user_fields/{user_field_id}
/api/v2/user_fields/{user_field_id}
Dropdown fields return an array of custom_field_options which specify the name, value and order of the list of dropdown options.
Understand the following behavior when updating a dropdown field:
id along with name and value.id along with name and value.custom_field_options array relative to the other options.curl https://{subdomain}.zendesk.com/api/v2/user_fields/{user_field_id}.json \
-H "Content-Type: application/json" -X PUT \
-d '{"user_field": {"custom_field_options": [{"id": 124, "name": "Option 2", "value": "option_2"}, {"id": 123, "name": "Option 1", "value": "option_1"}, {"id": 125, "name": "Option 2", "value": "option_3"}]}}' \
-v -u {email_address}:{password}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
Success response
PUT /api/v2/user_fields/{user_field_id}
/api/v2/user_fields/{user_field_id}/options
Returns a list of custom user field options for the given dropdown user field.
See Pagination.
Returns a maximum of 100 records per page.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
Success response
GET /api/v2/user_fields/{user_field_id}/options
/api/v2/user_fields/{user_field_id}/options
Creates a new option or updates an existing option for the given drop-down user field.
To update an option, include the id of the option in the custom_field_option object. Example: {"custom_field_option": {"id": 10002, "name": "Pineapples", ... }. If an option exists for the given ID, the option will be updated. Otherwise, a new option will be created.
Returns one of the following status codes:
Location: /api/v2/user_fields/{user_field_id}/options.json if the user field option already exists in the databaseLocation: /api/v2/user_fields/{user_field_id}/options.json if the user field option is new| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
Success response
Created response
POST /api/v2/user_fields/{user_field_id}/options
/api/v2/user_fields/{user_field_id}/options/{user_field_option_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
|
| user_field_option_id | path | optional | integer | The ID of the user field option |
No Content response
DELETE /api/v2/user_fields/{user_field_id}/options/{user_field_option_id}
/api/v2/user_fields/{user_field_id}/options/{user_field_option_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_field_id | path | optional | The ID or key of the user field |
|
| user_field_option_id | path | optional | integer | The ID of the user field option |
Success response
GET /api/v2/user_fields/{user_field_id}/options/{user_field_option_id}
/api/v2/users/{user_id}/identities
Returns a list of identities for the given user.
Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only list email and phone number identities.
See Pagination.
Returns a maximum of 100 records per page.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success response
GET /api/v2/users/{user_id}/identities
/api/v2/users/{user_id}/identities
Adds an identity to a user’s profile. An agent can add an identity to any user profile.
Supported identity types:
| Type | Example |
|---|---|
{ "type" : "email", "value" : "someone@example.com" } |
|
{ "type" : "twitter", "value" : "screen_name" } |
|
{ "type" : "facebook", "value" : "855769377321" } |
|
{ "type" : "google", "value" : "example@gmail.com" } |
|
| agent_forwarding | { "type" : "agent_forwarding", "value" : "+1 555-123-4567" } |
| phone_number | { "type" : "phone_number", "value" : "+1 555-123-4567" } |
To create an identity without sending out a verification email, include a "skip_verify_email": true property.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Created response
POST /api/v2/users/{user_id}/identities
/api/v2/users/{user_id}/identities/{user_identity_id}
Deletes the identity for a given user.
In certain cases, a phone number associated with an identity is still visible on the user profile after the identity has been deleted via API. You can remove the phone number from the user profile by updating the phone attribute of the user to an empty string. See Update User via API for details and examples.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| user_identity_id | path | optional | integer | The ID of the user identity |
No Content response
DELETE /api/v2/users/{user_id}/identities/{user_identity_id}
/api/v2/users/{user_id}/identities/{user_identity_id}
Shows the identity with the given id for a given user.
Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only view email or phone number identity.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| user_identity_id | path | optional | integer | The ID of the user identity |
Success response
GET /api/v2/users/{user_id}/identities/{user_identity_id}
/api/v2/users/{user_id}/identities/{user_identity_id}
This endpoint allows you to:
value property of the specified identityYou can’t change an identity’s primary attribute with this endpoint. You must use the Make Identity Primary endpoint instead.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| user_identity_id | path | optional | integer | The ID of the user identity |
Success response
PUT /api/v2/users/{user_id}/identities/{user_identity_id}
/api/v2/users/{user_id}/identities/{user_identity_id}/make_primary
Sets the specified identity as primary. To change other attributes, use the Update Identity endpoint. This is a collection-level operation and the correct behavior for an API client is to subsequently reload the entire collection.
The first endpoint is the preferred option if authenticating as an agent. If authenticating as an end user, you can only use the second endpoint. In addition, an end user can only make an email identity primary if the email is verified.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| user_identity_id | path | optional | integer | The ID of the user identity |
Success response
PUT /api/v2/users/{user_id}/identities/{user_identity_id}/make_primary
/api/v2/users/{user_id}/identities/{user_identity_id}/request_verification
Sends the user a verification email with a link to verify ownership of the email address.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| user_identity_id | path | optional | integer | The ID of the user identity |
Success description
PUT /api/v2/users/{user_id}/identities/{user_identity_id}/request_verification
/api/v2/users/{user_id}/identities/{user_identity_id}/verify
Sets the specified identity as verified.
For security reasons, you can’t use this endpoint to update the email identity of the account owner. To verify the person’s identity, send a verification email. See Verifying the account owner’s email address in Zendesk help.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| user_identity_id | path | optional | integer | The ID of the user identity |
Success response
PUT /api/v2/users/{user_id}/identities/{user_identity_id}/verify
/api/v2/users/{user_id}/password
An admin can set a user’s password only if the setting is enabled in Zendesk Support under Settings > Security > Global. The setting is off by default. Only the account owner can access and change this setting.
API token authentication is not permitted on this endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success description
POST /api/v2/users/{user_id}/password
/api/v2/users/{user_id}/password
You can only change your own password. Nobody can change the password of another user because it requires knowing the user’s existing password. However, an admin can set a new password for another user without knowing the existing password. See Set a User’s Password above.
API token authentication is not permitted on this endpoint.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success description
PUT /api/v2/users/{user_id}/password
/api/v2/users/{user_id}/password/requirements
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success response
GET /api/v2/users/{user_id}/password/requirements
/api/v2/deleted_users
Returns deleted users, including permanently deleted users.
If the results contains permanently deleted users, the users’ properties
that normally contain personal data, such as email and phone,
are null. The name property is “Permanently Deleted User”.
See Pagination.
Returns a maximum of 100 records per page.
Success response
GET /api/v2/deleted_users
/api/v2/deleted_users/count
Returns an approximate count of deleted users, including permanently deleted users. If the count exceeds 100,000, it is updated every 24 hours.
The response includes a refreshed_at property in a count object that contains a timestamp indicating when the count was last updated.
Note: When the count exceeds 100,000, count[refreshed_at] may occasionally be null.
This indicates that the count is being updated in the background, and count[value] is limited to 100,000 until the update is complete.
Success response
GET /api/v2/deleted_users/count
/api/v2/deleted_users/{deleted_user_id}
Before permanently deleting a user, you must delete the user first. See Delete User.
WARNING: Permanently deleting a user deletes all of their information. This information is not recoverable.
You can permanently delete 700 users every 10 minutes.
The rate limiting mechanism behaves as described in
Rates Limits in the API introduction.
Zendesk recommends that you obey the Retry-After header values.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| deleted_user_id | path | optional | integer | The ID of the deleted user |
Success response
DELETE /api/v2/deleted_users/{deleted_user_id}
/api/v2/deleted_users/{deleted_user_id}
Returns users that have been deleted but not permanently yet. See Permanently Delete User.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| deleted_user_id | path | optional | integer | The ID of the deleted user |
Success response
GET /api/v2/deleted_users/{deleted_user_id}
/api/v2/users
See Pagination.
Returns a maximum of 100 records per page.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| role | query | optional | string | Filters the results by role. Possible values are “end-user”, “agent”, or “admin” |
| role[] | query | optional | string | Filters the results by more than one role using the format |
| permission_set | query | optional | integer | For custom roles which is available on the Enterprise plan and above. You can only filter by one role ID per request |
| external_id | query | optional | string | List users by external id. External id has to be unique for each user under the same account. |
Success response
GET /api/v2/users
/api/v2/users
application/json
UserRequest
| Property | Type | Required |
|---|---|---|
| user | object | required |
Created response
POST /api/v2/users
/api/v2/users/autocomplete
Returns an array of users whose name starts with the value specified in the name parameter.
It only returns users with no foreign identities.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| name | query | required | string | The name to search for the user. |
| field_id | query | optional | string | The id of a lookup relationship field. The type of field is determined |
| source | query | optional | string | If a |
Success response
GET /api/v2/users/autocomplete
/api/v2/users/count
Returns an approximate count of users. If the count exceeds 100,000, it is updated every 24 hours.
The response includes a refreshed_at property in a count object that contains a timestamp indicating when the count was last updated.
Note: When the count exceeds 100,000, the refreshed_at property may occasionally be null.
This indicates that the count is being updated in the background. The count object’s value property is limited to 100,000 until the update is complete.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| role | query | optional | string | Filters the results by role. Possible values are “end-user”, “agent”, or “admin” |
| role[] | query | optional | string | Filters the results by more than one role using the format |
| permission_set | query | optional | integer | For custom roles which is available on the Enterprise plan and above. You can only filter by one role ID per request |
Success response
GET /api/v2/users/count
/api/v2/users/create_many
Accepts an array of up to 100 user objects.
Note: To protect the data in your Zendesk account, bulk user imports are not enabled by default in Zendesk accounts. The account owner must contact Zendesk Customer Support to enable the imports. A 403 Forbidden
error is returned if data imports are not enabled.
You can assign a user to an existing organization by setting an
organization_id property in the user object.
This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.
application/json
UsersRequest
| Property | Type | Required |
|---|---|---|
| users | array | required |
Success response
POST /api/v2/users/create_many
/api/v2/users/create_or_update
Creates a user if the user does not already exist, or updates an existing user
identified by e-mail address or external ID.
If you don’t specify a role parameter, the new user is assigned the role of end user.
If you need to create users without sending out a verification email, include a "skip_verify_email": true property in the body.
When providing an external id to identify an existing user to update, the search for the user record is not case sensitive.
However, if an existing user is found, the system will update the user’s external id to match the case of the external id used to find the user.
application/json
UserRequest
| Property | Type | Required |
|---|---|---|
| user | object | required |
Successful response, when user exits
Created response, when user is new
POST /api/v2/users/create_or_update
/api/v2/users/create_or_update_many
Accepts an array of up to 100 user objects. For each user, the user is created if it does not
already exist, or the existing user is updated.
Note: To protect the data in your Zendesk account, bulk user imports are not enabled by default in Zendesk accounts. The account owner must contact Zendesk Customer Support to enable the imports. A 403 Forbidden
error is returned if data imports are not enabled.
Each individual user object can identify an existing user by email or by external_id.
This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.
application/json
UsersRequest
| Property | Type | Required |
|---|---|---|
| users | array | required |
Success response
POST /api/v2/users/create_or_update_many
/api/v2/users/destroy_many
Accepts a comma-separated list of up to 100 user ids.
The request takes an ids or an external_ids query parameter.
This endpoint returns a job_status JSON object and queues a background job to do the work. Use the Show Job Status endpoint to check for the job’s completion. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | string | Id of the users to delete. Comma separated |
| external_ids | query | optional | string | External Id of the users to delete. Comma separated |
Success response
DELETE /api/v2/users/destroy_many
/api/v2/users/logout_many
Accepts a comma-separated list of up to 100 user ids.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | string | Accepts a comma-separated list of up to 100 user ids. |
Accepted response
POST /api/v2/users/logout_many
/api/v2/users/me
The endpoint returns user information and an authenticity_token.
Zendesk API calls made by end users from a Zendesk help center must include authenticity_token in the X-CSRF-Token HTTP header. This helps prevent cross-site request forgery (CSRF) attacks.
For an example using an authenticity token, see the AJAX request in the Upgrading from Templating API v1 documentation.
Success response
GET /api/v2/users/me