Customobjectrecords 10 endpoints

DELETE /api/v2/custom_objects/{custom_object_key}/records

Deletes a record with the specified external id.

Allowed For

  • Agents
operationId: CustomObjectRecords_deleteByExternalId

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

external_id query optional string

The external id of a custom object record

Responses

204

No content response

DELETE /api/v2/custom_objects/{custom_object_key}/records
GET /api/v2/custom_objects/{custom_object_key}/records

Lists all undeleted custom object records for the specified object

#### Pagination

operationId: CustomObjectRecords_list

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

filter[ids] query optional string

Optional comma-separated list of ids to filter records by. If one or more ids are specified, only matching records are returned. The ids must be unique and are case sensitive.

filter[external_ids] query optional string

Optional comma-separated list of external ids to filter records by. If one or more ids are specified, only matching records are returned. The ids must be unique and are case sensitive.

sort query optional string

One of id, updated_at, -id, or -updated_at. The - denotes the sort will be descending.

page[before] query optional string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can’t be used together in the same request.

page[after] query optional string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can’t be used together in the same request.

page[size] query optional integer

Specifies how many records should be returned in the response. You can specify up to 100 records per page.

Responses

200

Success response

GET /api/v2/custom_objects/{custom_object_key}/records
PATCH /api/v2/custom_objects/{custom_object_key}/records

If a record exists for the given external id, updates it. Only the specified attributes are updated. Otherwise, creates a new record with the provided external id and attributes.

Allowed For

  • Agents
operationId: CustomObjectRecords_setByExternalId

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

external_id query optional string

The external id of a custom object record

Request Body

application/json
schema CustomObjectRecordsUpsertRequest
Property Type Required
custom_object_record object optional
id string optional
url string optional
name string required
created_at string optional
updated_at string optional
external_id string optional
custom_object_key string optional
created_by_user_id string optional
updated_by_user_id string optional
custom_object_fields object optional

Responses

200

Success

PATCH /api/v2/custom_objects/{custom_object_key}/records
POST /api/v2/custom_objects/{custom_object_key}/records

Creates a custom object record according to all the properties described by a custom object definition

Allowed For

  • Agents
operationId: CustomObjectRecords_createNewRecord

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

Request Body

application/json
schema CustomObjectRecordsCreateRequest
Property Type Required
custom_object_record object optional
id string optional
url string optional
name string required
created_at string optional
updated_at string optional
external_id string optional
custom_object_key string optional
created_by_user_id string optional
updated_by_user_id string optional
custom_object_fields object optional

Responses

201

Created

POST /api/v2/custom_objects/{custom_object_key}/records
GET /api/v2/custom_objects/{custom_object_key}/records/autocomplete

Retrieves an array of custom object records that have a field value that matches the value specified in the name parameter.

Pagination

  • Cursor pagination only.
  • Returns the first 10,000 records sorted by relevancy with page limits.

    Allowed For

  • Agents
operationId: CustomObjectRecords_autocompleteSearch

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

name query optional string

Part of a name of the record you are searching for

page[before] query optional string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can’t be used together in the same request.

page[after] query optional string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can’t be used together in the same request.

page[size] query optional integer

The number of records to return in the response. You can specify up to 100 records per page.

field_id query optional string

The id of the lookup field. If the field has a relationship filter, the filter is applied to the results. Must be used with source param.

source query optional string

One of “zen:user”, “zen:ticket”, “zen:organization”, or “zen:custom_object:CUSTOM_OBJECT_KEY”. Represents the object field_id belongs to. Must be used with field_id param.

requester_id query optional integer

The id of the requester. For use with dynamic filters.

assignee_id query optional integer

The id of the selected assignee. For use with dynamic filters.

organization_id query optional integer

The id of the organization the requester belongs to. For use with dynamic filters.

Responses

200

Success response

GET /api/v2/custom_objects/{custom_object_key}/records/autocomplete
GET /api/v2/custom_objects/{custom_object_key}/records/count

Returns a total count of records for a specific custom object as well as the time the count was refreshed.

