/api/v2/users/{user_id}/group_memberships/{group_membership_id}/make_default
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
| group_membership_id | path | optional | integer | The ID of the group membership |
Success response
PUT /api/v2/users/{user_id}/group_memberships/{group_membership_id}/make_default
/api/v2/group_slas/policies
Success response
GET /api/v2/group_slas/policies
/api/v2/group_slas/policies
Created response
POST /api/v2/group_slas/policies
/api/v2/group_slas/policies/definitions
Success response
GET /api/v2/group_slas/policies/definitions
/api/v2/group_slas/policies/reorder
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_sla_policy_ids | query | optional | array | The ids of the Group SLA policies to reorder |
Success response
PUT /api/v2/group_slas/policies/reorder
/api/v2/group_slas/policies/{group_sla_policy_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_sla_policy_id | path | optional | integer | The id of the Group SLA policy |
No Content response
DELETE /api/v2/group_slas/policies/{group_sla_policy_id}
/api/v2/group_slas/policies/{group_sla_policy_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_sla_policy_id | path | optional | integer | The id of the Group SLA policy |
Success response
GET /api/v2/group_slas/policies/{group_sla_policy_id}
/api/v2/group_slas/policies/{group_sla_policy_id}
Updates the specified policy.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_sla_policy_id | path | optional | integer | The id of the Group SLA policy |
Success response
PUT /api/v2/group_slas/policies/{group_sla_policy_id}
/api/v2/groups
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 |
| exclude_deleted | query | optional | boolean | Whether to exclude deleted entities |
Success response
GET /api/v2/groups
/api/v2/groups
Created response
POST /api/v2/groups
/api/v2/groups/assignable
See Pagination.
Returns a maximum of 100 records per page.
Success response
GET /api/v2/groups/assignable
/api/v2/groups/count
Returns an approximate count of groups. 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.
Note: When the count exceeds 100,000, refreshed_at 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.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user_id | path | optional | integer | The id of the user |
Success response
GET /api/v2/groups/count
/api/v2/groups/{group_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_id | path | optional | integer | The ID of the group |
No content response
DELETE /api/v2/groups/{group_id}
/api/v2/groups/{group_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_id | path | optional | integer | The ID of the group |
Success response
GET /api/v2/groups/{group_id}
/api/v2/groups/{group_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| group_id | path | optional | integer | The ID of the group |
Success response
PUT /api/v2/groups/{group_id}
/api/v2/incremental/organizations
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
Success response
GET /api/v2/incremental/organizations
/api/v2/incremental/ticket_events
Returns a stream of changes that occurred on tickets. Each event is tied
to an update on a ticket and contains all the fields that were updated in that
change. For more information, see:
You can include comments in the event stream by using the comment_events
sideload. See Sideloading below. If you don’t specify the sideload, any comment
present in the ticket update is described only by Boolean comment_present
and comment_public object properties in the event’s child_events array.
The comment itself is not included.
The endpoint supports the comment_events sideload. Any comment present in the ticket
update is listed as an object in the event’s child_events array. Example:
"child_events": [
{
"id": 91048994488,
"via": {
"channel": "api",
"source": {"from":{},"to":{},"rel":null}},
"via_reference_id":null,
"type": "Comment",
"author_id": 5031726587,
"body": "This is a comment",
"html_body": "<div class="zd-comment"><p dir="auto">This is a comment</p>",
"public": true,
"attachments": [],
"audit_id": 91048994468,
"created_at": "2009-06-25T10:15:18Z",
"event_type": "Comment"
},
...
],
...
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
Success response
GET /api/v2/incremental/ticket_events
/api/v2/incremental/tickets
Returns the tickets that changed since the start time. For more information,
see Exporting tickets in Using the Incremental Exports API.
This endpoint supports time-based incremental exports.
For more information, see Time-based incremental exports in Using the Incremental Exports API. You can also return tickets using cursor-based pagination. See Incremental Ticket Export, Cursor Based.
The results include tickets that were updated by the system. See
Excluding system-updated tickets in Using the Incremental Exports API.
The endpoint can return tickets with an updated_at time that’s earlier than the
start_time time. The reason is that the API compares the start_time with the ticket’s
generated_timestamp value, not its updated_at value. The updated_at value is
updated only if the update generates a ticket event.
The generated_timestamp value is updated for all ticket updates, including system
updates. If a system update occurs after a ticket event, the unchanged
updated_at time will become earlier relative to the updated generated_timestamp
time.
See Tickets sideloads. For performance reasons,
last_audits sideloads aren’t supported.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
Success response
GET /api/v2/incremental/tickets
/api/v2/incremental/tickets/cursor
Returns the tickets that changed since the start time. For more information,
see Exporting tickets in Using the Incremental Exports API.
This endpoint supports cursor-based incremental exports.
Cursor-based exports are highly encouraged because they provide more consistent performance and
response body sizes. For more information, see Cursor-based incremental exports in Using the Incremental Exports API.
See Tickets sideloads. For performance reasons,
last_audits sideloads aren’t supported.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
| cursor | query | optional | string | The cursor pointer to work with for all subsequent exports after the initial request |
Success response
GET /api/v2/incremental/tickets/cursor
/api/v2/incremental/users
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
| per_page | query | optional | integer | The number of records to return per page |
Success response
GET /api/v2/incremental/users
/api/v2/incremental/users/cursor
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
| cursor | query | optional | string | The cursor pointer to work with for all subsequent exports after the initial request |
| per_page | query | optional | integer | The number of records to return per page |
Success response
GET /api/v2/incremental/users/cursor
/api/v2/incremental/{incremental_resource}/sample
Use this endpoint to test the incremental export format. It’s more strict in terms of rate limiting,
at 10 requests per 20 minutes instead of 10 requests per minute. It also returns only up to 50
results per request. Otherwise, it’s identical to the above APIs.
Use the incremental_resource parameter to specify the resource. Possible values are “tickets”, “ticket_events”, “users”, or “organizations”.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start_time | query | optional | integer | The time to start the incremental export from. Must be at least one minute in the past. Data isn’t provided for the most recent minute |
| incremental_resource | path | optional | string | The resource requested for incremental sample export |
Success response
GET /api/v2/incremental/{incremental_resource}/sample
/api/v2/incremental/routing/attribute_values
Returns a stream of changes that occurred on routing attribute values.
Optional
| Name | Type | Comment |
|---|---|---|
| cursor | string | The cursor parameter is a non-human-readable argument you can use to move forward or backward in time. The cursor is a read-only URL parameter that’s only available in API responses. See Pagination. |
Success response
GET /api/v2/incremental/routing/attribute_values
/api/v2/incremental/routing/attributes
Returns a stream of changes that occurred on routing attributes.
Optional
| Name | Type | Comment |
|---|---|---|
| cursor | string | The cursor parameter is a non-human-readable argument you can use to move forward or backward in time. The cursor is a read-only URL parameter that’s only available in API responses. See Pagination. |
Success response
GET /api/v2/incremental/routing/attributes
/api/v2/incremental/routing/instance_values
Returns a stream of changes that occurred on routing instance values. Changes are grouped by attribute_value_id,
with unassociate type events listed with associate type events by the associate event’s timestamp.
Optional
| Name | Type | Comment |
|---|---|---|
| cursor | string | The cursor parameter is a non-human-readable argument you can use to move forward or backward in time. The cursor is a read-only URL parameter that’s only available in API responses. See Pagination. |
Success response
GET /api/v2/incremental/routing/instance_values
/api/v2/job_statuses
Shows the statuses for background jobs. Statuses are sorted first by completion date and then by creation date in descending order.
See Pagination.
Success Response
GET /api/v2/job_statuses
/api/v2/job_statuses/show_many
Accepts a comma-separated list of job status ids.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | required | string | Comma-separated list of job status ids. |
Success Response
GET /api/v2/job_statuses/show_many
/api/v2/job_statuses/{job_status_id}
Shows the status of a background job.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| job_status_id | path | optional | string | the Id of the Job status |
Success Response
GET /api/v2/job_statuses/{job_status_id}
/api/v2/locales
Lists the translation locales available for the account.
Note: You can alter the list by passing an updated locale_ids array to the Update Account Settings endpoint.
Success response
GET /api/v2/locales
/api/v2/locales/agent
Lists the translation locales that have been localized for agents on a specific account.
Success response
GET /api/v2/locales/agent
/api/v2/locales/current
This works like Show Locale, but instead of taking a locale id as an argument, it renders the locale of the user performing the request.
Success response
GET /api/v2/locales/current
/api/v2/locales/detect_best_locale
Success response
GET /api/v2/locales/detect_best_locale
/api/v2/locales/public
Lists the translation locales that are available to all accounts.
Success response
GET /api/v2/locales/public
/api/v2/locales/{locale_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| locale_id | path | optional | string | The ID or the BCP-47 code of the locale. Examples: es-419, en-us, pr-br |
Success Response
GET /api/v2/locales/{locale_id}
/api/v2/relationships/definitions/{target_type}
Returns filter definitions based on the given target type. Target types
include users (zen:user), tickets (zen:ticket), organizations (zen:organization), or custom objects (zen:custom_object:CUSTOM_OBJECT_KEY).
The returned filter definitions are the options that you can use to build a custom field or ticket field’s
relationship_filter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| target_type | path | required | string | The target type for which you would like to see filter definitions. |
| source_type | query | optional | string | The source type for which you would like to see filter definitions. |
Success response
GET /api/v2/relationships/definitions/{target_type}
/api/v2/{target_type}/{target_id}/relationship_fields/{field_id}/{source_type}
Returns a list of source objects whose values are populated with the id of a related target object. For example,
if you have a lookup field called “Success Manager” on a ticket, this endpoint can answer the question,
“What tickets (sources) is this user (found by target_type and target_id)
assigned as the ‘Success Manager’ (field referenced by field_id)?”
See Pagination.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| target_type | path | required | string | The type of object the relationship field is targeting. |
| target_id | path | required | integer | The id of the object the relationship field is targeting |
| field_id | path | required | integer | The id of the lookup relationship field |
| source_type | path | required | string | The type of object the relationship field belongs to (example. ticket field belongs to a ticket object). |
Success response
GET /api/v2/{target_type}/{target_id}/relationship_fields/{field_id}/{source_type}
/api/v2/macros
Lists all shared and personal macros available to the current user. For admins, the API returns all macros for the account, including the personal macros of agents and other admins.
See Pagination.
Returns a maximum of 100 records per page.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| include | query | optional | string | A sideload to include in the response. See Sideloads |
| access | query | optional | string | Filter macros by access. Possible values are “personal”, “agents”, “shared”, or “account”. The “agents” value returns all personal macros for the account’s agents and is only available to admins. |
| active | query | optional | boolean | Filter by active macros if true or inactive macros if false |
| category | query | optional | integer | Filter macros by category |
| group_id | query | optional | integer | Filter macros by group |
| only_viewable | query | optional | boolean | If true, returns only macros that can be applied to tickets. If false, returns all macros the current user can manage. Default is false |
| sort_by | query | optional | string | Possible values are alphabetical, “created_at”, “updated_at”, “usage_1h”, “usage_24h”, “usage_7d”, or “usage_30d”. Defaults to alphabetical |
| sort_order | query | optional | string | One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others |
Success Response
GET /api/v2/macros
/api/v2/macros
application/json
MacrosCreateNewMacroRequest
| 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
POST /api/v2/macros
/api/v2/macros/actions
Success Response
GET /api/v2/macros/actions
/api/v2/macros/active
Lists all active shared and personal macros available to the current user.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| include | query | optional | string | A sideload to include in the response. See Sideloads |
| access | query | optional | string | Filter macros by access. Possible values are “personal”, “agents”, “shared”, or “account”. The “agents” value returns all personal macros for the account’s agents and is only available to admins. |
| category | query | optional | integer | Filter macros by category |
| group_id | query | optional | integer | Filter macros by group |
| sort_by | query | optional | string | Possible values are alphabetical, “created_at”, “updated_at”, “usage_1h”, “usage_24h”, “usage_7d”, or “usage_30d”. Defaults to alphabetical |
| sort_order | query | optional | string | One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others |
Success Response
GET /api/v2/macros/active
/api/v2/macros/attachments
Allows an attachment to be uploaded that can be associated with a macro at a later time.
Note: To ensure an uploaded attachment is not lost, associate it with a macro as soon as possible. From time to time, old attachments that are not not associated with any macro are purged.
Created Response
POST /api/v2/macros/attachments
/api/v2/macros/attachments/{attachment_id}
Shows the properties of the specified macro attachment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| attachment_id | path | optional | integer | The ID of the attachment |
Success Response
GET /api/v2/macros/attachments/{attachment_id}
/api/v2/macros/categories
Lists all macro categories available to the current user.
Success Response
GET /api/v2/macros/categories
/api/v2/macros/definitions
Returns the definitions of the actions a macro can perform. For example,
one action can set the status of a ticket. The definition of the action
includes a title (“Status”), a type (“list”), and possible values. For a
list of support actions, see Actions reference.
Success Response
GET /api/v2/macros/definitions
/api/v2/macros/destroy_many
Deletes the macros corresponding to the provided comma-separated list of IDs.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| ids | query | required | array | The IDs of the macros to delete |
No Content
DELETE /api/v2/macros/destroy_many
/api/v2/macros/new
Returns an unpersisted macro representation derived from a ticket or macro.
The endpoint takes one of the following query parameters: macro_id or ticket_id. If you include both, macro_id is used.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | query | optional | integer | The ID of the macro to replicate |
| ticket_id | query | required | integer | The ID of the ticket from which to build a macro replica |
Success Response
GET /api/v2/macros/new
/api/v2/macros/search
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| include | query | optional | string | A sideload to include in the response. See Sideloads |
| access | query | optional | string | Filter macros by access. Possible values are “personal”, “agents”, “shared”, or “account”. The “agents” value returns all personal macros for the account’s agents and is only available to admins. |
| active | query | optional | boolean | Filter by active macros if true or inactive macros if false |
| category | query | optional | integer | Filter macros by category |
| group_id | query | optional | integer | Filter macros by group |
| only_viewable | query | optional | boolean | If true, returns only macros that can be applied to tickets. If false, returns all macros the current user can manage. Default is false |
| sort_by | query | optional | string | Possible values are alphabetical, “created_at”, “updated_at”, “usage_1h”, “usage_24h”, “usage_7d”, or “usage_30d”. Defaults to alphabetical |
| sort_order | query | optional | string | One of “asc” or “desc”. Defaults to “asc” for alphabetical and position sort, “desc” for all others |
| query | query | optional | string | Query string used to find macros with matching titles |
Success Response
GET /api/v2/macros/search
/api/v2/macros/update_many
Updates the provided macros with the specified changes.
application/json
MacroUpdateManyInput
| Property | Type | Required |
|---|---|---|
| macros | array | optional |
| └ id | integer | required |
| └ active | boolean | optional |
| └ position | integer | optional |
Success Response
PUT /api/v2/macros/update_many
/api/v2/macros/{macro_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
No Content
DELETE /api/v2/macros/{macro_id}
/api/v2/macros/{macro_id}
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| macro_id | path | optional | integer | The ID of the macro |
Success Response
GET /api/v2/macros/{macro_id}