/api/v2/macros/{macro_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
application/json
MacrosUpdateMacroAgentRequest
| Property | Type | Required |
|---|---|---|
| macro | object | optional |
| └ title | string | required |
| └ active | boolean | optional |
| └ actions | array | required |
| └ field | string | optional |
| └ value | string | optional |
| └ description | string | optional |
| └ restriction | object | optional |
| └ id | integer | optional |
| └ ids | array | optional |
| └ type | string | optional |
OK
PUT /api/v2/macros/{macro_id}
/api/v2/macros/{macro_id}/apply
Returns the changes the macro would make to a ticket. It doesn’t actually
change a ticket. You can use the response data in a subsequent API call
to the Tickets endpoint to update the ticket.
The response includes only the ticket fields that would be changed by the
macro. To get the full ticket object after the macro is applied,
see Show Ticket After Changes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
Success Response
GET /api/v2/macros/{macro_id}/apply
/api/v2/macros/{macro_id}/attachments
Lists the attachments associated with a macro.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
Success Response
GET /api/v2/macros/{macro_id}/attachments
/api/v2/macros/{macro_id}/attachments
Allows an attachment to be uploaded and associated with a macro at the same time.
Note: A macro can be associated with up to five attachments.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
Success Response
POST /api/v2/macros/{macro_id}/attachments
/api/v2/tickets/{ticket_id}/macros/{macro_id}/apply
Returns the full ticket object as it would be after applying the macro to the ticket.
It doesn’t actually change the ticket.
To get only the ticket fields that would be changed by the macro,
see Show Changes to Ticket.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
| ticket_id | path | required | integer | The ID of the ticket |
Success Response
GET /api/v2/tickets/{ticket_id}/macros/{macro_id}/apply
/api/v2/queues
Success response
GET /api/v2/queues
/api/v2/queues
Created response
POST /api/v2/queues
/api/v2/queues/definitions
Success response
GET /api/v2/queues/definitions
/api/v2/queues/{queue_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| queue_id | path | optional | string | The id of the omnichannel routing queue |
No content response
DELETE /api/v2/queues/{queue_id}
/api/v2/queues/{queue_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| queue_id | path | optional | string | The id of the omnichannel routing queue |
Success response
GET /api/v2/queues/{queue_id}
/api/v2/queues/{queue_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| queue_id | path | optional | string | The id of the omnichannel routing queue |
Success response
PUT /api/v2/queues/{queue_id}
/api/v2/organization_fields
Returns a list of custom organization fields in your account. Fields are returned in the order that you specify in your organization fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each organization field to the values returned under the organization_fields attribute on the organization resource.
See Pagination.
Returns a maximum of 100 records per page.
Success response
GET /api/v2/organization_fields
/api/v2/organization_fields
Creates any of the following custom field types:
See About custom field types in Zendesk help.
Created response
POST /api/v2/organization_fields
/api/v2/organization_fields/reorder
Success response
PUT /api/v2/organization_fields/reorder
/api/v2/organization_fields/{organization_field_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_field_id | path | optional | The ID or key of the organization field |
No Content response
DELETE /api/v2/organization_fields/{organization_field_id}
/api/v2/organization_fields/{organization_field_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_field_id | path | optional | The ID or key of the organization field |
Success response
GET /api/v2/organization_fields/{organization_field_id}
/api/v2/organization_fields/{organization_field_id}
Drop-down fields return an array of custom_field_options which specify the name, value, and order of drop-down options. When updating a drop-down field, note the following information:
id along with the name and valueid along with the name and valuecustom_field_options array relative to the other optionscurl https://{subdomain}.zendesk.com/api/v2/organization_fields/{organization_field_id}.json \
-H "Content-Type: application/json" -X PUT \
-d '{"organization_field": {"custom_field_options": [{"id": 124, "name": "Option 2", "value": "option_2"}, {"id": 123, "name": "Option 1", "value": "option_1"}, {"id": 125, "name": "Option 3", "value": "option_3"}]}}' \
-v -u {email_address}:{password}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_field_id | path | optional | The ID or key of the organization field |
Success response
PUT /api/v2/organization_fields/{organization_field_id}
/api/v2/organization_memberships
Returns a list of organization memberships for the account, user or organization in question.
Note: When returning organization memberships for a user, organization memberships are sorted with the default organization first, and then by organization name.
See Pagination.
Returns a maximum of 100 records per page.
Success response
GET /api/v2/organization_memberships
/api/v2/organization_memberships
Assigns a user to a given organization. Returns an error with status 422 if the user is already assigned to the organization.
Created response
POST /api/v2/organization_memberships
/api/v2/organization_memberships/create_many
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.
Success response
POST /api/v2/organization_memberships/create_many
/api/v2/organization_memberships/destroy_many
Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The organization_id of the unassigned tickets is set to null.
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 | array | The IDs of the organization memberships to delete |
Success response
DELETE /api/v2/organization_memberships/destroy_many
/api/v2/organization_memberships/{organization_membership_id}
Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The organization_id of the unassigned tickets is set to null.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_membership_id | path | optional | integer | The ID of the organization membership |
No Content response
DELETE /api/v2/organization_memberships/{organization_membership_id}
/api/v2/organization_memberships/{organization_membership_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_membership_id | path | optional | integer | The ID of the organization membership |
Success response
GET /api/v2/organization_memberships/{organization_membership_id}
/api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default
Sets the default organization membership of a given user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| organization_membership_id | path | optional | integer | The ID of the organization membership |
Success response
PUT /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default
/api/v2/users/{user_id}/organizations/{organization_id}
Immediately removes a user from an organization and schedules a job to unassign all working tickets currently assigned to the user and organization combination. The organization_id of the unassigned tickets is set to null.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
| user_id | path | optional | integer | The id of the user |
No Content response
DELETE /api/v2/users/{user_id}/organizations/{organization_id}
/api/v2/users/{user_id}/organizations/{organization_id}/make_default
Sets the default organization membership of a given user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| organization_id | path | optional | integer | The ID of an organization |
Success response
PUT /api/v2/users/{user_id}/organizations/{organization_id}/make_default
/api/v2/organization_subscriptions
See Pagination.
Returns a maximum of 100 records per page.
For end users, the response will only list the subscriptions created by the requesting end user.
Successful response
GET /api/v2/organization_subscriptions
/api/v2/organization_subscriptions
End users can only subscribe to shared organizations in which they’re members.
application/json
OrganizationSubscriptionCreateRequest
| Property | Type | Required |
|---|---|---|
| organization_subscription | object | optional |
| └ user_id | integer | optional |
| └ organization_id | integer | optional |
Successful response
POST /api/v2/organization_subscriptions
/api/v2/organization_subscriptions/{organization_subscription_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_subscription_id | path | optional | integer | The ID of the organization subscription |
No content
DELETE /api/v2/organization_subscriptions/{organization_subscription_id}
/api/v2/organization_subscriptions/{organization_subscription_id}
For end users, the response will only list the subscriptions created by the requesting end user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_subscription_id | path | optional | integer | The ID of the organization subscription |
Successful response
GET /api/v2/organization_subscriptions/{organization_subscription_id}
/api/v2/organization_merges/{organization_merge_id}
Retrieves the details of a specific organization merge operation. This endpoint is useful for obtaining the status and outcome of a merge that was previously initiated. It provides information such as the winning and losing organization IDs, the status of the merge, and the associated URLs.
This endpoint can be used to determine if a merge is still in progress, has completed successfully, or has encountered an error.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_merge_id | path | optional | string | The ID of the organization merge |
Success response
GET /api/v2/organization_merges/{organization_merge_id}
/api/v2/organizations
See Pagination.
Returns a maximum of 100 records per page.
If the agent has a custom agent role that restricts their access to only users in their own organization, a 403 Forbidden error is returned. See Creating custom agent roles in Zendesk help.
Success response
GET /api/v2/organizations
/api/v2/organizations
You must provide a unique name for each organization. Normally
the system doesn’t allow records to be created with identical names.
However, a race condition can occur if you make two or more identical
POSTs very close to each other, causing the records to have identical
organization names.
Created
POST /api/v2/organizations
/api/v2/organizations/autocomplete
Returns an array of organizations whose name starts with the
value specified in the name parameter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| name | query | optional | string | A substring of an organization to search for |
| 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
Bad request
Too Many Requests
Internal Server Error
GET /api/v2/organizations/autocomplete
/api/v2/organizations/count
Returns an approximate count of organizations. If the count exceeds
100,000, it is updated every 24 hours.
The refreshed_at property of the count object is a timestamp that indicates
when the count was last updated.
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 and the value property of the count object is limited to
100,000 until the update is complete.
Success response
GET /api/v2/organizations/count
/api/v2/organizations/create_many
Accepts an array of up to 100 organization objects.
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.
Success response
POST /api/v2/organizations/create_many
/api/v2/organizations/create_or_update
Creates an organization if it doesn’t already exist, or updates
an existing organization. Using this method means one less call
to check if an organization exists before creating it. You need
to specify the id or external id when updating
an organization to avoid a duplicate error response. Name is
not available as a matching criteria.
Success response
Created response
POST /api/v2/organizations/create_or_update
/api/v2/organizations/destroy_many
Accepts a comma-separated list of up to 100 organization ids or external ids.
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 | A list of organization ids |
| external_ids | query | optional | string | A list of external ids |
Success response
DELETE /api/v2/organizations/destroy_many
/api/v2/organizations/search
Returns an array of organizations matching the criteria. You may search by an organization’s external_id or name, but not both:
external_idIf you set the external_id value of an organization to associate it to an external record, you can use it to search for the organization.
For an organization to be returned, its external_id must exactly match the value provided (case insensitive).
nameFor an organization to be returned, its name must exactly match the value provided (case insensitive).
See Creating custom agent roles in the Support Help Center.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| external_id | query | optional | integer | The external id of an organization |
| name | query | optional | string | The name of an organization |
Success response
GET /api/v2/organizations/search
/api/v2/organizations/show_many
Accepts a comma-separated list of up to 100 organization ids or external ids.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | string | A list of organization ids |
| external_ids | query | optional | string | A list of external ids |
Success response
GET /api/v2/organizations/show_many
/api/v2/organizations/update_many
Bulk or batch updates up to 100 organizations.
To make the same change to multiple organizations, use the following endpoint and data format:
https://{subdomain}.zendesk.com/api/v2/organizations/update_many.json?ids=1,2,3
{
"organization": {
"notes": "Priority"
}
}
To make different changes to multiple organizations, use the following endpoint and data format:
https://{subdomain}.zendesk.com/api/v2/organizations/update_many.json
{
"organizations": [
{ "id": 1, "notes": "Priority" },
{ "id": 2, "notes": "Normal" }
]
}
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.
Agents with no permissions restrictions can only update “notes” on organizations.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | optional | string | A list of organization ids |
| external_ids | query | optional | string | A list of external ids |
Success response
PUT /api/v2/organizations/update_many
/api/v2/organizations/{organization_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
No Content Response
DELETE /api/v2/organizations/{organization_id}
/api/v2/organizations/{organization_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
Success response
GET /api/v2/organizations/{organization_id}
/api/v2/organizations/{organization_id}
Agents with no permissions restrictions can only update “notes” on organizations.
Note: Updating an organization’s domain_names property overwrites all existing domain_names values. To prevent this, submit a complete list of domain_names for the organization in your request.
{
"organization": {
"notes": "Something interesting"
}
}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
Success response
Too Many Requests
PUT /api/v2/organizations/{organization_id}
/api/v2/organizations/{organization_id}/merge
Merges two organizations by moving all users, tickets, and domain names from the organization specified by {organization_id} to the organization specified by winner_id. After the merge:
Organization Merge record which contains a status indicating the progress of the merge.Note: This operation is irreversible.
| Status | Description |
|---|---|
| new | A job has been queued to merge the two organizations. |
| in progress | The job to merge the two organizations has started. |
| error | An error occurred during the merge job. The merge can be retried by repeating the API call. |
| complete | The merge has been completed successfully. |
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
application/json
OrganizationMergeRequest
| Property | Type | Required |
|---|---|---|
| organization_merge | object | optional |
| └ winner_id | integer | optional |
Success response
PUT /api/v2/organizations/{organization_id}/merge
/api/v2/organizations/{organization_id}/merges
Retrieves a list of all organization merge operations associated with a given organization. This endpoint allows you to track the history of merge actions for an organization, including ongoing and completed merges.
Each entry in the list contains details such as the ID of the merge, the winning and losing organization IDs, the current status of the merge, and a URL to access the Organization Merge record.
See Pagination for more details.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
Success response
GET /api/v2/organizations/{organization_id}/merges
/api/v2/organizations/{organization_id}/related
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| organization_id | path | optional | integer | The ID of an organization |
Success response
GET /api/v2/organizations/{organization_id}/related
/api/v2/push_notification_devices/destroy_many
Unregisters the mobile devices that are receiving push notifications. Specify the devices as an array of mobile device tokens.
application/json
PushNotificationDevicesRequest
| Property | Type | Required |
|---|---|---|
| push_notification_devices | array | optional |
Successful response
POST /api/v2/push_notification_devices/destroy_many
/api/v2/requests
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sort_by | query | optional | string | Possible values are “updated_at”, “created_at” |
| sort_order | query | optional | string | One of “asc”, “desc”. Defaults to “asc” |
Success response
GET /api/v2/requests
/api/v2/requests
Accepts a request object that sets one or more properties.
In addition to the writable request properties in the JSON Format table above, you can set the following properties when creating a request.
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| comment | object | yes | Describes the problem, incident, question, or task. See Request comments |
| collaborators | array | no | Adds collaborators (cc’s) to the request. An email notification is sent to them when the ticket is created. See Setting collaborators |
| requester | object | yes* | *Required for anonymous requests. Specifies the requester of the anonymous request. See Creating anonymous requests |
Once a ticket is closed (as distinct from solved), it can’t be reopened. However, you can create a new request that references the closed ticket. To create the follow-up request, include a via_followup_source_id property in the request object that specifies the closed ticket. The parameter only works with closed tickets. It has no effect with other tickets.
Created response
POST /api/v2/requests