Allowed For

  • Agents
operationId: CustomObjectRecords_getCount

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

Responses

200

Success response

GET /api/v2/custom_objects/{custom_object_key}/records/count
GET /api/v2/custom_objects/{custom_object_key}/records/search

Returns an array of custom object records that meet the search criteria

Pagination

  • Cursor pagination only.
  • Returns the records sorted by relevancy with page limits. Without a sort parameter, only the first 10,000 records are returned. With a sort parameter, all records are returned.

    Allowed For

  • Agents
operationId: CustomObjectRecords_search

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

query query optional string

The query parameter is used to search text-based fields for records that match specific query terms.
The query can be multiple words or numbers. Every record that matches the beginning of any word or number in the query string is returned.

Fuzzy search is supported for the following text-based field types: : Text fields, Multi Line Text fields, and RegExp fields.

For example, you might want to search for records related to Tesla vehicles: query=Tesla. In this example the API would return every record for the given custom object where any of the supported text fields contain the word ‘Tesla’.

You can include multiple words or numbers in your search. For example: query=Tesla Honda 2020. This search phrase would be URL encoded as query=Tesla%20Honda%202020 and return every record for the custom object for which any of the supported text fields contained ‘Tesla’, ‘Honda’, or ‘2020’.

sort query optional string

One of name, created_at, updated_at, -name, -created_at, or -updated_at. The - denotes the sort will be descending. Defaults to sorting by relevance.

page[before] query optional string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can’t be used together in the same request.

page[after] query optional string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can’t be used together in the same request.

page[size] query optional integer

Specifies how many records should be returned in the response. You can specify up to 100 records per page.

Responses

200

Success response

GET /api/v2/custom_objects/{custom_object_key}/records/search
DELETE /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}

Deletes a record with the specified id

Allowed For

  • Agents
operationId: CustomObjectRecords_deleteRecordById

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

custom_object_record_id path optional string

The id of a custom object record

Responses

204

No content response

DELETE /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}
GET /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}

Returns a custom record for a specific object using a provided id.

Allowed For

  • Agents
operationId: CustomObjectRecords_getById

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

custom_object_record_id path optional string

The id of a custom object record

Responses

200

Custom Object Record

GET /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}
PATCH /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}

Updates an individual custom object record. The updating rules are as follows:

  • Takes a custom_object_record object that specifies the properties to update
  • The custom object fields should be nested inside a custom_object_fields object

    Allowed For

  • Agents
operationId: CustomObjectRecords_updateFields

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

custom_object_record_id path optional string

The id of a custom object record

Responses

200

Success response

PATCH /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}

Customobjects 6 endpoints

GET /api/v2/custom_objects

Lists all undeleted custom objects for the account

Allowed For

  • Agents
operationId: CustomObjects_listUndeleted

Responses

200

Success response

GET /api/v2/custom_objects
POST /api/v2/custom_objects

Creates an object describing all the properties required to create a custom object record

Allowed For

  • Admins
operationId: CustomObjects_createCustomObjectRecord

Request Body

application/json
schema CustomObjectsCreateRequest
Property Type Required
custom_object object optional
key string optional
title string optional
title_pluralized string optional

Responses

201

Created

POST /api/v2/custom_objects
GET /api/v2/custom_objects/limits/object_limit

List the current count and the limit for custom objects

Allowed For

  • Admins
operationId: CustomObjects_getLimit

Responses

200

Success response

GET /api/v2/custom_objects/limits/object_limit
DELETE /api/v2/custom_objects/{custom_object_key}

Permanently deletes the custom object with the specified key

Allowed For

  • Admins
operationId: CustomObjects_deleteObject

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

Responses

204

No content response

DELETE /api/v2/custom_objects/{custom_object_key}
GET /api/v2/custom_objects/{custom_object_key}

Returns an object with the specified key

Allowed For

  • Agents
operationId: CustomObjects_getByKey

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

Responses

200

Custom Object

