Macros 5 endpoints

PUT /api/v2/macros/{macro_id}

Allowed For

  • Agents
operationId: Macros_updateMacroAgent

Parameters

Name In Required Type Description
macro_id path optional integer

The ID of the macro

Request Body

application/json
schema 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

Responses

200

OK

PUT /api/v2/macros/{macro_id}
GET /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.

Allowed For

  • Agents
operationId: Macros_showChangesToTicket

Parameters

Name In Required Type Description
macro_id path optional integer

The ID of the macro

Responses

200

Success Response

GET /api/v2/macros/{macro_id}/apply
GET /api/v2/macros/{macro_id}/attachments

Lists the attachments associated with a macro.

Allowed For

  • Agents
operationId: Macros_listAttachments

Parameters

Name In Required Type Description
macro_id path optional integer

The ID of the macro

Responses

200

Success Response

GET /api/v2/macros/{macro_id}/attachments
POST /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.

Allowed For

  • Agents
operationId: Macros_createAttachment

Parameters

Name In Required Type Description
macro_id path optional integer

The ID of the macro

Responses

201

Success Response

POST /api/v2/macros/{macro_id}/attachments
GET /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.

Allowed For

  • Agents
operationId: Macros_showTicketAfterChanges

Parameters

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

Responses

200

Success Response

GET /api/v2/tickets/{ticket_id}/macros/{macro_id}/apply

Omnichannelroutingqueues 6 endpoints

GET /api/v2/queues

Allowed For

  • Admins
operationId: OmnichannelRoutingQueues_list

Responses

200

Success response

GET /api/v2/queues
POST /api/v2/queues

Allowed For

  • Admins
operationId: OmnichannelRoutingQueues_createNewQueue

Responses

201

Created response

POST /api/v2/queues
GET /api/v2/queues/definitions

Allowed For

  • Admins
operationId: OmnichannelRoutingQueues_listDefinitions

Responses

200

Success response

GET /api/v2/queues/definitions
DELETE /api/v2/queues/{queue_id}

Allowed For

  • Admins
operationId: OmnichannelRoutingQueues_deleteQueue

Parameters

Name In Required Type Description
queue_id path optional string

The id of the omnichannel routing queue

Responses

204

No content response

DELETE /api/v2/queues/{queue_id}
GET /api/v2/queues/{queue_id}

Allowed For

  • Admins
operationId: OmnichannelRoutingQueues_showQueue

Parameters

Name In Required Type Description
queue_id path optional string

The id of the omnichannel routing queue

Responses

200

Success response

GET /api/v2/queues/{queue_id}
PUT /api/v2/queues/{queue_id}

Allowed For

  • Admins
operationId: OmnichannelRoutingQueues_updateQueue

Parameters

Name In Required Type Description
queue_id path optional string

The id of the omnichannel routing queue

Responses

200

Success response

PUT /api/v2/queues/{queue_id}

Organizationfields 6 endpoints

GET /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.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
operationId: OrganizationFields_list

Responses

200

Success response

GET /api/v2/organization_fields
POST /api/v2/organization_fields

Creates any of the following custom field types:

  • text (default when no “type” is specified)
  • textarea
  • checkbox
  • date
  • integer
  • decimal
  • regexp
  • dropdown
  • lookup

See About custom field types in Zendesk help.

Allowed For

  • Admins
operationId: OrganizationFields_createField

Responses

201

Created response

POST /api/v2/organization_fields
PUT /api/v2/organization_fields/reorder

Allowed For

  • Admins
operationId: OrganizationFields_reorderField

Responses

200

Success response

PUT /api/v2/organization_fields/reorder
DELETE /api/v2/organization_fields/{organization_field_id}

Allowed for

  • Admins
operationId: OrganizationFields_deleteField

Parameters

Name In Required Type Description
organization_field_id path optional

The ID or key of the organization field

Responses

204

No Content response

DELETE /api/v2/organization_fields/{organization_field_id}
GET /api/v2/organization_fields/{organization_field_id}

Allowed for

  • Agents
operationId: OrganizationFields_showField

Parameters

Name In Required Type Description
organization_field_id path optional

The ID or key of the organization field

Responses

200

Success response

GET /api/v2/organization_fields/{organization_field_id}
PUT /api/v2/organization_fields/{organization_field_id}

Updating a Drop-down (Tagger) Field

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:

  • All options must be passed on update. Options that are not passed will be removed. As a result, these values will be removed from any organizations
  • To create a new option, pass a null id along with the name and value
  • To update an existing option, pass its id along with the name and value
  • To reorder an option, reposition it in the custom_field_options array relative to the other options
  • To remove an option, omit it from the list of options upon update

Example Request

curl 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}

Allowed for

  • Admins
operationId: OrganizationFields_updateDropdown

Parameters

Name In Required Type Description
organization_field_id path optional

The ID or key of the organization field

Responses

200

Success response

PUT /api/v2/organization_fields/{organization_field_id}

Organizationmemberships 9 endpoints

GET /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.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
  • End users
operationId: OrganizationMemberships_list

Responses

200

Success response

GET /api/v2/organization_memberships
POST /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.