GET /api/v2/custom_objects/{custom_object_key}
PATCH /api/v2/custom_objects/{custom_object_key}

Updates an individual custom object. The updating rules are as follows:

  • Takes a custom_object object that specifies the properties to update
  • The key property cannot be updated

    Allowed For

  • Admins
operationId: CustomObjects_updateObjectProperties

Parameters

Name In Required Type Description
custom_object_key path optional string

The key of a custom object

Responses

200

Success response

PATCH /api/v2/custom_objects/{custom_object_key}

Customroles 5 endpoints

GET /api/v2/custom_roles

Availability

  • Accounts on the Enterprise plan or above

Allowed For

  • Agents
operationId: CustomRoles_listRoles

Responses

200

Success response

GET /api/v2/custom_roles
POST /api/v2/custom_roles

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
  • Agents with the manage_roles permission
operationId: CustomRoles_createRole

Responses

200

Created response

POST /api/v2/custom_roles
DELETE /api/v2/custom_roles/{custom_role_id}

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
  • Agents with the manage_roles permission
operationId: CustomRoles_deleteRole

Parameters

Name In Required Type Description
custom_role_id path optional integer

The ID of the custom agent role

Responses

204

No Contetnt response

DELETE /api/v2/custom_roles/{custom_role_id}
GET /api/v2/custom_roles/{custom_role_id}

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
  • Agents with the manage_roles permission
operationId: CustomRoles_showRole

Parameters

Name In Required Type Description
custom_role_id path optional integer

The ID of the custom agent role

Responses

200

Success response

GET /api/v2/custom_roles/{custom_role_id}
PUT /api/v2/custom_roles/{custom_role_id}

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
    Agents with the manage_roles permission
operationId: CustomRoles_updateRole

Parameters

Name In Required Type Description
custom_role_id path optional integer

The ID of the custom agent role

Responses

200

Success response

PUT /api/v2/custom_roles/{custom_role_id}

Customticketstatuses 5 endpoints

PUT /api/v2/custom_status/default

Updates the default values for many custom ticket statuses at once.

Allowed For

  • Admins
operationId: CustomTicketStatuses_bulkUpdateDefault

Request Body

application/json
schema BulkUpdateDefaultCustomStatusRequest
Property Type Required
ids string optional

Responses

200

Updated

PUT /api/v2/custom_status/default
GET /api/v2/custom_statuses

Lists all undeleted custom ticket statuses for the account. No pagination is provided.

Allowed For

  • End Users
operationId: CustomTicketStatuses_listUndeleted

Parameters

Name In Required Type Description
status_categories query optional string

Filter the list of custom ticket statuses by a comma-separated list of status categories

active query optional boolean

If true, show only active custom ticket statuses. If false, show only inactive custom ticket statuses. If the filter is not used, show all custom ticket statuses

default query optional boolean

If true, show only default custom ticket statuses. If false, show only non-default custom ticket statuses. If the filter is not used, show all custom ticket statuses

Responses

200

List custom ticket statuses

GET /api/v2/custom_statuses
POST /api/v2/custom_statuses

Takes a custom_status object that specifies the custom ticket status properties to create.

Allowed For

  • Admins
operationId: CustomTicketStatuses_createNewStatus

Request Body

application/json
schema CustomStatusCreateRequest
Property Type Required
custom_status object optional
active boolean optional
agent_label string optional
description string optional
end_user_label string optional
end_user_description string optional
status_category string optional

Responses

201

Created

POST /api/v2/custom_statuses
GET /api/v2/custom_statuses/{custom_status_id}

Returns the custom ticket status object.

Allowed For

  • End Users
operationId: CustomTicketStatuses_getObject

Parameters

Name In Required Type Description
custom_status_id path optional integer

The id of the custom status

Responses

200

Custom Status

GET /api/v2/custom_statuses/{custom_status_id}
PUT /api/v2/custom_statuses/{custom_status_id}

Takes a custom_status object that specifies the properties to update.

Allowed For

  • Admins
operationId: CustomTicketStatuses_updateStatus

Parameters

Name In Required Type Description
custom_status_id path optional integer

The id of the custom status

Request Body

application/json
schema CustomStatusUpdateRequest
Property Type Required
custom_status object optional
active boolean optional
agent_label string optional
description string optional
end_user_label string optional
end_user_description string optional

Responses

200

Updated

PUT /api/v2/custom_statuses/{custom_status_id}

Dynamiccontent 6 endpoints

GET /api/v2/dynamic_content/items

Returns a list of all dynamic content items for your account if accessed as an admin or agents who have permission to manage dynamic content.

Allowed For

  • Admins, Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: DynamicContent_listItems

Responses

200

Success response

GET /api/v2/dynamic_content/items
POST /api/v2/dynamic_content/items

Create a new content item, with one or more variants in the item’s variants array. See Specifying item variants.

The default_locale_id and variant locale_id values must be one of the locales the account has active. You can get the list with the List Locales endpoint.

Allowed For

  • Admins, Agents
operationId: DynamicContent_createItemWithVariants

Responses

201

Created response

POST /api/v2/dynamic_content/items
GET /api/v2/dynamic_content/items/show_many

Stability

  • Development

Allowed For

  • Admins, Agents
operationId: DynamicContent_showManyItems

Parameters

Name In Required Type Description
identifiers query optional string

Identifiers for the dynamic contents

Responses

200

Success response

GET /api/v2/dynamic_content/items/show_many
DELETE /api/v2/dynamic_content/items/{dynamic_content_item_id}

Allowed For

  • Admins, Agents
operationId: DynamicContent_deleteItem

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

204

No Content response

DELETE /api/v2/dynamic_content/items/{dynamic_content_item_id}
GET /api/v2/dynamic_content/items/{dynamic_content_item_id}

Allowed For

  • Admins, Agents
operationId: DynamicContent_showItem

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

200

Success response

GET /api/v2/dynamic_content/items/{dynamic_content_item_id}
PUT /api/v2/dynamic_content/items/{dynamic_content_item_id}

The only attribute you can change is the name.

To add a variant to the item, or to update or delete the variants of the item, use the Item Variants API.

Allowed For

  • Admins, Agents
operationId: DynamicContent_updateItemName

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

200

Success response

PUT /api/v2/dynamic_content/items/{dynamic_content_item_id}

Dynamiccontentitemvariants 7 endpoints

GET /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants

Returns all the variants of the specified dynamic content item.

Allowed For

  • Admins
  • Agents who have permission to manage dynamic content

Pagination

  • Cursor pagination

See Pagination.

operationId: DynamicContentItemVariants_list

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

200

Success response

GET /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants
POST /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants

You can only create one variant for each locale id. If a locale variant already exists, the request is rejected.

Allowed For

  • Admins, Agents
operationId: DynamicContentItemVariants_createNewVariant

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

201

Created response

POST /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants
POST /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/create_many

Allowed For

  • Admins, Agents
operationId: DynamicContentItemVariants_createMany

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

201

Created response

POST /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/create_many
PUT /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/update_many

Updates one or more variants. See Update Variant.

You must specify the variants by id in the body. To get the variant ids, see List Variants.

Allowed For

  • Admins, Agents
operationId: DynamicContentItemVariants_updateMany

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

Responses

200

Success response

PUT /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/update_many
DELETE /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}

Allowed For

  • Admins, Agents
operationId: DynamicContentItemVariants_deleteVariant

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

dynammic_content_variant_id path optional integer

The ID of the variant

Responses

204

No Content response

DELETE /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}
GET /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}

Allowed For

  • Admins, Agents
operationId: DynamicContentItemVariants_show

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

dynammic_content_variant_id path optional integer

The ID of the variant

Responses

200

Success response

GET /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}
PUT /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}

Updates the specified variant. You don’t need to include all the properties. If you just want to update content, for example, then include just that.

You can’t switch the active state of the default variant of an item. Similarly, you can’t switch the default to false if the variant is the default. You must make another variant default instead.