Allowed For

  • Admins
  • Agents when creating a new organization membership for an end user
operationId: OrganizationMemberships_assignUserToOrganization

Responses

201

Created response

POST /api/v2/organization_memberships
POST /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.

Allowed For

  • Admins
  • Agents
operationId: OrganizationMemberships_createMany

Responses

200

Success response

POST /api/v2/organization_memberships/create_many
DELETE /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.

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. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Agents
operationId: OrganizationMemberships_bulkDeleteMany

Parameters

Name In Required Type Description
ids query optional array

The IDs of the organization memberships to delete

Responses

200

Success response

DELETE /api/v2/organization_memberships/destroy_many
DELETE /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.

Allowed for

  • Admins
  • Agents when deleting an organization membership for an end user
operationId: OrganizationMemberships_removeMemberAndUnassignTickets

Parameters

Name In Required Type Description
organization_membership_id path optional integer

The ID of the organization membership

Responses

204

No Content response

DELETE /api/v2/organization_memberships/{organization_membership_id}
GET /api/v2/organization_memberships/{organization_membership_id}

Allowed for

  • Agents
operationId: OrganizationMemberships_showMembership

Parameters

Name In Required Type Description
organization_membership_id path optional integer

The ID of the organization membership

Responses

200

Success response

GET /api/v2/organization_memberships/{organization_membership_id}
PUT /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default

Sets the default organization membership of a given user.

Allowed for

  • Admins
  • Agents when setting the default organization membership for an end user
operationId: OrganizationMemberships_setDefaultMembership

Parameters

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

Responses

200

Success response

PUT /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default
DELETE /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.

Allowed For

  • Agents
operationId: OrganizationMemberships_removeUserFromOrganization

Parameters

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

Responses

204

No Content response

DELETE /api/v2/users/{user_id}/organizations/{organization_id}
PUT /api/v2/users/{user_id}/organizations/{organization_id}/make_default

Sets the default organization membership of a given user.

Allowed For

  • Agents
operationId: OrganizationMemberships_setAsDefault

Parameters

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

Responses

200

Success response

PUT /api/v2/users/{user_id}/organizations/{organization_id}/make_default

Organizationsubscriptions 4 endpoints

GET /api/v2/organization_subscriptions

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For:

  • Agents
  • End users

For end users, the response will only list the subscriptions created by the requesting end user.

operationId: OrganizationSubscriptions_list

Responses

200

Successful response

GET /api/v2/organization_subscriptions
POST /api/v2/organization_subscriptions

Allowed For:

  • Agents
  • End users

End users can only subscribe to shared organizations in which they’re members.

operationId: OrganizationSubscriptions_createNewSubscription

Request Body

application/json
schema OrganizationSubscriptionCreateRequest
Property Type Required
organization_subscription object optional
user_id integer optional
organization_id integer optional

Responses

200

Successful response

POST /api/v2/organization_subscriptions
DELETE /api/v2/organization_subscriptions/{organization_subscription_id}

Allowed For:

  • Agents
  • End users
operationId: OrganizationSubscriptions_deleteSubscription

Parameters

Name In Required Type Description
organization_subscription_id path optional integer

The ID of the organization subscription

Responses

204

No content

DELETE /api/v2/organization_subscriptions/{organization_subscription_id}
GET /api/v2/organization_subscriptions/{organization_subscription_id}

Allowed For:

  • Agents
  • End users

For end users, the response will only list the subscriptions created by the requesting end user.

operationId: OrganizationSubscriptions_showDetails

Parameters

Name In Required Type Description
organization_subscription_id path optional integer

The ID of the organization subscription

Responses

200

Successful response

GET /api/v2/organization_subscriptions/{organization_subscription_id}

Organizations 17 endpoints

GET /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.

Allowed For

  • Admins
operationId: Organizations_getMergeDetails

Parameters

Name In Required Type Description
organization_merge_id path optional string

The ID of the organization merge

Responses

200

Success response

GET /api/v2/organization_merges/{organization_merge_id}
GET /api/v2/organizations

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents, with certain restrictions

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.

operationId: Organizations_list

Responses

200

Success response

GET /api/v2/organizations
POST /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.

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
operationId: Organizations_createNew

Responses

201

Created

POST /api/v2/organizations
GET /api/v2/organizations/autocomplete

Returns an array of organizations whose name starts with the
value specified in the name parameter.

Pagination

  • Offset pagination only

See Using Offset Pagination.

Allowed For

  • Agents
operationId: Organizations_autocomplete

Parameters

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
by the source param

source query optional string

If a field_id is provided, this specifies the type of the field.
For example, if the field is on a “zen:user”, it references a field on a user

Responses

200

Success response

400

Bad request

429

Too Many Requests

500

Internal Server Error

GET /api/v2/organizations/autocomplete
GET /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.

Allowed For

  • Agents
operationId: Organizations_getCount

Responses

200

Success response

GET /api/v2/organizations/count
POST /api/v2/organizations/create_many

Accepts an array of up to 100 organization objects.

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. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Agents, with restrictions applying on certain actions
operationId: Organizations_createMany

Responses