Allowed For

  • Admins, Agents
operationId: DynamicContentItemVariants_updateVariant

Parameters

Name In Required Type Description
dynamic_content_item_id path optional integer

The ID of the dynamic content item

dynammic_content_variant_id path optional integer

The ID of the variant

Responses

200

Success response

PUT /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}

Essentialscard 4 endpoints

GET /api/v2/object_layouts/essentials_cards

Gets the list of essentials cards.

Allowed For

  • Admins
operationId: EssentialsCard_listCards

Responses

200

Success response

GET /api/v2/object_layouts/essentials_cards
DELETE /api/v2/object_layouts/{object_type}/essentials_card

Delete the essentials card for an object type.

Allowed For

  • Admins and agents
operationId: EssentialsCard_deleteObjectEssentials

Parameters

Name In Required Type Description
object_type path optional string

Essentials card type. Example: zen:user refers user type

Responses

204

Success response

DELETE /api/v2/object_layouts/{object_type}/essentials_card
GET /api/v2/object_layouts/{object_type}/essentials_card

Gets the essentials card for an object type.

Allowed For

  • Admins and agents
operationId: EssentialsCard_getForObject

Parameters

Name In Required Type Description
object_type path optional string

Essentials card type. Example: zen:user refers user type

Responses

200

Success response

GET /api/v2/object_layouts/{object_type}/essentials_card
PUT /api/v2/object_layouts/{object_type}/essentials_card

Updates the essentials card for an object type.

Allowed For

  • Admins
operationId: EssentialsCard_updateObjectCard

Parameters

Name In Required Type Description
object_type path optional string

Essentials card type. Example: zen:user refers user type

Responses

200

Success response

PUT /api/v2/object_layouts/{object_type}/essentials_card

Groupmemberships 7 endpoints

GET /api/v2/group_memberships

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For:

  • Agents
operationId: GroupMemberships_listMemberships

Parameters

Name In Required Type Description
group_id path optional integer

The ID of the group

user_id path optional integer

The id of the user

Responses

200

Success response

GET /api/v2/group_memberships
POST /api/v2/group_memberships

Assigns an agent to a given group.

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
operationId: GroupMemberships_assignAgentToGroup

Responses

201

Created response

POST /api/v2/group_memberships
GET /api/v2/group_memberships/assignable

Returns a maximum of 100 group memberships per page.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For:

  • Agents
operationId: GroupMemberships_listAssignableMemberships

Responses

200

Success response

GET /api/v2/group_memberships/assignable
POST /api/v2/group_memberships/create_many

Assigns up to 100 agents to given groups.

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)

Response

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.

operationId: GroupMemberships_bulkAssignAgentsToGroups

Responses

200

Success response

POST /api/v2/group_memberships/create_many
DELETE /api/v2/group_memberships/destroy_many

Immediately removes users from groups and schedules a job to unassign all working tickets that are assigned to the given user and group combinations.

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
operationId: GroupMemberships_bulkDelete

Parameters

Name In Required Type Description
ids query optional string

Id of the group memberships to delete. Comma separated

Responses

200

Success response

DELETE /api/v2/group_memberships/destroy_many
DELETE /api/v2/group_memberships/{group_membership_id}

Immediately removes a user from a group and schedules a job to unassign all working tickets that are assigned to the given user and group combination.

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
operationId: GroupMemberships_removeUserFromGroup

Parameters

Name In Required Type Description
group_membership_id path optional integer

The ID of the group membership

user_id path optional integer

The id of the user

Responses

204

No content response

DELETE /api/v2/group_memberships/{group_membership_id}
GET /api/v2/group_memberships/{group_membership_id}

The ‘id’ is the group membership id, not a group id.

Allowed For

  • Agents
operationId: GroupMemberships_showDetails

Parameters

Name In Required Type Description
group_membership_id path optional integer

The ID of the group membership

user_id path optional integer

The id of the user

Responses

200

Success response

GET /api/v2/group_memberships/{group_membership_id}
Load more endpoints