200

Success response

POST /api/v2/organizations/create_many
POST /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.

Allowed For

  • Agents, with restrictions on certain actions
operationId: Organizations_createOrUpdate

Responses

200

Success response

201

Created response

POST /api/v2/organizations/create_or_update
DELETE /api/v2/organizations/destroy_many

Accepts a comma-separated list of up to 100 organization ids or external ids.

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. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
operationId: Organizations_bulkDelete

Parameters

Name In Required Type Description
ids query optional string

A list of organization ids

external_ids query optional string

A list of external ids

Responses

200

Success response

DELETE /api/v2/organizations/destroy_many
GET /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:

Searching by external_id

If 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).

Searching by name

For an organization to be returned, its name must exactly match the value provided (case insensitive).

Allowed For:

  • Admins
  • Agents assigned to a custom role with permissions to add or modify organizations (Enterprise only)

See Creating custom agent roles in the Support Help Center.

operationId: Organizations_search

Parameters

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

Responses

200

Success response

GET /api/v2/organizations/search
GET /api/v2/organizations/show_many

Accepts a comma-separated list of up to 100 organization ids or external ids.

Allowed For

  • Admins
  • Agents
operationId: Organizations_listMany

Parameters

Name In Required Type Description
ids query optional string

A list of organization ids

external_ids query optional string

A list of external ids

Responses

200

Success response

GET /api/v2/organizations/show_many
PUT /api/v2/organizations/update_many

Bulk or batch updates up to 100 organizations.

Bulk update

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"
  }
}

Batch update

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" }
  ]
}

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. Only a certain number of jobs can be queued or running at the same time. See Job limit for more information.

Allowed For

  • Admins
  • Agents

Agents with no permissions restrictions can only update “notes” on organizations.

operationId: Organizations_updateManyBulk

Parameters

Name In Required Type Description
ids query optional string

A list of organization ids

external_ids query optional string

A list of external ids

Responses

200

Success response

PUT /api/v2/organizations/update_many
DELETE /api/v2/organizations/{organization_id}

Allowed For

  • Admins
  • Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
operationId: Organizations_deleteOrganization

Parameters

Name In Required Type Description
organization_id path optional integer

The ID of an organization

Responses

204

No Content Response

DELETE /api/v2/organizations/{organization_id}
GET /api/v2/organizations/{organization_id}

Allowed For

  • Admins
  • Agents
operationId: Organizations_showInfo

Parameters

Name In Required Type Description
organization_id path optional integer

The ID of an organization

Responses

200

Success response

GET /api/v2/organizations/{organization_id}
PUT /api/v2/organizations/{organization_id}

Allowed For

  • Admins
  • Agents

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.

Example Request

{
  "organization": {
    "notes": "Something interesting"
  }
}
operationId: Organizations_updateNotes

Parameters

Name In Required Type Description
organization_id path optional integer

The ID of an organization

Responses

200

Success response

429

Too Many Requests

PUT /api/v2/organizations/{organization_id}
PUT /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:

  • The “losing” organization will be deleted.
  • Other organization fields and their values will not be carried over to the “winning” organization.
  • The merge operation creates an Organization Merge record which contains a status indicating the progress of the merge.

Note: This operation is irreversible.

Merge Statuses

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.

Allowed For

  • Admins
operationId: Organizations_mergeOrganization

Parameters

Name In Required Type Description
organization_id path optional integer

The ID of an organization

Request Body

required
application/json
schema OrganizationMergeRequest
Property Type Required
organization_merge object optional
winner_id integer optional

Responses

200

Success response

PUT /api/v2/organizations/{organization_id}/merge
GET /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.

Pagination

  • Cursor pagination is used for this endpoint.
  • A maximum of 100 records can be returned per page.

See Pagination for more details.

Allowed For

  • Admins
operationId: Organizations_listMerges

Parameters

Name In Required Type Description
organization_id path optional integer

The ID of an organization

Responses

200

Success response

GET /api/v2/organizations/{organization_id}/merges
GET /api/v2/organizations/{organization_id}/related

Allowed For

  • Agents
operationId: Organizations_showRelatedInformation

Parameters

Name In Required Type Description
organization_id path optional integer

The ID of an organization

Responses

200

Success response

GET /api/v2/organizations/{organization_id}/related

Pushnotificationdevices 1 endpoints

POST /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.

Allowed for

  • Admins
operationId: PushNotificationDevices_bulkUnregister

Request Body

application/json
schema PushNotificationDevicesRequest
Property Type Required
push_notification_devices array optional

Responses

200

Successful response

POST /api/v2/push_notification_devices/destroy_many

Requests 2 endpoints

GET /api/v2/requests

Allowed for

  • End Users

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

operationId: Requests_list

Parameters

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”

Responses

200

Success response

GET /api/v2/requests
POST /api/v2/requests

Accepts a request object that sets one or more properties.

Allowed for

  • End users
  • Anonymous users (rate limit of 5 requests per hour for trial accounts)

Additional 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

Creating follow-up 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.

operationId: Requests_createNewRequest

Responses

201

Created response

POST /api/v2/requests
Load more endpoints