openapi: 3.0.3
info:
  title: Support API
  description: Zendesk Support API endpoints
  version: 2.0.0
tags:
  - name: Attachments
  - name: Sessions
  - name: Trigger Categories
  - name: Tags
  - name: Targets
  - name: Target Failures
  - name: Job Statuses
  - name: Automations
  - name: Tickets
  - name: Email Notifications
  - name: Lookup Relationships
  - name: Dynamic Content
  - name: Dynamic Content Item Variants
  - name: Push Notification Devices
  - name: Channel Framework
  - name: X Channel
  - name: Organizations
  - name: Triggers
  - name: Object Triggers
  - name: Custom Roles
  - name: Incremental Export
  - name: Account Settings
  - name: Ticket Metrics
  - name: Groups
  - name: Group Memberships
  - name: Incremental Skill Based Routing
  - name: Organization Memberships
  - name: Sharing Agreements
  - name: Search
  - name: Workspaces
  - name: Skill Based Routing
  - name: Resource Collections
  - name: Macros
  - name: Organization Subscriptions
  - name: Support Addresses
  - name: User Passwords
  - name: User Identities
  - name: Activity Stream
  - name: Group SLA Policies
  - name: SLA Policies
  - name: Ticket Audits
  - name: Ticket Metric Events
  - name: Brands
  - name: Users
  - name: Satisfaction Reasons
  - name: Ticket Forms
  - name: Ticket Form Statuses
  - name: Suspended Tickets
  - name: Satisfaction Ratings
  - name: Ticket Comments
  - name: Requests
  - name: Audit Logs
  - name: Views
  - name: Ticket Import
  - name: Organization Fields
  - name: User Fields
  - name: Ticket Fields
  - name: Ticket Skips
  - name: Bookmarks
  - name: Reseller
  - name: Basics
  - name: AssigneeFieldAssignableGroups
  - name: AssigneeFieldAssignableAgents
  - name: Custom Ticket Statuses
  - name: Locales
  - name: Custom Objects
  - name: Custom Object Fields
  - name: Custom Object Records
  - name: Essentials Card
  - name: Omnichannel Routing Queues
  - name: Deletion Schedules
servers:
  - url: https://{subdomain}.{domain}.com
    variables:
      domain:
        default: zendesk
      subdomain:
        default: example
paths:
  /api/lotus/assignables/autocomplete.json:
    get:
      operationId: ListAssigneeFieldAssignableGroupsAndAgentsSearch
      tags:
        - AssigneeFieldAssignableGroups
        - AssigneeFieldAssignableAgents
      summary: List assignable groups and agents based on query matched against name
      description: |
        List assignable groups and agents based on query matched against name

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/AssigneeFieldSearchValue'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssigneeFieldAssignableGroupsAndAgentsSearchResponse'
              examples:
                default:
                  $ref: '#/components/examples/AssigneeFieldAssignableGroupsAndAgentsSearchResponseExample'
  /api/lotus/assignables/groups.json:
    get:
      operationId: ListAssigneeFieldAssignableGroups
      tags:
        - AssigneeFieldAssignableAgents
      summary: List assignable groups on the AssigneeField
      description: |
        List assignable groups on the AssigneeField

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssigneeFieldAssignableGroupsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AssigneeFieldAssignableGroupsResponseExample'
  /api/lotus/assignables/groups/{group_id}/agents.json:
    get:
      operationId: ListAssigneeFieldAssignableGroupAgents
      tags:
        - AssigneeFieldAssignableAgents
      summary: List assignable agents from a group on the AssigneeField
      description: |
        List assignable agents from a group on the AssigneeField

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/GroupId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssigneeFieldAssignableGroupAgentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AssigneeFieldAssignableGroupAgentsResponseExample'
  /api/v2/{target_type}/{target_id}/relationship_fields/{field_id}/{source_type}:
    get:
      operationId: GetSourcesByTarget
      tags:
        - Lookup Relationships
      summary: Get sources by target
      description: |
        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`)?"

        #### Allowed For

        * Agents

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - name: target_type
          in: path
          description: |
            The type of object the relationship field is targeting.
            The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY"
          required: true
          schema:
            type: string
          example: zen:custom_object:apartment
        - name: target_id
          in: path
          description: |
            The id of the object the relationship field is targeting
          required: true
          schema:
            type: integer
          example: 1234
        - name: field_id
          in: path
          description: |
            The id of the lookup relationship field
          required: true
          schema:
            type: integer
          example: 1234
        - name: source_type
          in: path
          description: |
            The type of object the relationship field belongs to (example. ticket field belongs to a ticket object).
            The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY"
          required: true
          schema:
            type: string
          example: zen:custom_object:apartment
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReverseLookupResponse'
              examples:
                default:
                  $ref: '#/components/examples/ReverseLookupUsersResponseExample'
  /api/v2/account/settings:
    get:
      operationId: ShowAccountSettings
      tags:
        - Account Settings
      summary: Show Settings
      description: |
        Shows the settings that are available for the account.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSettingsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AccountSettingsResponseExample'
    put:
      operationId: UpdateAccountSettings
      tags:
        - Account Settings
      summary: Update Account Settings
      description: |
        Updates settings for the account. See [JSON Format](#json-format) above for the settings you can update.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSettingsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AccountSettingsResponseExample'
  /api/v2/accounts:
    post:
      operationId: CreateTrialAccount
      tags:
        - Reseller
      summary: Create Trial Account
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrialAccountResponse'
              examples:
                default:
                  $ref: '#/components/examples/TrialAccountResponseExample'
  /api/v2/accounts/available:
    get:
      operationId: VerifySubdomainAvailability
      tags:
        - Reseller
      summary: Verify Subdomain Availability
      description: |
        Zendesk Support credentials are not required to access this endpoint. You can use any Zendesk Support subdomain.

        Returns "true" if the subdomain is available.
      parameters:
        - name: subdomain
          in: query
          description: |
            Specify the name of the subdomain you want to verify. The name can't contain underscores, hyphens, or spaces.
          required: true
          schema:
            type: string
          example: z3ndesk
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
              example:
                success: true
  /api/v2/activities:
    parameters:
      - $ref: '#/components/parameters/ActivitySince'
    get:
      operationId: ListActivities
      tags:
        - Activity Stream
      summary: List Activities
      description: |
        Lists ticket activities in the last 30 days affecting the agent making the request.
        Also sideloads the following arrays of user records:

        - actors - All actors involved in the listed activities
        - users - All users involved in the listed activities

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivitiesResponse'
              examples:
                default:
                  $ref: '#/components/examples/ActivitiesResponseExample'
  /api/v2/activities/{activity_id}:
    parameters:
      - $ref: '#/components/parameters/ActivityId'
    get:
      operationId: ShowActivity
      tags:
        - Activity Stream
      summary: Show Activity
      description: |
        Lists a specific activity.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityResponse'
              examples:
                default:
                  $ref: '#/components/examples/ActivityResponseExample'
  /api/v2/activities/count:
    get:
      operationId: CountActivities
      tags:
        - Activity Stream
      summary: Count Activities
      description: |-
        Returns an approximate count of ticket activities in the last 30 days affecting the agent making the request. If the count exceeds 100,000, the count will return a cached result. This cached result will update every 24 hours.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Count of ticket activities
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivitiesCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/ActivitiesCountResponseExample'
  /api/v2/any_channel/channelback/report_error:
    post:
      operationId: ReportChannelbackError
      tags:
        - Channel Framework
      summary: Report Channelback Error to Zendesk
      description: |
        #### Allowed For

        * Admins

        #### Request parameters

        The POST request takes a JSON object parameter which contains information about the
        problematic [channelback](/documentation/channel_framework/understanding-the-channel-framework/channelback/).

        | Name               | Type      | Required  | Comments
        | ------------------ | ----------| --------- | -------------------
        | instance_push_id   | string    | yes       | The ID of the account to which data will be pushed.  This was passed to the integration service when the administrator set up the account
        | external_id        | string    | yes       | Unique identifier of the external resource from the original channelback (string)
        | description        | string    | no        | A human readable description of the error
        | request_id         | string    | no        | A unique identifier for the request


        #### Response format

        The response does not include a response body
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/any_channel/push:
    post:
      operationId: PushContentToSupport
      tags:
        - Channel Framework
      summary: Push Content to Support
      description: |
        Pushes Channel framework content to Zendesk.

        #### Allowed For

        * Admins

        #### Request parameters

        The POST request takes a JSON object parameter which contains data about all
        the resources that the client is pushing.

        | Name               | Type      | Required  | Comments
        | ------------------ | ----------| --------- | -------------------
        | instance_push_id   | string    | yes       | The account ID where data will be pushed. This was passed to the integration service when the administrator set up the account
        | request_id         | string    | no        | A unique identifier for the push request
        | external_resources | array     | yes       | The [resources](#external_resource-object) to push

        #### external_resource object

        | Name               | Type                               | Max length | Mandatory | Comments
        |------------------- | ---------------------------------- |------------| --------- | ----------
        | external_id        | string                             | 255        | yes       | Unique identifier of the external resource. Must be ASCII characters
        | internal_note      | boolean                            |            | no        | If true creates a new internal note comment
        | message            | string                             | 65535      | yes       | Text to be converted to a ticket or comment
        | html_message       | string                             | 65535      | no        | HTML version of message
        | parent_id          | string                             | 511        | no        | Unique identifier of the external resource for which this is a response. Used to choose the correct thread. Responses may include `parent_id` or `thread_id`, but not both. See [Conversation threads](/documentation/channel_framework/understanding-the-channel-framework/pull_endpoint/#conversation-threads)
        | thread_id          | string                             | 255        | no        | Arbitrary identifier of the thread to which this item should belong. Responses may include `parent_id` or `thread_id`, but not both. See [Conversation threads](/documentation/channel_framework/understanding-the-channel-framework/pull_endpoint/#conversation-threads)
        | created_at         | string                             |            | yes       | When the resource was created in the origin system, as an ISO 8601 extended format date-time. Example: '2015-09-08T22:48:09Z'
        | author             | object                             |            | yes       | See [author object](#author-object) below
        | display_info       | array                              |            | no        | Array of integration-specific data used by apps to modify the agent UI. See [display_info object](#display_info-object) below
        | allow_channelback  | boolean                            |            | no        | If false, prevents the agent from making additional comments on the message in the Zendesk interface
        | fields             | array                              |            | no        | Array of ticket fields to set in Zendesk and their values. See [fields array](#fields-array)
        | file_urls          | array                              | 10         | no        | Array of files to be imported into Zendesk. See [file urls](/documentation/channel_framework/understanding-the-channel-framework/pull_endpoint/#file-urls) in the Channel framework docs

        #### author object

        | Name        | Type   | Max chars | Mandatory | Comments
        |------------ | ------ |---------- |---------- |-----------
        | external_id | string | 255       | yes       | Unique identifier of the user in the origin service
        | name        | string | 255       | no        | If not supplied, defaults to external id
        | image_url   | string | 255       | no        | URL to an image for the user
        | locale      | String | 255       | no        | The user's locale. Must be one of the supported [locales](/api-reference/ticketing/account-configuration/locales/#list-available-public-locales) in Zendesk
        | fields      | array  |           | no        | Array of items containing user field identifier ('id') and value of field ('value'.)  For system fields ('notes' or 'details'), the identifier is the English name. For custom fields, the identifier may be the ID or the name

        #### display_info object

        | Name | Type   | Max chars | Mandatory | Comments
        |----- | ------ |---------- |---------- |-----------
        | type | string | 255       | yes       | Globally unique type identifier defined by the integration origin service. Examples: a GUID or URI
        | data | string | 65535     | yes       | JSON data containing display hints

        #### fields array

        The `fields` array lists ticket fields to set in Zendesk and their values. Each item consists of a field identifier (`id`) and a value (`value`) for the field. For Zendesk system fields such as `subject`, the identifier is the English name. For custom fields, the identifier may be a field ID or a name. See [Ticket Fields](/api-reference/ticketing/tickets/ticket_fields/).

        The `fields` array can only set ticket values on ticket creation, not on ticket updates.

        #### Response format

        The response is a JSON object containing a single key:

        | Name      | Type     | Comments
        | --------- | -------- | -------------------
        | results   | array    | An array of [result objects](#result-object)

        The `results` array contains an entry for each item in the incoming `external_resources` array, in the
        same order.  For example, if you call `push` with 3 external resources, a successful response will include
        `results` with three entries, corresponding to your 3 resources.

        #### result object

        | Name                 | Type                           | Comments
        | -------------------- | ------------------------------ | -------------------
        | external_resource_id | string                         | The external ID of the resource, as passed in
        | status               | object                         | The status of the import for the indicated resource. See [status object](#status-object)

        #### status object

        | Name        | Type   | Comments
        | ----------- | ------ | -------------------
        | code        | string | A code indicating the status of the import of the resource, as described in [status codes](#status-codes)
        | description | string | In the case of an exception, a description of the exception. Otherwise, not present.

        #### status codes

        | Key                                       | Description
        | ----------------------------------------- | ----------------
        | success                                   | The external resource was successfully converted to a ticket or comment
        | already_imported                          | Reimport of the external resource was skipped due to a pre-existing ticket or comment for the resource
        | could_not_locate_parent_external_resource | The parent resource, as identified by parent_id in the [request](#request-parameters), could not be found. The unrecognized parent ID is returned in the description of the [status](#status-object)
        | processing_error                          | An internal exception occurred while processing the resource. See `description` in the [status object](#status-object)
        | halted                                    | This resource was not processed because processing of previous resources failed
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelFrameworkPushResultsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ChannelFrameworkPushResultsResponseExample'
  /api/v2/any_channel/validate_token:
    post:
      operationId: ValidateToken
      tags:
        - Channel Framework
      summary: Validate Token
      description: |
        #### Allowed For

        * Admins

        #### Request parameters

        The POST request takes a JSON object parameter which contains the token to be validated.

        | Name               | Type      | Required  | Comments
        | ------------------ | ----------| --------- | -------------------
        | instance_push_id   | string    | yes       | The ID of the account to which data will be pushed. This was passed to the integration service when the administrator set up the account
        | request_id         | string    | no        | A unique identifier for the push request

        #### Response format

        The response body is empty.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/attachments/{attachment_id}:
    get:
      operationId: ShowAttachment
      tags:
        - Attachments
      summary: Show Attachment
      description: |
        Shows attachment details. You can get the value of the `attachment_id` parameter by listing the ticket's comments.
        See [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments). Each comment
        in the list has an `attachments` list that specifies an `id` for each attachment.


         #### Allowed for

         * Agents
      parameters:
        - $ref: '#/components/parameters/AttachmentId'
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentResponseExample'
    put:
      operationId: UpdateAttachment
      tags:
        - Attachments
      summary: Update Attachment for Malware
      description: |
        Toggles enabling or restricting agent access to attachments with detected malware.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/AttachmentId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttachmentUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/AttachmentUpdateRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentResponseExample'
  /api/v2/audit_logs:
    get:
      operationId: ListAuditLogs
      tags:
        - Audit Logs
      summary: List Audit Logs
      description: |
        #### Allowed For

        * Admins on accounts that have audit log access

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.
      parameters:
        - name: filter[source_type]
          in: query
          description: Filter audit logs by the source type. For example, user or rule
          schema:
            type: string
        - name: filter[source_id]
          in: query
          description: Filter audit logs by the source id. Requires `filter[source_type]` to also be set
          schema:
            type: integer
        - name: filter[actor_id]
          in: query
          description: Filter audit logs by the actor id
          schema:
            type: integer
        - name: filter[ip_address]
          in: query
          description: Filter audit logs by the ip address
          schema:
            type: string
        - name: filter[created_at]
          in: query
          description: Filter audit logs by the time of creation. When used, you must specify `filter[created_at]` twice in your request, first with the start time and again with an end time
          schema:
            type: string
        - name: filter[action]
          in: query
          description: Filter audit logs by the action
          schema:
            type: string
        - name: sort_by
          in: query
          description: Offset pagination only. Sort audit logs. Default is `sort_by=created_at`
          schema:
            type: string
        - name: sort_order
          in: query
          description: Offset pagination only. Sort audit logs. Default is `sort_order=desc`
          schema:
            type: string
        - name: sort
          in: query
          description: Cursor pagination only. Sort audit logs. Default is `sort=-created_at`
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AuditLogsResponseExample'
  /api/v2/audit_logs/{audit_log_id}:
    parameters:
      - $ref: '#/components/parameters/AuditLogId'
    get:
      operationId: ShowAuditLog
      tags:
        - Audit Logs
      summary: Show Audit Log
      description: |
        #### Allowed For

        * Admins on accounts that have audit-log access
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLogResponse'
              examples:
                default:
                  $ref: '#/components/examples/AuditLogResponseExample'
  /api/v2/audit_logs/export:
    post:
      operationId: ExportAuditLogs
      tags:
        - Audit Logs
      summary: Export Audit Logs
      description: |
        #### Allowed For

        * Admins on accounts that have audit log access
      parameters:
        - name: filter[source_type]
          in: query
          description: Filter audit logs by the source type. For example, user or rule
          schema:
            type: string
        - name: filter[source_id]
          in: query
          description: Filter audit logs by the source id. Requires `filter[source_type]` to also be set.
          schema:
            type: integer
        - name: filter[actor_id]
          in: query
          description: Filter audit logs by the actor id
          schema:
            type: integer
        - name: filter[ip_address]
          in: query
          description: Filter audit logs by the ip address
          schema:
            type: string
        - name: filter[created_at]
          in: query
          description: Filter audit logs by the time of creation. When used, you must specify `filter[created_at]` twice in your request, first with the start time and again with an end time
          schema:
            type: string
        - name: filter[action]
          in: query
          description: Filter audit logs by the action
          schema:
            type: string
      responses:
        "202":
          description: Accepted description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/autocomplete/tags:
    parameters:
      - $ref: '#/components/parameters/TagNameFragment'
    get:
      operationId: AutocompleteTags
      tags:
        - Tags
      summary: Search Tags
      description: |
        Returns an array of registered and recent tag names that start with the characters specified in the `name` query parameter. You must specify at least 2 characters.

        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).


        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsByObjectIdResponse'
              examples:
                default:
                  $ref: '#/components/examples/TagsAutocompleteResponseExample'
  /api/v2/automations:
    get:
      operationId: ListAutomations
      tags:
        - Automations
      summary: List Automations
      description: |
        Lists all automations for the current account.

        #### Allowed For

        * Agents

        #### Available Parameters

        You can pass in any combination of the following optional filters:

        | Name       | Type    | Comment
        | ---------- | ------- | -------
        | active     | boolean | Only active automations if true, inactive automations if false
        | sort_by    | string  | Possible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d". Defaults to "position"
        | sort_order | string  | One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others

        #### Sideloads

        The following sideloads are supported. The usage sideloads are only supported on the Support Professional or Suite Growth plan or above.

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each automation, if present
        | permissions      | The permissions for each automation
        | usage_1h         | The number of times each automation has been used in the past hour
        | usage_24h        | The number of times each automation has been used in the past day
        | usage_7d         | The number of times each automation has been used in the past week
        | usage_30d        | The number of times each automation has been used in the past thirty days

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsResponseExample'
    post:
      operationId: CreateAutomation
      tags:
        - Automations
      summary: Create Automation
      description: |
        Creates an automation.

        New automations must be unique and have at least one condition that is true only once or an action that nullifies at least one of the conditions. Active automations can have overlapping conditions but can't be identical.

        The request must include the following conditions in the `all` array:

        - At least one time-based condition
        - At least one condition that checks one of the following fields: `status`, `type`, `group_id`, `assignee_id`, or `requester_id`.

        #### Allowed For

        * Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationCreateResponseExample'
  /api/v2/automations/{automation_id}:
    parameters:
      - $ref: '#/components/parameters/AutomationId'
    get:
      operationId: ShowAutomation
      tags:
        - Automations
      summary: Show Automation
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationResponseExample'
    put:
      operationId: UpdateAutomation
      tags:
        - Automations
      summary: Update Automation
      description: |
        Updates an automation.

        Updated automations must be unique and have at least one condition that is true only once or an action that nullifies at least one of the conditions. Active automations can have overlapping conditions but can't be identical.

        The request must include the following conditions in the `all` array:
        - At least one time-based condition
        - At least one condition that checks one of the following fields: 'status', 'type', 'group_id', 'assignee_id', or 'requester_id'

        **Note**: Updating a condition or action updates both the `conditions` and `actions` arrays, clearing all existing values of both arrays. Include all your conditions and actions when updating any condition or action.
        **Note**: You might be restricted from updating some default automations.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationResponseExample'
    delete:
      operationId: DeleteAutomation
      tags:
        - Automations
      summary: Delete Automation
      description: |
        **Note**: You might be restricted from deleting some default automations.

        #### Allowed For

        * Agents
      responses:
        "204":
          description: No Content response
  /api/v2/automations/active:
    get:
      operationId: ListActiveAutomations
      tags:
        - Automations
      summary: List Active Automations
      description: |
        Lists all active automations.

        #### Allowed For

        * Agents

        #### Available Parameters

        You can pass in any combination of the following optional filters:

        | Name       | Type   | Comment
        | ---------- | ------ | -------
        | sort_by    | string | Possible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d". Defaults to "position"
        | sort_order | string | One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each automation, if present
        | permissions      | The permissions for each automation
        | usage_1h         | The number of times each automation has been used in the past hour
        | usage_24h        | The number of times each automation has been used in the past day
        | usage_7d         | The number of times each automation has been used in the past week
        | usage_30d        | The number of times each automation has been used in the past thirty days
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsResponseExample'
  /api/v2/automations/destroy_many:
    delete:
      operationId: BulkDeleteAutomations
      tags:
        - Automations
      summary: Bulk Delete Automations
      description: |
        Deletes the automations corresponding to the provided comma-separated list of IDs.

        **Note**: You might be restricted from deleting some default automations. If included in a bulk deletion, the unrestricted automations will be deleted.

        #### Allowed For

        * Agents

        #### Request Parameters

        The DELETE request takes one parameter, an `ids` object that lists the automations to delete.

        | Name | Description
        | ---- | -----------
        | ids  | The IDs of the automations to delete

        #### Example request

        ```js
        {
          "ids": "25,23,27,22"
        }
        ```
      parameters:
        - name: ids
          in: query
          description: The IDs of the automations to delete
          schema:
            type: array
            items:
              type: integer
      responses:
        "204":
          description: No Content response
  /api/v2/automations/search:
    parameters:
      - $ref: '#/components/parameters/AutomationSearchQuery'
      - $ref: '#/components/parameters/AutomationActive'
      - $ref: '#/components/parameters/AutomationSortBy'
      - $ref: '#/components/parameters/AutomationSortOrder'
      - $ref: '#/components/parameters/AutomationInclude'
    get:
      operationId: SearchAutomations
      tags:
        - Automations
      summary: Search Automations
      description: |
        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For

        * Agents

        #### Sideloads

        The following sideloads are supported. For more information, see [Side-loading](/documentation/ticketing/using-the-zendesk-api/side_loading/).

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each automation, if present
        | permissions      | The permissions for each automation
        | usage_1h         | The number of times each automation has been used in the past hour
        | usage_24h        | The number of times each automation has been used in the past day
        | usage_7d         | The number of times each automation has been used in the past week
        | usage_30d        | The number of times each automation has been used in the past thirty days
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsSearchResponseExample'
  /api/v2/automations/update_many:
    put:
      operationId: UpdateManyAutomations
      tags:
        - Automations
      summary: Update Many Automations
      description: |
        **Note**: You might be restricted from updating some default automations. If included in a bulk update, the unrestricted automations will be updated.

        #### Allowed For

        * Agents

        #### Request Parameters

        The PUT request expects an `automations` object that lists the automations to update.

        Each automation may have the following properties:

        | Name     | Mandatory | Description
        | -------- | --------- | -----------
        | id       | yes       | The ID of the automation to update
        | position | no        | The new position of the automation
        | active   | no        | The active status of the automation (true or false)

        #### Example Request

        ```js
        {
          "automations": [
            {"id": 25, "position": 3},
            {"id": 23, "position": 5},
            {"id": 27, "position": 9},
            {"id": 22, "position": 7}
          ]
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsUpdateManyResponseExample'
  /api/v2/bookmarks:
    get:
      operationId: ListBookmarks
      tags:
        - Bookmarks
      summary: List Bookmarks
      description: |-
        #### Allowed For
        - Agents
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookmarksResponse'
              examples:
                default:
                  $ref: '#/components/examples/BookmarksResponse'
    post:
      operationId: CreateBookmark
      tags:
        - Bookmarks
      summary: Create Bookmark
      description: |-
        #### Allowed For
        - Agents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BookmarkCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/BookmarkCreateRequest'
      responses:
        "200":
          description: Successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookmarkResponse'
              examples:
                default:
                  $ref: '#/components/examples/BookmarkResponse'
        "201":
          description: Successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BookmarkResponse'
              examples:
                default:
                  $ref: '#/components/examples/BookmarkResponse'
  /api/v2/bookmarks/{bookmark_id}:
    parameters:
      - $ref: '#/components/parameters/BookmarkId'
    delete:
      operationId: DeleteBookmark
      tags:
        - Bookmarks
      summary: Delete Bookmark
      description: |-
        #### Allowed For
        - Agents (own bookmarks only)

        If the bookmark already exists with a specified ticket id, the response status will be `http Status: 200 OK`.
      responses:
        "204":
          description: No content
  /api/v2/brands:
    get:
      operationId: ListBrands
      tags:
        - Brands
      summary: List Brands
      description: |-
        Returns a list of all brands for your account sorted by name.

        #### Allowed for

        * Admins
        * Agents with the `assign_tickets_to_any_brand` permission can list all brands for the account
        * Agents without the `assign_tickets_to_any_brand` permission can only list brands they are members of

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsResponse'
              examples:
                default:
                  $ref: '#/components/examples/BrandsResponseExample'
    post:
      operationId: CreateBrand
      tags:
        - Brands
      summary: Create Brand
      description: |-
        #### Allowed for
        - Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/BrandCreateRequestExample'
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandResponse'
              examples:
                default:
                  $ref: '#/components/examples/BrandResponseExample'
  /api/v2/brands/{brand_id}:
    get:
      operationId: ShowBrand
      tags:
        - Brands
      summary: Show a Brand
      description: |-
        Returns a brand for your account.

        #### Allowed for

        * Admins, Agents
      parameters:
        - $ref: '#/components/parameters/BrandId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandResponse'
              examples:
                default:
                  $ref: '#/components/examples/BrandResponseExample'
    put:
      operationId: UpdateBrand
      tags:
        - Brands
      summary: Update a Brand
      description: |-
        Returns an updated brand.

        #### Allowed for
        * Admins

        #### Updating a Brand's Image
        A brand image can be updated by uploading a local file using the update brand endpoint. See the **Using curl** sections below for more information.
      parameters:
        - $ref: '#/components/parameters/BrandId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/BrandUpdateRequestExample'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandResponse'
              examples:
                default:
                  $ref: '#/components/examples/BrandResponseExample'
            image/jpg: {}
            image/png: {}
    delete:
      operationId: DeleteBrand
      tags:
        - Brands
      summary: Delete a Brand
      description: |-
        Deletes a brand.

        #### Allowed for
        - Admins
      parameters:
        - $ref: '#/components/parameters/BrandId'
      responses:
        "204":
          description: No Content response
  /api/v2/brands/{brand_id}/check_host_mapping:
    get:
      operationId: CheckHostMappingValidityForExistingBrand
      tags:
        - Brands
      summary: Check Host Mapping Validity for an Existing Brand
      description: |-
        Returns a JSON object determining whether a host mapping is valid for the given brand.

        #### Allowed for
        - Admins
      parameters:
        - $ref: '#/components/parameters/BrandId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostMappingObject'
              examples:
                default:
                  $ref: '#/components/examples/HostMappingResponseValidExample'
                invalidCNAMEExample:
                  $ref: '#/components/examples/HostMappingResponseInvalidCNAMEExample'
                wrongCNAMEExample:
                  $ref: '#/components/examples/HostMappingResponseWrongCNAMEExample'
  /api/v2/brands/check_host_mapping:
    get:
      operationId: CheckHostMappingValidity
      tags:
        - Brands
      summary: Check Host Mapping Validity
      description: |-
        Returns a JSON object determining whether a host mapping is valid for a given subdomain.

        #### Allowed for

        * Admins
      parameters:
        - $ref: '#/components/parameters/HostMapping'
        - $ref: '#/components/parameters/Subdomain'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostMappingObject'
              examples:
                default:
                  $ref: '#/components/examples/HostMappingResponseValidExample'
                invalidCNAMEExample:
                  $ref: '#/components/examples/HostMappingResponseInvalidCNAMEExample'
                wrongCNAMEExample:
                  $ref: '#/components/examples/HostMappingResponseWrongCNAMEExample'
  /api/v2/channels/twitter/monitored_twitter_handles:
    get:
      operationId: ListMonitoredTwitterHandles
      tags:
        - X Channel
      summary: List Monitored X Handles
      description: |
        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwitterChannelsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TwitterChannelsResponseExample'
  /api/v2/channels/twitter/monitored_twitter_handles/{monitored_twitter_handle_id}:
    parameters:
      - $ref: '#/components/parameters/MonitoredTwitterHandleId'
    get:
      operationId: ShowMonitoredTwitterHandle
      tags:
        - X Channel
      summary: Show Monitored X Handle
      description: |
        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwitterChannelResponse'
              examples:
                default:
                  $ref: '#/components/examples/TwitterChannelResponseExample'
  /api/v2/channels/twitter/tickets:
    post:
      operationId: CreateTicketFromTweet
      tags:
        - X Channel
      summary: Create Ticket from Tweet
      description: |
        Turns a tweet into a ticket. You must provide the tweet id as well as the id of a monitored X (formerly Twitter) handle configured for your account.

        The submitter of the ticket is set to be the user submitting the API request.

        #### Allowed For

        * Agents
      responses:
        "201":
          description: description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/channels/twitter/tickets/{comment_id}/statuses:
    parameters:
      - $ref: '#/components/parameters/CommentId'
    get:
      operationId: GettingTwicketStatus
      tags:
        - X Channel
      summary: List Ticket statuses
      description: |
        #### Allowed For

        * Agents
      parameters:
        - name: ids
          in: query
          description: Optional comment ids to retrieve tweet information for only particular comments
          schema:
            type: string
          example: 1,3,5
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwitterChannelTwicketStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/TwitterChannelTwicketStatusResponseExample'
  /api/v2/channels/voice/agents/{agent_id}/tickets/{ticket_id}/display:
    post:
      operationId: OpenTicketInAgentBrowser
      tags:
        - Basics
      summary: Open Ticket in Agent's Browser
      description: |-
        Allows you to instruct an agent's browser to open a ticket.

        When the message is successfully delivered to an agent's browser:

        ```http
        Status: 200 OK
        ```

        When `agent_id` or `ticket_id` is invalid:

        ```http
        Status: 404 Not Found
        ```

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/AgentId'
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: string
                description: empty
                example: ""
              example: ""
        "404":
          description: When the `agent_id` or `ticket_id` is invalid
          content:
            application/json:
              schema:
                type: string
                description: Invalid attribute
                example: ""
              example: ""
  /api/v2/channels/voice/agents/{agent_id}/users/{user_id}/display:
    post:
      operationId: OpenUsersProfileInAgentBrowser
      tags:
        - Basics
      summary: Open a User's Profile in an Agent's Browser
      description: |-
        Allows you to instruct an agent's browser to open a user's profile.

        When the message is successfully delivered to an agent's browser:

        ```http
        Status: 200 OK
        ```

        When `agent_id` or `user_id` is invalid:

        ```http
        Status: 404 Not Found
        ```

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/AgentId'
        - $ref: '#/components/parameters/UserId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: string
                description: empty
                example: ""
              example: ""
        "404":
          description: When the `agent_id` or `user_id` is invalid
          content:
            application/json:
              schema:
                type: string
                description: Invalid attribute
                example: ""
              example: ""
  /api/v2/channels/voice/tickets:
    post:
      operationId: CreateTicketOrVoicemailTicket
      tags:
        - Basics
      summary: Create Ticket or Voicemail Ticket
      description: |-
        #### Allowed For
        * Agents

        ### Creating tickets

        #### Introduction

        Creating tickets using Talk Partner Edition follows the same conventions as the Create Ticket endpoint. See [Create Ticket](/api-reference/ticketing/tickets/tickets/#create-ticket).

        #### Request parameters

        The POST request takes a mandatory `ticket` object that lists the values to set when the ticket is created.
        You may also include an optional `display_to_agent` value such as the ID of the agent that will see the newly created ticket.

        Tickets created using this endpoint must have a `via_id` parameter. See the following
        section for possible values.

        #### Zendesk Talk Integration Via IDs

        Tickets created using this endpoint must have one of the following `via_id` parameters:

        | ID       | Description
        | ---------| -------------
        | 44       | Voicemail
        | 45       | Phone call (inbound)
        | 46       | Phone call (outbound)

        ### Creating voicemail tickets
        #### Request parameters

        The POST request takes a mandatory `ticket` object that lists the values to set when the ticket is created.
        The ticket must have a `voice_comment` with the following values:

        | Name               | Type                  | Comment
        | ------------------ | ----------------------| -------
        | from               | string                | Incoming phone number
        | to                 | string                | Dialed phone number
        | recording_url      | string                | URL of the recording
        | started_at         | date                  | [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) timestamp of the call starting time
        | call_duration      | integer               | Duration in seconds of the call
        | answered_by_id     | integer               | The agent who answered the call
        | transcription_text | string                | Transcription of the call (optional)
        | location           | string                | Location of the caller (optional)
      parameters:
        - $ref: '#/components/parameters/AgentId'
        - $ref: '#/components/parameters/TicketId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketCreateVoicemailTicketRequest'
            examples:
              default:
                $ref: '#/components/examples/TicketCreateTicketViaTalkRequestExample'
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketResponseExample'
        "404":
          description: When the `agent_id` or `ticket_id` is invalid
          content:
            application/json:
              schema:
                type: string
                description: Invalid attribute
                example: ""
              example: ""
  /api/v2/chat_file_redactions/{ticket_id}:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    put:
      operationId: RedactChatCommentAttachment
      tags:
        - Ticket Comments
      summary: Redact Chat Comment Attachment
      description: |
        Permanently removes one or more chat attachments from a chat ticket.

        **Note**: This does not work on active chats. For chat tickets that predate March 2020, consider using [Redact Ticket Comment In Agent Workspace](#redact-ticket-comment-in-agent-workspace).

        #### Allowed For

        - Agents

        [Agent Workspace](https://support.zendesk.com/hc/en-us/articles/360024218473) must enabled for the account. Deleting tickets must be enabled for agents.

        #### Request Body Properties

        | Name         | Type    | Required | Description                                                                                                                                                                                                                                            |
        | ------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
        | chat_id      | string  | true     | The `chat_id` in the `ChatStartedEvent` event in the ticket audit. See [Ticket Audits](/api-reference/ticketing/tickets/ticket_audits)                                                                                                                 |
        | chat_indexes | array   | false    | The array of `chat_index` in the `ChatFileAttachment` event in the ticket audit. See [Ticket Audits](/api-reference/ticketing/tickets/ticket_audits). Mandatory if `message_ids` is not used                                                           |
        | message_ids  | array   | false    | The array of `message_id` in the `ChatFileAttachment` event in the ticket audit that is part of a `ChatStartedEvent` history. Used when redacting a ChatFileAttachment that is part of a conversation history. Mandatory if `chat_indexes` is not used |

        To get the required body properties, make a request to the [Ticket Audits](/api-reference/ticketing/tickets/ticket_audits) endpoint. Example response:

        ```http
        Status 200 OK
        {
          "audits": [
            "events": [
              {
                "id": 1932802680168,
                "type": "ChatStartedEvent",
                "value": {
                  "visitor_id": "10502823-16EkM3T6VNq7KMd",
                  "chat_id": "2109.10502823.Sjuj2YrBpXwei",
                  "history": [
                    {
                      "chat_index": 0,
                      "type": "ChatFileAttachment",
                      "filename": "image1.jpg"
                    },
                    {
                      "chat_index": 1,
                      "type": "ChatFileAttachment",
                      "filename": "image2.jpg"
                    }
                  ]
                }
              }
            ]
          ]
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketChatCommentRedactionResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketChatCommentAttachmentRedactionResponseExample'
  /api/v2/chat_redactions/{ticket_id}:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    put:
      operationId: RedactChatComment
      tags:
        - Ticket Comments
      summary: Redact Chat Comment
      description: "Permanently removes words or strings from a chat ticket's comment. \n\nWrap `<redact>` tags around the content in the chat comment you want redacted. Example: \n\n```json\n{\n  \"text\": \"My ID number is <redact>847564</redact>!\"\n}\n```\n\nThe characters contained in the tag will be replaced by the ▇ symbol.\n\n**Note**: This does not work on active chats. For chat tickets that predate March 2020, consider using [Redact Ticket Comment In Agent Workspace](#redact-ticket-comment-in-agent-workspace).\n\n#### Allowed For\n\n- Agents\n\n[Agent Workspace](https://support.zendesk.com/hc/en-us/articles/360024218473) must enabled for the account. Deleting tickets must be enabled for agents.\n\n#### Request Body Properties\n\n| Name                     | Type    | Required | Description                                                                                                                                                                                                                                       |\n| ------------------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| chat_id                  | string  | true     | The `chat_id` in the `ChatStartedEvent` event in the ticket audit. See [Ticket Audits](/api-reference/ticketing/tickets/ticket_audits)                                                                                                            |\n| chat_index               | integer | false    | The `chat_index` in the `ChatMessage` event in the ticket audit. See [Ticket Audits](/api-reference/ticketing/tickets/ticket_audits). Mandatory if `message_id` is not used                                                                       |\n| message_id               | string  | false    | The `message_id` of the `ChatMessage` event in the ticket audit that is part of a `ChatStartedEvent` history. Used when redacting a ChatMessage that is part of a conversation history. Mandatory if `chat_index` is not used                     |\n| text                     | string  | true     | The `message` in the `ChatMessage` event in the ticket audit. See [Ticket Audits](/api-reference/ticketing/tickets/ticket_audits).  Wrap `message` with `<redact>` tags                                                                           |\n\nTo get the required body properties, make a request to the [Ticket Audit](/api-reference/ticketing/tickets/ticket_audits) endpoint. Example response:\n\n```http\nStatus 200 OK\n{\n  \"audits\": [\n    \"events\": [\n      {\n        \"id\": 1932802680168,\n        \"type\": \"ChatStartedEvent\",\n        \"value\": {\n          \"visitor_id\": \"10502823-16EkM3T6VNq7KMd\",\n          \"chat_id\": \"2109.10502823.Sjuj2YrBpXwei\",\n          \"history\": [\n            {\n              \"chat_index\": 0,\n              \"type\": \"ChatMessage\",\n              \"message\": \"My ID number is 847564!\"\n            }\n          ]\n        }\n      }\n    ]\n  ]\n}\n```\n"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketChatCommentRedactionResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketChatCommentRedactionResponseExample'
  /api/v2/comment_redactions/{ticket_comment_id}:
    parameters:
      - $ref: '#/components/parameters/TicketCommentId'
    put:
      operationId: RedactTicketCommentInAgentWorkspace
      tags:
        - Ticket Comments
      summary: Redact Ticket Comment In Agent Workspace
      description: "Redaction allows you to permanently remove words, strings, or attachments from a ticket comment.\n\nIn the `html_body` of the comment, wrap the content you want redacted in `<redact>` tags. Example:\n\n```json\n{\n  \"html_body\": \"<div class=\\\"zd-comment\\\" dir=\\\"auto\\\">My ID number is <redact>847564</redact>!</div>\",\n  \"ticket_id\":100\n}\n```\n\nThe characters in the redact tag will be replaced by the ▇ symbol.\n\nTo redact HTML elements such inline images, anchor tags, and links, add the `redact` tag attribute to the element as well as the `<redact>` tag to inner text, if any. Example: \n\n`<a href=\"http://example.com\" redact><redact>some link</redact></a>`\n\nThe `redact` attribute only redacts the tag. Any inner text will be left behind if not enclosed in a `<redact>` tag.\n\nRedaction is permanent and can not be undone. Data is permanently deleted from Zendesk servers with no way to recover it.\n\nThis endpoint provides all the same functionality that the [Redact String in Comment](/api-reference/ticketing/tickets/ticket_comments/#redact-string-in-comment) endpoint provides, plus:\n\n- Redaction of comments in closed tickets\n\n- Redaction of comments in archived tickets\n\n- Redaction of formatted text (bold, italics, hyperlinks)\n\n**Limitations**: When content is redacted from an email comment, the content is also redacted from the original email through a background job. It may take a while for the changes to be completed.\n\n**Note**: We recommend using this endpoint instead of the [Redact String in Comment](/api-reference/ticketing/tickets/ticket_comments/#redact-string-in-comment) endpoint, which will eventually be deprecated.\n\n#### Allowed For\n\n- Agents\n\n[Agent Workspace](https://support.zendesk.com/hc/en-us/articles/360024218473) must be enabled on the account. For professional accounts, deleting tickets must be enabled for agents. On Enterprise accounts, you can assign agents to a custom role with permissions to redact ticket content.\n\n#### Request Body Properties\n\n| Name                     | Type    | Required | Description                                                                                                                                      |\n| -------------------------| ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n| ticket_id                | integer | true     | The ID of the ticket                                                                                                                             |\n| html_body                | string  | false    | The `html_body` of the comment containing `<redact>` tags or `redact` attributes                                           |\n| external_attachment_urls | array   | false    | Array of attachment URLs belonging to the comment to be redacted. See [`content_url` property of Attachment](/api-reference/ticketing/tickets/ticket-attachments/) |\n"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketCommentResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketCommentsRedactionInAgentWorkspaceResponseExample'
  /api/v2/custom_objects:
    get:
      operationId: ListCustomObjects
      tags:
        - Custom Objects
      summary: List Custom Objects
      description: |-
        Lists all undeleted custom objects for the account
        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectsResponseExample'
    post:
      operationId: CreateCustomObject
      tags:
        - Custom Objects
      summary: Create Custom Object
      description: |
        Creates an object describing all the properties required to create a custom object record
        #### Allowed For
        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomObjectsCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomObjectsCreateRequestExample'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectsCreateResponseExample'
  /api/v2/custom_objects/{custom_object_key}:
    get:
      operationId: ShowCustomObject
      tags:
        - Custom Objects
      summary: Show Custom Object
      description: |
        Returns an object with the specified key
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      responses:
        "200":
          description: Custom Object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectsCreateResponseExample'
    patch:
      operationId: UpdateCustomObject
      tags:
        - Custom Objects
      summary: Update Custom Object
      description: |-
        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
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectsCreateResponseExample'
    delete:
      operationId: DeleteCustomObject
      tags:
        - Custom Objects
      summary: Delete Custom Object
      description: |-
        Permanently deletes the custom object with the specified key
        #### Allowed For
        * Admins
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      responses:
        "204":
          description: No content response
  /api/v2/custom_objects/{custom_object_key}/fields:
    get:
      operationId: ListCustomObjectFields
      tags:
        - Custom Object Fields
      summary: List Custom Object Fields
      description: |-
        Lists all undeleted custom fields for the specified object.

        #### Allowed For
        * Agents

        #### Pagination
        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/IncludeStandardFields'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectFieldsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectFieldsResponseExample'
    post:
      operationId: CreateCustomObjectField
      tags:
        - Custom Object Fields
      summary: Create Custom Object Field
      description: |
        Creates any of the following custom field types:

        * text (default when no "type" is specified)
        * textarea
        * checkbox
        * date
        * integer
        * decimal
        * regexp
        * dropdown
        * lookup
        * multiselect

        See [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in Zendesk help.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomObjectFieldsCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomObjectFieldsCreateRequestExample'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectFieldCreateResponseExample'
  /api/v2/custom_objects/{custom_object_key}/fields/{custom_object_field_key_or_id}:
    get:
      operationId: ShowCustomObjectField
      tags:
        - Custom Object Fields
      summary: Show Custom Object Field
      description: |
        Returns a custom field for a specific object using a provided key or id of the field.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectFieldKeyOrId'
      responses:
        "200":
          description: Custom Object Field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectFieldCreateResponseExample'
    patch:
      operationId: UpdateCustomObjectField
      tags:
        - Custom Object Fields
      summary: Update Custom Object Field
      description: |-
        Updates individual custom object fields. The updating rules are as follows:
        * Takes a `custom_object_field` object that specifies the properties to update
        * The `key` property cannot be updated
        * If updating a standard field, only the `title`, `description`, and `properties` attributes can be updated.
        * The `properties` parameter is comprised of four parts and can't be changed if any records exist for the object.
            * `autoincrement_enabled`: A Boolean that enables and disables autonumbering. Must be false if is_unique is true.
            * `autoincrement_prefix`: A string value that is used as a prefix to the autogenerated numbers. It can't exceed 30 characters.
            * `autoincrement_padding`: An integer specifying the starting number of digits in the autogenerated numbers. This value may be between 0-9. However, if you create records in excess of of these digits, additional digits are added as necessary.
            * `autoincrement_next_sequence`: An integer that will be used as the next number in the autonumbering sequence. It can't be negative or less than the current autonumbering value.
            * `is_unique`: A Boolean that enforces uniqueness for manually entered record names. When true, custom object record names must be unique. Must be false if autoincrement_enabled is true.
        #### Allowed For
        * Admins
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectFieldKeyOrId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectFieldCreateResponseExample'
    delete:
      operationId: DeleteCustomObjectField
      tags:
        - Custom Object Fields
      summary: Delete Custom Object Field
      description: |-
        Deletes a field with the specified key. Note: You can't delete standard fields.
        #### Allowed For
        * Admins
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectFieldKeyOrId'
      responses:
        "204":
          description: No content response
  /api/v2/custom_objects/{custom_object_key}/fields/reorder:
    put:
      operationId: ReorderCustomObjectFields
      tags:
        - Custom Object Fields
      summary: Reorder Custom Fields of an Object
      description: |
        Sets a preferred order of custom fields for a specific object by providing field ids in the desired order.
        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      responses:
        "200":
          description: Reordered
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/custom_objects/{custom_object_key}/jobs:
    post:
      operationId: CustomObjectRecordBulkJobs
      tags:
        - Custom Object Records
      summary: Custom Object Record Bulk Jobs
      description: |
        Queues a background job to perform bulk actions on up to 100 custom object records per single request.
        Takes a `job` object with two nested fields:
        * `action`, one of:
            * `"create"`
            * `"delete"`
            * `"delete_by_external_id"`
            * `"create_or_update_by_external_id"`
            * `"create_or_update_by_name"`
            * `"update"`
        * `items`
            * For a `"create"` action, an array of JSON objects representing the custom object records being created
            * For a `"delete"` action, an array of strings representing Zendesk record ids
            * For a `"delete_by_external_id"` action, an array of strings representing external ids
            * For a `"create_or_update_by_external_id"` action, an array of JSON objects representing the custom object records being created or updated by external id
            * For a `"create_or_update_by_name"` action, an array of JSON objects representing the custom object records being created or updated by name. The `is_unique` property on the custom object's name field must be enabled.
            * For an `"update"` action, an array of JSON objects representing the custom object records being updated

        Note: If autonumbering is selected for the custom object's name field, record names aren't allowed in the request body because they are generated automatically. If uniqueness is enabled, the record names must be unique.

        #### Allowed For
        * Agents

        #### Response ###
        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomObjectRecordsBulkCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomObjectRecordsBulkCreateRequestExample'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordsJobsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsJobsResponseExample'
  /api/v2/custom_objects/{custom_object_key}/limits/field_limit:
    get:
      operationId: CustomObjectFieldsLimit
      tags:
        - Custom Object Fields
      summary: Custom Object Fields Limit
      description: |-
        List the current count and the limit for a custom object's fields
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectLimitsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectFieldsLimitResponseExample'
  /api/v2/custom_objects/{custom_object_key}/records:
    get:
      operationId: ListCustomObjectRecords
      tags:
        - Custom Object Records
      summary: List Custom Object Records
      description: |-
        Lists all undeleted custom object records for the specified object

         #### Pagination

        * [Cursor pagination](/api-reference/introduction/pagination/#cursor-pagination) only.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - name: filter[ids]
          in: query
          description: 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.
          schema:
            type: string
          examples:
            multipleIds:
              summary: Example of multiple ids
              value: id_1,id_2,id_3
            oneId:
              summary: Example of a single id
              value: id_1
        - name: filter[external_ids]
          in: query
          description: 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.
          schema:
            type: string
          examples:
            multipleIds:
              summary: Example of multiple ids
              value: ex_id_1,ex_id_2,ex_id_3
            oneId:
              summary: Example of a single id
              value: ex_id_1
        - name: sort
          in: query
          description: |
            One of `id`, `updated_at`, `-id`, or `-updated_at`. The `-` denotes the sort will be descending.
          schema:
            type: string
        - name: page[before]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[after]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[size]
          in: query
          description: |
            Specifies how many records should be returned in the response. You can specify up to 100 records per page.
          schema:
            type: integer
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsIndexResponseExample'
    post:
      operationId: CreateCustomObjectRecord
      tags:
        - Custom Object Records
      summary: Create Custom Object Record
      description: |
        Creates a custom object record according to all the properties described by a custom object definition. If `autoincrement_enabled` is `true`, record names aren't allowed in the request body because they are generated automatically. If `is_unique` is `true`, record names must be unique.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomObjectRecordsCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomObjectRecordsCreateRequestExample'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsCreateResponseExample'
    patch:
      operationId: UpsertCustomObjectRecordByExternalIdOrName
      tags:
        - Custom Object Records
      summary: Set Custom Object Record by External Id Or Name
      description: |
        If a record exists for the given external id or name, updates it. Only the specified attributes are updated. Otherwise, creates a new record with the provided external id, name and other attributes. The `is_unqiue` property on the custom object's name field must be enabled in order to update or create by name. External id and name cannot be used together in the same request.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectRecordExternalId'
        - $ref: '#/components/parameters/CustomObjectRecordName'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomObjectRecordsUpsertRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomObjectRecordsUpsertRequestExample'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsUpsertResponseExample'
    delete:
      operationId: DeleteCustomObjectRecordByExternalIdOrName
      tags:
        - Custom Object Records
      summary: Delete Custom Object Record by External Id Or Name
      description: |
        Deletes a record with the specified external id or name. The `is_unique` property on the custom object's name field must be enabled in order to delete by name. External id and name cannot be used together in the same request.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectRecordExternalId'
        - $ref: '#/components/parameters/CustomObjectRecordName'
      responses:
        "204":
          description: No content response
  /api/v2/custom_objects/{custom_object_key}/records/{custom_object_record_id}:
    get:
      operationId: ShowCustomObjectRecord
      tags:
        - Custom Object Records
      summary: Show Custom Object Record
      description: |
        Returns a custom record for a specific object using a provided id.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectRecordId'
      responses:
        "200":
          description: Custom Object Record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsCreateResponseExample'
    patch:
      operationId: UpdateCustomObjectRecord
      tags:
        - Custom Object Records
      summary: Update Custom Object Record
      description: |-
        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
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectRecordId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsCreateResponseExample'
    delete:
      operationId: DeleteCustomObjectRecord
      tags:
        - Custom Object Records
      summary: Delete Custom Object Record
      description: |-
        Deletes a record with the specified id
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - $ref: '#/components/parameters/CustomObjectRecordId'
      responses:
        "204":
          description: No content response
  /api/v2/custom_objects/{custom_object_key}/records/autocomplete:
    get:
      operationId: AutocompleteCustomObjectRecordSearch
      tags:
        - Custom Object Records
      summary: Autocomplete Custom Object Record Search
      description: |-
        Retrieves an array of custom object records that have a field value that matches the value specified in the `name` parameter.

        #### Pagination

        * [Cursor pagination](/api-reference/introduction/pagination/#cursor-pagination) only.
        * Returns the first 10,000 records sorted by relevancy with page limits.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - name: name
          in: query
          description: Part of a name of the record you are searching for
          schema:
            type: string
        - name: page[before]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[after]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[size]
          in: query
          description: |
            The number of records to return in the response. You can specify up to 100 records per page.
          schema:
            type: integer
        - name: field_id
          in: query
          description: |
            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.
          schema:
            type: string
        - name: source
          in: query
          description: |
            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.
          schema:
            type: string
        - name: requester_id
          in: query
          description: |
            The id of the requester. For use with dynamic filters.
          schema:
            type: integer
          example: 264817272
        - name: assignee_id
          in: query
          description: |
            The id of the selected assignee. For use with dynamic filters.
          schema:
            type: integer
          example: 7334148660734
        - name: organization_id
          in: query
          description: |
            The id of the organization the requester belongs to. For use with dynamic filters.
          schema:
            type: integer
          example: 5633330889598
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsAutocompleteResponseExample'
  /api/v2/custom_objects/{custom_object_key}/records/count:
    get:
      operationId: CountCustomObjectRecords
      tags:
        - Custom Object Records
      summary: Count Custom Object Records
      description: |-
        Returns a total count of records for a specific custom object as well as the time the count was refreshed.
        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: object
                    additionalProperties:
                      properties:
                        refreshed_at:
                          description: The time the last count was performed
                          format: date-time
                          readOnly: true
                          type: string
                        value:
                          description: Number of records at the time of the latest count operation
                          readOnly: true
                          type: integer
              examples:
                default:
                  value:
                    count:
                      refreshed_at: "2022-09-02T22:44:35Z"
                      value: 7
  /api/v2/custom_objects/{custom_object_key}/records/search:
    get:
      operationId: SearchCustomObjectRecords
      tags:
        - Custom Object Records
      summary: Search Custom Object Records
      description: |-
        Returns an array of custom object records that meet the search criteria

        #### Pagination

        * [Cursor pagination](/api-reference/introduction/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
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - name: query
          in: query
          description: |
            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.<br/><br/>

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

            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'.<br/><br/>

            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'.
          schema:
            type: string
          example: jdoe
        - name: sort
          in: query
          description: |
            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.
          schema:
            type: string
        - name: page[before]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[after]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[size]
          in: query
          description: |
            Specifies how many records should be returned in the response. You can specify up to 100 records per page.
          schema:
            type: integer
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsSearchResponseExample'
    post:
      operationId: FilteredSearchCustomObjectRecords
      tags:
        - Custom Object Records
      summary: Filtered Search of Custom Object Records
      description: |-
        Returns an array of custom object records that meet the search and filter criteria.

        Filters can contain either an individual [comparison object](#comparison-object) or an array of [comparison objects](#comparison-object) within logical namespaces.

        A filter is a JSON object that has the following properties:

        | Name      | Type   | Required | Description
        | --------- | ------ | -------- | -----------
        | ATTRIBUTE | object | no       | A [comparison object](#comparison-object) specifying an attribute value condition to be met for records to match.<br/><br/>Examples are marked below.
        | $and      | array  | no       | Array of conjunctive filter objects (logical AND)
        | $or       | array  | no       | Array of conjunctive filter objects (logical OR)

        ##### Examples


        ```js
        {
          "filter": {
            "custom_object_fields.field_key": { "$eq": "value" } // ATTRIBUTE
          }
        }
        ```

        ```js
        // $or
        {
          "filter": {
            "$or": [
              { "custom_object_fields.field_key": { "$eq": "value" } }, // ATTRIBUTE
              { "external_id": { "$eq": "Record123" } } // ATTRIBUTE
            ]
          }
        }
        ```

        #### Comparison Object

        A comparison object defines a condition a record must meet to be considered a match. The condition is based on an attribute value or object type.

        A comparison object is a JSON object that has the following properties:

        | Name      | Type          | Required | Description
        | --------- | ------------- | -------- | -----------
        | FIELD_KEY | string        | yes      | When filtering on a custom field, they must be namedspaced with `custom_object_fields.`. ex. `custom_object_fields.field_key`<br/><br/>When filtering on a standard field, no namespace is required. The following fields are considered standard: `created_at`, `updated_at`, `created_by_user`, `updated_by_user`, `name`, `external_id`
        | OPERATOR  | string        | yes      | [Supported operators](/documentation/custom-data/v2/searching-custom-object-records/) vary by the value's data type
        | VALUE     | string, array | yes      | The value you're filtering for

        #### Pagination

        * [Cursor pagination](/api-reference/introduction/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
        * End users (when an admin [configures](https://support.zendesk.com/hc/en-us/articles/6034260247066) the custom object to be accessible to end users)
      parameters:
        - $ref: '#/components/parameters/CustomObjectKey'
        - name: query
          in: query
          description: |
            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.<br/><br/>

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

            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'.<br/><br/>

            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'.
          schema:
            type: string
          example: jdoe
        - name: sort
          in: query
          description: |
            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.
          schema:
            type: string
        - name: page[before]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[after]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[size]
          in: query
          description: |
            Specifies how many records should be returned in the response. You can specify up to 100 records per page.
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CustomObjectRecordsFilteredSearchRequestBasic'
                - $ref: '#/components/schemas/CustomObjectRecordsFilteredSearchRequestComplex'
            examples:
              default:
                $ref: '#/components/examples/CustomObjectRecordsFilteredSearchRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectRecordsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsSearchResponseExample'
  /api/v2/custom_objects/{custom_object_key}/triggers:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
    get:
      operationId: ListObjectTriggers
      tags:
        - Object Triggers
      summary: List Object Triggers
      description: "Lists all triggers for the specified custom object.\n\n#### Allowed For \n* Agents\n"
      parameters:
        - $ref: '#/components/parameters/TriggerActive'
        - $ref: '#/components/parameters/TriggerSortBy'
        - $ref: '#/components/parameters/TriggerSortOrder'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggersResponseExample'
    post:
      operationId: CreateObjectTrigger
      tags:
        - Object Triggers
      summary: Create Object Trigger
      description: |
        Creates a new object trigger for a specified object.

        #### Allowed For

        * Administrators
        * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectTriggerRequest'
            examples:
              default:
                $ref: '#/components/examples/ObjectTriggerRequestExample'
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggerResponseExample'
  /api/v2/custom_objects/{custom_object_key}/triggers/{trigger_id}:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
      - $ref: '#/components/parameters/TriggerId'
    get:
      operationId: GetObjectTrigger
      tags:
        - Object Triggers
      summary: Show Object Trigger
      description: |
        Returns details of a specific object trigger.
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggerResponseExample'
    put:
      operationId: UpdateObjectTrigger
      tags:
        - Object Triggers
      summary: Update Object Trigger
      description: |
        Updates a specified object trigger.

        **Note**: Updating a condition or action updates both the conditions and actions arrays,
        clearing all existing values of both arrays. Include all your conditions
        and actions when updating any condition or action.

        #### Allowed For

        * Administrators
        * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectTriggerRequest'
            examples:
              default:
                $ref: '#/components/examples/ObjectTriggerRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggerResponseExample'
    delete:
      operationId: DeleteObjectTrigger
      tags:
        - Object Triggers
      summary: Delete Object Trigger
      description: |
        Deletes a specified object trigger.

        #### Allowed For

        * Administrators
        * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
      responses:
        "204":
          description: No Content response
  /api/v2/custom_objects/{custom_object_key}/triggers/active:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
      - $ref: '#/components/parameters/TriggerSortBy'
      - $ref: '#/components/parameters/TriggerSortOrder'
    get:
      operationId: ListActiveObjectTriggers
      tags:
        - Object Triggers
      summary: List Active Object Triggers
      description: |
        Lists all active object triggers.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Administrators
        * Agents in custom roles with the `manage_triggers` permission (Enterprise only)
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggersActiveResponseExample'
  /api/v2/custom_objects/{custom_object_key}/triggers/definitions:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
    get:
      operationId: ListObjectTriggersDefinitions
      tags:
        - Object Triggers
      summary: List Object Trigger Action and Condition Definitions
      description: "Lists the conditions and actions of all triggers for the specified custom object.\n\n#### Allowed For \n* Agents\n"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggerDefinitionResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggerDefinitionResponseExample'
  /api/v2/custom_objects/{custom_object_key}/triggers/destroy_many:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
      - $ref: '#/components/parameters/TriggerIds'
    delete:
      operationId: DeleteManyObjectTriggers
      tags:
        - Object Triggers
      summary: Delete Many Object Triggers
      description: "Deletes the object triggers corresponding to the provided comma-separated list of ids. \n\n**Note**: You can only bulk-delete triggers associated with one object at a time, specified by the `custom_object_key` in the request.\n\n#### Allowed For\n\n* Administrators\n* Agents in custom roles with the `manage_triggers` permission (Enterprise only)\n\n#### Request Parameters\n\nThe DELETE request takes an `ids` object that lists the\nobject triggers to delete. All of the specified object trigger `ids` must be associated with a single object.\n\n| Name | Description\n| ---- | -----------\n| ids  | The ids of the triggers to delete\n\n#### Example request\n\n```js\n{\n  \"ids\": \"25,23,27,22\"\n}\n```\n"
      responses:
        "204":
          description: No content response
  /api/v2/custom_objects/{custom_object_key}/triggers/search:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
      - $ref: '#/components/parameters/TriggerSearchQuery'
      - $ref: '#/components/parameters/TriggerSearchFilter'
      - $ref: '#/components/parameters/TriggerActive'
      - $ref: '#/components/parameters/TriggerSort'
      - $ref: '#/components/parameters/TriggerSortBy'
      - $ref: '#/components/parameters/TriggerSortOrder'
      - $ref: '#/components/parameters/TriggerInclude'
    get:
      operationId: SearchObjectTriggers
      tags:
        - Object Triggers
      summary: Search Object Triggers
      description: |
        Returns a list of object triggers that meet your filter or search criteria.

        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For

        * Agents

        #### Filter

        Use the `filter` query parameter to filter an object trigger search by one or more attributes. For example, the following `filter` argument filters object triggers by the `title` attribute:

        ```json
        {
          "json": {
            "title": "test"
          }
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggersSearchResponseExample'
  /api/v2/custom_objects/{custom_object_key}/triggers/update_many:
    parameters:
      - $ref: '#/components/parameters/CustomObjectKey'
    put:
      operationId: UpdateManyObjectTriggers
      tags:
        - Object Triggers
      summary: Update Many Object Triggers
      description: |
        Updates the position or the active status of multiple object triggers. Any additional properties are ignored.

        **Note**: You can only bulk-update triggers associated with one object at a time, specified by the `custom_object_key` in the request.

        #### Allowed For

        * Administrators
        * Agents in custom roles with the `manage_triggers` permission (Enterprise only)

        #### Request Parameters

        The PUT request expects a `triggers` object that lists the object triggers to update. All of the specified object trigger `ids` must be associated with a single object.

        You can specify the following properties for each object trigger you're updating:

        | Name        | Mandatory | Description
        | --------    | --------- | -----------
        | id          | yes       | The ID of the object trigger to update
        | position    | no        | The new position of the object trigger
        | active      | no        | The active status of the object trigger (true or false)

        #### Example Request

        ```js
        {
          "triggers": [
            {"id": 25, "position": 3},
            {"id": 23, "active": true},
            {"id": 27, "position": 9, "active": false},
            {"id": 22, "position": 7}
          ]
        }
        ```
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectTriggerBulkUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/ObjectTriggerBulkUpdateRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectTriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/ObjectTriggersResponseExample'
  /api/v2/custom_objects/limits/object_limit:
    get:
      operationId: CustomObjectsLimit
      tags:
        - Custom Objects
      summary: Custom Objects Limit
      description: |-
        List the current count and the limit for custom objects
        #### Allowed For
        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectLimitsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectsLimitResponseExample'
  /api/v2/custom_objects/limits/record_limit:
    get:
      operationId: CustomObjectRecordsLimit
      tags:
        - Custom Object Records
      summary: Custom Object Records Limit
      description: |-
        List the current count and the limit for custom object records
        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomObjectLimitsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomObjectRecordsLimitResponseExample'
  /api/v2/custom_roles:
    get:
      operationId: ListCustomRoles
      tags:
        - Custom Roles
      summary: List Custom Roles
      description: |
        #### Availability

        * Accounts on the Enterprise plan or above

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRolesResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomRolesResponseExample'
    post:
      operationId: CreateCustomRole
      tags:
        - Custom Roles
      summary: Create Custom Role
      description: |
        #### Availability

        * Accounts on the Enterprise plan or above

        #### Allowed for

        * Administrators
        * Agents with the `manage_roles` permission
      responses:
        "200":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomRoleResponseExample'
  /api/v2/custom_roles/{custom_role_id}:
    parameters:
      - $ref: '#/components/parameters/CustomRoleId'
    get:
      operationId: ShowCustomRoleById
      tags:
        - Custom Roles
      summary: Show Custom Role
      description: |
        #### Availability

        * Accounts on the Enterprise plan or above

        #### Allowed for

        * Administrators
        * Agents with the `manage_roles` permission
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomRoleResponseExample'
    put:
      operationId: UpdateCustomRoleById
      tags:
        - Custom Roles
      summary: Update Custom Role
      description: |
        #### Availability

        * Accounts on the Enterprise plan or above

        #### Allowed for

        * Administrators
        Agents with the `manage_roles` permission
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomRoleResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomRoleResponseExample'
    delete:
      operationId: DeleteCustomRoleById
      tags:
        - Custom Roles
      summary: Delete Custom Role
      description: |
        #### Availability

        * Accounts on the Enterprise plan or above

        #### Allowed for

        * Administrators
        * Agents with the `manage_roles` permission
      responses:
        "204":
          description: No Contetnt response
  /api/v2/custom_status/default:
    put:
      operationId: BulkUpdateDefaultCustomStatus
      tags:
        - Custom Ticket Statuses
      summary: Bulk Update Default Custom Ticket Status
      description: |
        Updates the default values for many custom ticket statuses at once.

        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateDefaultCustomStatusRequest'
            examples:
              default:
                $ref: '#/components/examples/BulkUpdateDefaultCustomStatusRequestExample'
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateDefaultCustomStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/BulkUpdateDefaultCustomStatusResponseExample'
  /api/v2/custom_statuses:
    get:
      operationId: ListCustomStatuses
      tags:
        - Custom Ticket Statuses
      summary: List Custom Ticket Statuses
      description: |
        Lists all undeleted custom ticket statuses for the account. No pagination is provided.

        #### Allowed For

        * End Users
      parameters:
        - name: status_categories
          in: query
          description: Filter the list of custom ticket statuses by a comma-separated list of status categories
          schema:
            type: string
        - name: active
          in: query
          description: 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
          schema:
            type: boolean
        - name: default
          in: query
          description: 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
          schema:
            type: boolean
      responses:
        "200":
          description: List custom ticket statuses
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomStatusesResponseExample'
    post:
      operationId: CreateCustomStatus
      tags:
        - Custom Ticket Statuses
      summary: Create Custom Ticket Status
      description: |
        Takes a `custom_status` object that specifies the custom ticket status properties to create.

        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomStatusCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomStatusCreateRequestExample'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomStatusResponseExample'
  /api/v2/custom_statuses/{custom_status_id}:
    get:
      operationId: ShowCustomStatus
      tags:
        - Custom Ticket Statuses
      summary: Show Custom Ticket Status
      description: |
        Returns the custom ticket status object.

        #### Allowed For

        * End Users
      parameters:
        - $ref: '#/components/parameters/CustomStatusId'
      responses:
        "200":
          description: Custom Status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomStatusResponseExample'
    put:
      operationId: UpdateCustomStatus
      tags:
        - Custom Ticket Statuses
      summary: Update Custom Ticket Status
      description: |
        Takes a `custom_status` object that specifies the properties to update.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/CustomStatusId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomStatusUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/CustomStatusUpdateRequestExample'
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomStatusResponseExample'
  /api/v2/custom_statuses/{custom_status_id}/ticket_form_statuses:
    parameters:
      - $ref: '#/components/parameters/CustomStatusId'
    post:
      operationId: CreateTicketFormStatusesForCustomStatus
      tags:
        - Custom Ticket Statuses
        - Ticket Form Statuses
      summary: Create Ticket Form Statuses for a Custom Status
      description: |
        Creates one or many tickets form status associations for a custom status.

        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ticket_form_status:
                  type: array
                  items:
                    type: object
                    properties:
                      ticket_form_id:
                        type: integer
                        description: The id of the ticket form
                        example: 1
            example:
              ticket_form_status:
                - ticket_form_id: 1
                - ticket_form_id: 2
                - ticket_form_id: 3
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
  /api/v2/deleted_tickets:
    get:
      operationId: ListDeletedTickets
      tags:
        - Tickets
      summary: List Deleted Tickets
      description: |-
        Returns a maximum of 100 deleted tickets per page. See [Pagination](/api-reference/introduction/pagination/).

        The results includes all deleted (and not yet archived) tickets that
        have not yet been [scrubbed](https://support.zendesk.com/hc/en-us/articles/4408845703194#topic_fv5_w51_sdb) in the past 30 days. Archived tickets are
        not included in the results. See [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756)
        in the Support Help Center.

        The tickets are ordered chronologically by created date, from oldest to newest.
        The first ticket listed may not be the oldest ticket in your
        account due to [ticket archiving](https://support.zendesk.com/hc/en-us/articles/203657756).

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents

        #### Rate Limit

        You can make 10 requests every 1 minute using this endpoint.
        When making requests beyond page 100, you can make 5 requests every 1 minute.
        The rate limiting mechanism behaves as described in
        [Monitoring your request activity](/api-reference/ticketing/account-configuration/usage_limits/#monitoring-your-request-activity) in the API introduction.
      parameters:
        - $ref: '#/components/parameters/TicketSortBy'
        - $ref: '#/components/parameters/TicketSortOrder'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDeletedTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListDeletedTicketsResponseExample'
  /api/v2/deleted_tickets/{ticket_id}:
    delete:
      operationId: DeleteTicketPermanently
      tags:
        - Tickets
      summary: Delete Ticket Permanently
      description: |-
        Permanently deletes a soft-deleted ticket. See [Soft delete](https://support.zendesk.com/hc/en-us/articles/4408834005530#topic_zrm_wbj_1db)
        in the Zendesk GDPR docs. To soft delete a ticket, use the [Delete Ticket](#delete-ticket) endpoint.

        This endpoint enqueues a ticket deletion job and returns a payload with the jobs status.

        If the job succeeds, the ticket is permanently deleted. This operation can't be undone.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work.
        Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job's completion.

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/PermanentlyDeleteTicketJobStatusResponseExample'
  /api/v2/deleted_tickets/{ticket_id}/restore:
    put:
      operationId: RestoreDeletedTicket
      tags:
        - Tickets
      summary: Restore a Previously Deleted Ticket
      description: |-
        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Empty response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/deleted_tickets/destroy_many:
    delete:
      operationId: BulkPermanentlyDeleteTickets
      tags:
        - Tickets
      summary: Delete Multiple Tickets Permanently
      description: |-
        Permanently deletes up to 100 soft-deleted tickets. See [Soft delete](https://support.zendesk.com/hc/en-us/articles/4408834005530#topic_zrm_wbj_1db)
        in the Zendesk GDPR docs. To soft delete tickets, use the [Bulk Delete Tickets](#bulk-delete-tickets) endpoint.

        This endpoint accepts a comma-separated list of up to 100 ticket ids. It enqueues
        a ticket deletion job and returns a payload with the jobs status.

        If one ticket fails to be deleted, the endpoint still attempts to delete the others. If the job succeeds,
        the tickets that were successfully deleted are permanently deleted. This operation can't be undone.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketIds'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/PermanentlyDeleteTicketJobStatusResponseExample'
  /api/v2/deleted_tickets/restore_many:
    put:
      operationId: BulkRestoreDeletedTickets
      tags:
        - Tickets
      summary: Restore Previously Deleted Tickets in Bulk
      description: |-
        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketIds'
      responses:
        "200":
          description: Empty response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/deleted_users:
    get:
      operationId: ListDeletedUsers
      tags:
        - Users
      summary: List Deleted Users
      description: |
        Returns deleted users, including permanently deleted users.

        If the results contains permanently deleted users, the users' properties
        that normally contain personal data, such as `email` and `phone`,
        are null. The `name` property is "Permanently Deleted User".

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedUsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/DeletedUsersResponseExample'
  /api/v2/deleted_users/{deleted_user_id}:
    parameters:
      - $ref: '#/components/parameters/DeletedUserId'
    get:
      operationId: ShowDeletedUser
      tags:
        - Users
      summary: Show Deleted User
      description: |
        Returns users that have been deleted but not permanently yet. See [Permanently Delete User](#permanently-delete-user).

        #### Allowed For:

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedUserResponse'
              examples:
                default:
                  $ref: '#/components/examples/DeletedUserResponseExample'
    delete:
      operationId: PermanentlyDeleteUser
      tags:
        - Users
      summary: Permanently Delete User
      description: |
        Before permanently deleting a user, you must delete the user first. See [Delete User](/api-reference/ticketing/users/users/#delete-user).

        WARNING: Permanently deleting a user deletes all of their information. This information is not recoverable.

        #### Permanent user deletion rate limit

        You can permanently delete 700 users every 10 minutes.
        The rate limiting mechanism behaves as described in
        [Rates Limits](/api-reference/introduction/rate-limits/#monitoring-your-request-activity) in the API introduction.
        Zendesk recommends that you obey the Retry-After header values.

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedUserResponse'
              examples:
                default:
                  $ref: '#/components/examples/DeletedUserResponseExample'
  /api/v2/deleted_users/count:
    get:
      operationId: CountDeletedUsers
      tags:
        - Users
      summary: Count Deleted Users
      description: |
        Returns an approximate count of deleted users, including permanently deleted users. If the count exceeds 100,000, it is updated every 24 hours.

        The response includes a `refreshed_at` property in a `count` object that contains a timestamp indicating when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountResponse'
              examples:
                default:
                  $ref: '#/components/examples/DeletedUsersCountResponseExample'
  /api/v2/deletion_schedules:
    get:
      operationId: ListDeletionSchedules
      tags:
        - Deletion Schedules
      summary: List Deletion Schedules
      description: |
        Lists all deletion schedules for the account. Deletion schedules are used to automatically delete data from the account after a certain period of time.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletion_schedules:
                    type: array
                    items:
                      $ref: '#/components/schemas/DeletionSchedule'
              examples:
                default:
                  $ref: '#/components/examples/GetDeletionSchedulesResponseExample'
    post:
      operationId: CreateDeletionSchedule
      tags:
        - Deletion Schedules
      summary: Create Deletion Schedule
      description: |
        Creates a new deletion schedule.

        #### Allowed For

        * Admins
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deletion_schedule:
                  $ref: '#/components/schemas/DeletionSchedule'
            examples:
              default:
                $ref: '#/components/examples/CreateDeletionScheduleRequestExample'
      responses:
        "201":
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletion_schedule:
                    $ref: '#/components/schemas/DeletionSchedule'
              examples:
                default:
                  $ref: '#/components/examples/CreateDeletionScheduleResponseExample'
  /api/v2/deletion_schedules/{deletion_schedule_id}:
    get:
      operationId: GetDeletionSchedule
      tags:
        - Deletion Schedules
      summary: Get Deletion Schedule
      description: |
        Gets a deletion schedule by its id.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/DeletionScheduleId'
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletion_schedule:
                    $ref: '#/components/schemas/DeletionSchedule'
              examples:
                default:
                  $ref: '#/components/examples/GetDeletionScheduleResponseExample'
    put:
      operationId: UpdateDeletionSchedule
      tags:
        - Deletion Schedules
      summary: Update Deletion Schedule
      description: |
        Updates a deletion schedule by its id.

        **Note**: Updating a condition updates the conditions array, clearing all existing values of the array. Include all your conditions when updating any condition.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/DeletionScheduleId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                deletion_schedule:
                  $ref: '#/components/schemas/DeletionSchedule'
            examples:
              default:
                $ref: '#/components/examples/UpdateDeletionScheduleRequestExample'
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  deletion_schedule:
                    $ref: '#/components/schemas/DeletionSchedule'
              examples:
                default:
                  $ref: '#/components/examples/UpdateDeletionScheduleResponseExample'
    delete:
      operationId: DeleteDeletionSchedule
      tags:
        - Deletion Schedules
      summary: Delete Deletion Schedule
      description: |
        Deletes a deletion schedule by its id.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/DeletionScheduleId'
      responses:
        "204":
          description: Success Response
  /api/v2/dynamic_content/items:
    get:
      operationId: ListDynamicContents
      tags:
        - Dynamic Content
      summary: List Items
      description: |
        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](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentsResponseExample'
    post:
      operationId: CreateDynamicContent
      tags:
        - Dynamic Content
      summary: Create Item
      description: |
        Create a new content item, with one or more variants in the item's `variants` array. See [Specifying item variants](#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](/api-reference/ticketing/account-configuration/locales/#list-locales) endpoint.

        #### Allowed For

        * Admins, Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentResponseExample'
  /api/v2/dynamic_content/items/{dynamic_content_item_id}:
    parameters:
      - $ref: '#/components/parameters/DynamicContentItemId'
    get:
      operationId: ShowDynamicContentItem
      tags:
        - Dynamic Content
      summary: Show Item
      description: |
        #### Allowed For

        * Admins, Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentResponseExample'
    put:
      operationId: UpdateDynamicContentItem
      tags:
        - Dynamic Content
      summary: Update Item
      description: |
        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](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/#update-many-variants).

        #### Allowed For

        * Admins, Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentUpdateResponseExample'
    delete:
      operationId: DeleteDynamicContentItem
      tags:
        - Dynamic Content
      summary: Delete Item
      description: |
        #### Allowed For

        * Admins, Agents
      responses:
        "204":
          description: No Content response
  /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants:
    parameters:
      - $ref: '#/components/parameters/DynamicContentItemId'
    get:
      operationId: DynamicContentListVariants
      tags:
        - Dynamic Content Item Variants
      summary: List Variants
      description: |
        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](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentVariantsResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentVariantsResponseExample'
    post:
      operationId: CreateDynamicContentVariant
      tags:
        - Dynamic Content Item Variants
      summary: Create Variant
      description: |
        You can only create one variant for each locale id. If a locale variant already exists, the request is rejected.

        #### Allowed For

        * Admins, Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentVariantResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentVariantResponseExample'
  /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/{dynammic_content_variant_id}:
    parameters:
      - $ref: '#/components/parameters/DynamicContentItemId'
      - $ref: '#/components/parameters/DynamicContentVariantId'
    get:
      operationId: ShowDynamicContentVariant
      tags:
        - Dynamic Content Item Variants
      summary: Show Variant
      description: |
        #### Allowed For

        * Admins, Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentVariantResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentVariantResponseExample'
    put:
      operationId: UpdateDynamicContentVariant
      tags:
        - Dynamic Content Item Variants
      summary: Update Variant
      description: |
        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
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentVariantResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentVariantUpdateResponseExample'
    delete:
      operationId: DeleteDynamicContentVariant
      tags:
        - Dynamic Content Item Variants
      summary: Delete Variant
      description: |
        #### Allowed For

        * Admins, Agents
      responses:
        "204":
          description: No Content response
  /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/create_many:
    parameters:
      - $ref: '#/components/parameters/DynamicContentItemId'
    post:
      operationId: CreateManyDynamicContentVariants
      tags:
        - Dynamic Content Item Variants
      summary: Create Many Variants
      description: |
        #### Allowed For

        * Admins, Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentVariantsResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentVariantsCreateManyResponseExample'
  /api/v2/dynamic_content/items/{dynamic_content_item_id}/variants/update_many:
    parameters:
      - $ref: '#/components/parameters/DynamicContentItemId'
    put:
      operationId: UpdateManyDynamicContentVariants
      tags:
        - Dynamic Content Item Variants
      summary: Update Many Variants
      description: |
        Updates one or more variants. See [Update Variant](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/#update-variant).

        You must specify the variants by id in the body. To get the variant ids, see [List Variants](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/#list-variants).

        #### Allowed For

        * Admins, Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentVariantsResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentVariantsUpdateManyResponseExample'
  /api/v2/dynamic_content/items/show_many:
    get:
      operationId: ShowManyDynamicContents
      tags:
        - Dynamic Content
      summary: Show Many Items
      description: |
        #### Stability

        * Development

        #### Allowed For

        * Admins, Agents
      parameters:
        - name: identifiers
          in: query
          description: Identifiers for the dynamic contents
          schema:
            type: string
          example: item1,item2
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DynamicContentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/DynamicContentsResponseExample'
  /api/v2/email_notifications:
    parameters:
      - $ref: '#/components/parameters/EmailNotificationsFilter'
      - $ref: '#/components/parameters/IncrementalPage'
      - $ref: '#/components/parameters/Sort'
    get:
      operationId: ListEmailNotifications
      tags:
        - Email Notifications
      summary: List Email Notifications
      description: |
        #### Allowed For

        * Agents

        #### Filters

        * By notification: `api/v2/email_notifications.json?filter[notification_id]=7824075373693`
        * By comment: `api/v2/email_notifications.json?filter[comment_id]=7824075373565`
        * By ticket: `api/v2/email_notifications.json?filter[ticket_id]=623`

        #### Pagination

        By default, a maximum of 100 email notifications are included per page. Use cursor-based pagination parameters (`page[after]` and `page[before]`) to navigate the records (can't be used together in the same request). See [Pagination](/api-reference/introduction/pagination/) for more details.

        * Limit items per-page: `api/v2/email_notifications.json?page[size]=25`
        * Retrieve next page: `api/v2/email_notifications.json?page[size]=25&page[after]=xxx`
        * Retrieve previous page: `api/v2/email_notifications.json?page[size]=25&page[before]=yyy`

        The values `xxx` and `yyy` are placeholder values that represent cursors.

        #### Sorting

        By default, email notifications are sorted by creation time (oldest first). The query parameter is not supported for this endpoint.

        * By creation time (oldest first): `api/v2/email_notifications.json?sort=created_at`
        * By creation time (newest first): `api/v2/email_notifications.json?sort=-created_at`
        * By modification time (recently updated first): `api/v2/email_notifications.json?sort=updated_at`
        * By modification time (recently updated last): `api/v2/email_notifications.json?sort=-updated_at`
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailNotificationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/EmailNotificationsResponseExample'
  /api/v2/email_notifications/{notification_id}:
    parameters:
      - $ref: '#/components/parameters/NotificationId'
    get:
      operationId: ShowEmailNotification
      tags:
        - Email Notifications
      summary: Show Email Notification
      description: |
        Shows details on an email notification. You can get the value of the `notification_id` parameter by listing the ticket's outbound emails.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailNotificationResponse'
              examples:
                default:
                  $ref: '#/components/examples/EmailNotificationResponseExample'
  /api/v2/email_notifications/show_many:
    parameters:
      - $ref: '#/components/parameters/NotificationIds'
      - $ref: '#/components/parameters/CommentIds'
      - $ref: '#/components/parameters/EmailNotificationsByTicketIds'
    get:
      operationId: ShowManyEmailNotifications
      tags:
        - Email Notifications
      summary: Show Many Email Notifications
      description: |
        Shows details of many email notifications. Allows you to query by providing a list of notifications, comments, or tickets IDs.

        #### Allowed For

        * Agents

        #### Filters

        * By notification: `?ids=8433702508541,8433348111869`
        * By comment: `?comment_ids=8433348111741,8433544226045,8433702508413`
        * By ticket: `?ticket_ids=730,723`
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailNotificationResponse'
              examples:
                default:
                  $ref: '#/components/examples/EmailNotificationResponseExample'
  /api/v2/group_memberships:
    get:
      operationId: ListGroupMemberships
      tags:
        - Group Memberships
      summary: List Memberships
      description: |
        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For:

        * Agents
      parameters:
        - $ref: '#/components/parameters/GroupId'
        - $ref: '#/components/parameters/UserId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupMembershipsResponseExample'
    post:
      operationId: CreateGroupMembership
      tags:
        - Group Memberships
      summary: Create Membership
      description: |
        Assigns an agent to a given group.

        #### Allowed For

        * Admins
        * Agents assigned to a custom role with permissions to manage group memberships (Enterprise only)
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupMembershipResponseExample'
  /api/v2/group_memberships/{group_membership_id}:
    parameters:
      - $ref: '#/components/parameters/GroupMembershipId'
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ShowGroupMembershipById
      tags:
        - Group Memberships
      summary: Show Membership
      description: |
        The 'id' is the group membership id, not a group id.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupMembershipResponseExample'
    delete:
      operationId: DeleteGroupMembership
      tags:
        - Group Memberships
      summary: Delete Membership
      description: |
        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)
      responses:
        "204":
          description: No content response
  /api/v2/group_memberships/assignable:
    get:
      operationId: ListAssignableGroupMemberships
      tags:
        - Group Memberships
      summary: List Assignable Memberships
      description: |
        Returns a maximum of 100 group memberships per page.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For:

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupMembershipsResponseExample'
  /api/v2/group_memberships/create_many:
    post:
      operationId: GroupMembershipBulkCreate
      tags:
        - Group Memberships
      summary: Bulk Create Memberships
      description: |
        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](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#show-job-status) endpoint to check for the job's completion.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/group_memberships/destroy_many:
    delete:
      operationId: GroupMembershipBulkDelete
      tags:
        - Group Memberships
      summary: Bulk Delete Memberships
      description: |
        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)
      parameters:
        - name: ids
          in: query
          description: Id of the group memberships to delete. Comma separated
          schema:
            type: string
          example: 1,2,3
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
  /api/v2/group_slas/policies:
    get:
      operationId: ListGroupSLAPolicies
      tags:
        - Group SLA Policies
      summary: List Group SLA Policies
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupSLAPoliciesResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupSLAPoliciesResponseExample'
    post:
      operationId: CreateGroupSLAPolicy
      tags:
        - Group SLA Policies
      summary: Create Group SLA Policy
      description: |
        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupSLAPolicyResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupSLAPolicyCreateResponse'
  /api/v2/group_slas/policies/{group_sla_policy_id}:
    parameters:
      - $ref: '#/components/parameters/GroupSLAPolicyId'
    get:
      operationId: ShowGroupSLAPolicy
      tags:
        - Group SLA Policies
      summary: Show Group SLA Policy
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupSLAPolicyResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupSLAPolicyResponseExample'
    put:
      operationId: UpdateGroupSLAPolicy
      tags:
        - Group SLA Policies
      summary: Update Group SLA Policy
      description: |
        Updates the specified policy.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupSLAPolicyResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupSLAPolicyUpdateResponse'
    delete:
      operationId: DeleteGroupSLAPolicy
      tags:
        - Group SLA Policies
      summary: Delete Group SLA Policy
      description: |
        #### Allowed For

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/group_slas/policies/definitions:
    get:
      operationId: RetrieveGroupSLAPolicyFilterDefinitionItems
      tags:
        - Group SLA Policies
      summary: Retrieve Supported Filter Definition Items
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupSLAPolicyFilterDefinitionResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupSLAPolicyFilterDefinitionResponseExample'
  /api/v2/group_slas/policies/reorder:
    put:
      operationId: ReorderGroupSLAPolicies
      tags:
        - Group SLA Policies
      summary: Reorder Group SLA Policies
      description: |
        #### Allowed For

        * Admins
      parameters:
        - name: group_sla_policy_ids
          in: query
          description: The ids of the Group SLA policies to reorder
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/groups:
    get:
      operationId: ListGroups
      tags:
        - Groups
      summary: List Groups
      description: |
        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Admins
        * Agents
      parameters:
        - $ref: '#/components/parameters/UserId'
        - $ref: '#/components/parameters/ExcludeDeleted'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupsResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupsResponseExample'
    post:
      operationId: CreateGroup
      tags:
        - Groups
      summary: Create Group
      description: |
        #### Allowed For

        * Admins
        * Agents assigned to a custom role with permissions to manage groups (Enterprise only)
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupCreateResponseExample'
  /api/v2/groups/{group_id}:
    parameters:
      - $ref: '#/components/parameters/GroupId'
    get:
      operationId: ShowGroupById
      tags:
        - Groups
      summary: Show Group
      description: |
        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupResponseExample'
    put:
      operationId: UpdateGroup
      tags:
        - Groups
      summary: Update Group
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupUpdateResponseExample'
    delete:
      operationId: DeleteGroup
      tags:
        - Groups
      summary: Delete Group
      description: |
        #### Allowed For

        * Admins
        * Agents assigned to a custom role with permissions to manage groups (Enterprise only)
      responses:
        "204":
          description: No content response
  /api/v2/groups/assignable:
    get:
      operationId: ListAssignableGroups
      tags:
        - Groups
      summary: List Assignable Groups
      description: |
        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupsResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupsResponseExample'
  /api/v2/groups/count:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: CountGroups
      tags:
        - Groups
      summary: Count Groups
      description: |
        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.

        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupsCountObject'
              examples:
                default:
                  $ref: '#/components/examples/GroupsCountResponseExample'
  /api/v2/imports/tickets:
    post:
      operationId: TicketImport
      tags:
        - Ticket Import
      summary: Ticket Import
      description: |-
        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/ArchiveImmediately'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketImportRequest'
            examples:
              default:
                $ref: '#/components/examples/TicketImportRequestExample'
      responses:
        "201":
          description: Successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketResponseExample'
  /api/v2/imports/tickets/create_many:
    post:
      operationId: TicketBulkImport
      tags:
        - Ticket Import
      summary: Ticket Bulk Import
      description: |-
        Accepts an array of up to 100 ticket objects.

        #### Allowed For

        * Admins
      parameters:
        - $ref: '#/components/parameters/ArchiveImmediately'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketBulkImportRequest'
            examples:
              default:
                $ref: '#/components/examples/TicketBulkImportRequestExample'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/incremental/{incremental_resource}/sample:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
      - $ref: '#/components/parameters/IncrementalResource'
    get:
      operationId: IncrementalSampleExport
      tags:
        - Incremental Export
      summary: Incremental Sample Export
      description: |
        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".
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeBasedExportIncrementalTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TimeBasedExportIncrementalTicketsResponseExample'
  /api/v2/incremental/organizations:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
      - $ref: '#/components/parameters/IncrementalPage'
    get:
      operationId: IncrementalOrganizationExport
      tags:
        - Incremental Export
      summary: Incremental Organization Export
      description: |
        #### Allowed For

         * Admins

        #### Sideloading

        See [Organizations sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportIncrementalOrganizationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ExportIncrementalOrganizationsResponseExample'
  /api/v2/incremental/routing/attribute_values:
    get:
      operationId: IncrementalSkilBasedRoutingAttributeValuesExport
      tags:
        - Incremental Skill Based Routing
      summary: Incremental Attributes Values Export
      description: |
        Returns a stream of changes that occurred on routing attribute values.

        #### Allowed For

        * Admins

        #### Parameters

        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](#pagination).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncrementalSkillBasedRouting'
              examples:
                default:
                  $ref: '#/components/examples/IncrementalSkillBasedRoutingAttributeValuesExample'
  /api/v2/incremental/routing/attributes:
    get:
      operationId: IncrementalSkilBasedRoutingAttributesExport
      tags:
        - Incremental Skill Based Routing
      summary: Incremental Attributes Export
      description: |
        Returns a stream of changes that occurred on routing attributes.

        #### Allowed For

        * Admins

        #### Parameters

        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](#pagination).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncrementalSkillBasedRouting'
              examples:
                default:
                  $ref: '#/components/examples/IncrementalSkillBasedRoutingAttributesExample'
  /api/v2/incremental/routing/instance_values:
    get:
      operationId: IncrementalSkilBasedRoutingInstanceValuesExport
      tags:
        - Incremental Skill Based Routing
      summary: Incremental Instance Values Export
      description: |
        Returns a stream of changes that occurred on routing instance values. Changes are grouped by `attribute_value_id`,
        with associate type events listed alongside unassociate type events based on the unassociate event’s timestamp.

        #### Allowed For

        * Admins

        #### Parameters

        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](#pagination).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IncrementalSkillBasedRouting'
              examples:
                default:
                  $ref: '#/components/examples/IncrementalSkillBasedRoutingInstanceValuesExample'
  /api/v2/incremental/ticket_events:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
    get:
      operationId: IncrementalTicketEvents
      tags:
        - Incremental Export
      summary: Incremental Ticket Event Export
      description: |
        Returns a stream of changes that occurred on tickets, excluding events occuring within one minute of the request. 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:

        - [Exporting ticket events](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#exporting-ticket-events) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api)
        - [Time-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#time-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api)

        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.

        #### Allowed For

         * Admins

        #### Sideloading

        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:

        ```js
        "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": "&lt;div class="zd-comment"&gt;&lt;p dir="auto"&gt;This is a comment&lt;/p&gt;",
            "public": true,
            "attachments": [],
            "audit_id": 91048994468,
            "created_at": "2009-06-25T10:15:18Z",
            "event_type": "Comment"
          },
          ...
        ],
        ...
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportIncrementalTicketEventsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ExportIncrementalTicketEventsResponseExample'
  /api/v2/incremental/ticket_metric_events:
    get:
      operationId: ListTicketMetricEvents
      tags:
        - Ticket Metric Events
      summary: List Ticket Metric Events
      description: |-
        Returns ticket metric events that occurred on or after the start time.

        Cursor pagination returns a maximum of 100 records per page. Events are listed in chronological order.

        If the results are not paginated, events will be returned as a time-based incremental export.

        See [Time-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#time-based-incremental-exports).

        #### Pagination
        * Cursor pagination

        See [Pagination](/api-reference/introduction/pagination/).

        #### Allowed For

        * Admins
      parameters:
        - name: start_time
          in: query
          description: 'The Unix UTC epoch time of the oldest event you''re interested in. Example: 1332034771.'
          required: true
          schema:
            type: integer
          example: 1332034771
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketMetricEventsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketMetricEventsResponseExample'
  /api/v2/incremental/tickets:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
    get:
      operationId: IncrementalTicketExportTime
      tags:
        - Incremental Export
      summary: Incremental Ticket Export, Time Based
      description: |
        Returns the tickets that changed since the start time. For more information,
        see [Exporting tickets](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#exporting-tickets) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).

        This endpoint supports time-based incremental exports.
        For more information, see [Time-based incremental exports](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#time-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api). You can also return tickets using cursor-based pagination. See [Incremental Ticket Export, Cursor Based](#incremental-ticket-export-cursor-based).

        The results include tickets that were updated by the system. See
        [Excluding system-updated tickets](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#excluding-system-updated-tickets-time-based-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-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](#incremental-ticket-event-export).
        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.

        #### Allowed For

         * Admins

        #### Sideloading

        See [Tickets sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints). For performance reasons,
        `last_audits` sideloads aren't supported.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeBasedExportIncrementalTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TimeBasedExportIncrementalTicketsResponseExample'
  /api/v2/incremental/tickets/cursor:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
      - $ref: '#/components/parameters/IncrementalCursor'
    get:
      operationId: IncrementalTicketExportCursor
      tags:
        - Incremental Export
      summary: Incremental Ticket Export, Cursor Based
      description: |
        Returns the tickets that changed since the start time. For more information,
        see [Exporting tickets](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#exporting-tickets) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-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](/documentation/ticketing/managing-tickets/using-the-incremental-export-api#cursor-based-incremental-exports) in [Using the Incremental Exports API](/documentation/ticketing/managing-tickets/using-the-incremental-export-api).



        #### Allowed For

         * Admins

        #### Sideloading

        See [Tickets sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints). For performance reasons,
        `last_audits` sideloads aren't supported.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorBasedExportIncrementalTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CursorBasedExportIncrementalTicketsResponseExample'
  /api/v2/incremental/users:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
      - $ref: '#/components/parameters/IncrementalPage'
    get:
      operationId: IncrementalUserExportTime
      tags:
        - Incremental Export
      summary: Incremental User Export, Time Based
      description: |
        #### Allowed For

         * Admins

        #### Sideloading

        See [Users sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeBasedExportIncrementalUsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/TimeBasedExportIncrementalUsersResponseExample'
  /api/v2/incremental/users/cursor:
    parameters:
      - $ref: '#/components/parameters/IncrementalUnixTime'
      - $ref: '#/components/parameters/IncrementalCursor'
      - $ref: '#/components/parameters/IncrementalPage'
    get:
      operationId: IncrementalUserExportCursor
      tags:
        - Incremental Export
      summary: Incremental User Export, Cursor Based
      description: |
        #### Allowed For

         * Admins

        #### Sideloading

        See [Users sideloads](/documentation/ticketing/using-the-zendesk-api/side_loading/#supported-endpoints).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CursorBasedExportIncrementalUsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/CursorBasedExportIncrementalUsersResponseExample'
  /api/v2/job_statuses:
    get:
      operationId: ListJobStatuses
      tags:
        - Job Statuses
      summary: List Job Statuses
      description: |
        Shows the statuses for background jobs. Statuses are sorted first by completion date and then by creation date in descending order.

        #### Allowed For:

        * Agents

        #### Pagination

        * Cursor pagination

        See [Pagination](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusesResponseExample'
  /api/v2/job_statuses/{job_status_id}:
    parameters:
      - $ref: '#/components/parameters/JobStatusId'
    get:
      operationId: ShowJobStatus
      tags:
        - Job Statuses
      summary: Show Job Status
      description: |
        Shows the status of a background job.

        #### Allowed For:

        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/ShowJobStatusResponseExample'
  /api/v2/job_statuses/show_many:
    get:
      operationId: ShowManyJobStatuses
      tags:
        - Job Statuses
      summary: Show Many Job Statuses
      description: |
        Accepts a comma-separated list of job status ids.

        #### Allowed For:

        * Agents
      parameters:
        - name: ids
          in: query
          description: Comma-separated list of job status ids.
          required: true
          schema:
            type: string
          example: 8b726e606741012ffc2d782bcb7848fe,e7665094164c498781ebe4c8db6d2af5
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusesResponseExample'
  /api/v2/locales:
    get:
      operationId: ListLocales
      tags:
        - Locales
      summary: List Locales
      description: |
        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](/api-reference/ticketing/account-configuration/account_settings/#update-account-settings) endpoint.

        #### Allowed For

        * Anyone
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalesResponse'
              examples:
                default:
                  $ref: '#/components/examples/LocalesResponseExample'
  /api/v2/locales/{locale_id}:
    parameters:
      - $ref: '#/components/parameters/LocaleId'
    get:
      operationId: ShowLocaleById
      tags:
        - Locales
      summary: Show Locale
      description: |
        #### Allowed For

        * Anyone
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocaleResponse'
              examples:
                default:
                  $ref: '#/components/examples/LocaleResponseExample'
  /api/v2/locales/agent:
    get:
      operationId: ListLocalesForAgent
      tags:
        - Locales
      summary: List Locales for Agent
      description: |
        Lists the translation locales that have been localized for agents on a specific account.

        #### Allowed For

        * Anyone
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalesResponse'
              examples:
                default:
                  $ref: '#/components/examples/LocalesResponseExample'
  /api/v2/locales/current:
    get:
      operationId: ShowCurrentLocale
      tags:
        - Locales
      summary: Show Current Locale
      description: |
        This works like [Show Locale](#show-locale), but instead of taking a locale id as an argument, it renders the locale of the user performing the request.

        #### Allowed For

        * Anyone
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocaleResponse'
              examples:
                default:
                  $ref: '#/components/examples/LocaleResponseExample'
  /api/v2/locales/detect_best_locale:
    get:
      operationId: DetectBestLocale
      tags:
        - Locales
      summary: Detect Best Language for User
      description: |
        #### Allowed For

        * Anyone
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocaleResponse'
              examples:
                default:
                  $ref: '#/components/examples/LocaleDetectBestLanguageResponseExample'
  /api/v2/locales/public:
    get:
      operationId: ListAvailablePublicLocales
      tags:
        - Locales
      summary: List Available Public Locales
      description: |
        Lists the translation locales that are available to all accounts.

        #### Allowed For

        * Anyone
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LocalesResponse'
              examples:
                default:
                  $ref: '#/components/examples/LocalesResponseExample'
  /api/v2/macros:
    get:
      operationId: ListMacros
      tags:
        - Macros
      summary: List Macros
      description: |
        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.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/MacroInclude'
        - $ref: '#/components/parameters/MacroAccess'
        - $ref: '#/components/parameters/MacroActive'
        - $ref: '#/components/parameters/MacroCategory'
        - $ref: '#/components/parameters/MacroGroupId'
        - $ref: '#/components/parameters/MacroOnlyViewable'
        - $ref: '#/components/parameters/MacroSortBy'
        - $ref: '#/components/parameters/MacroSortOrder'
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
    post:
      operationId: CreateMacro
      tags:
        - Macros
      summary: Create Macro
      description: |
        #### Allowed For
        * Agents
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                macro:
                  $ref: '#/components/schemas/MacroInput'
            examples:
              default:
                value:
                  macro:
                    actions:
                      - field: status
                        value: solved
                    title: Roger Wilco
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  macro:
                    $ref: '#/components/schemas/MacroObject'
              examples:
                default:
                  $ref: '#/components/examples/CreateMacroResponseExample'
  /api/v2/macros/{macro_id}:
    parameters:
      - $ref: '#/components/parameters/MacroId'
    get:
      operationId: ShowMacro
      tags:
        - Macros
      summary: Show Macro
      description: |
        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroResponseExample'
    put:
      operationId: UpdateMacro
      tags:
        - Macros
      summary: Update Macro
      description: |
        #### Allowed For
        * Agents
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                macro:
                  $ref: '#/components/schemas/MacroInput'
            examples:
              default:
                value:
                  macro:
                    actions:
                      - field: status
                        value: solved
                    title: Sets the ticket status to `solved`
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  macro:
                    $ref: '#/components/schemas/MacroObject'
              examples:
                default:
                  $ref: '#/components/examples/UpdateMacroResponseExample'
    delete:
      operationId: DeleteMacro
      tags:
        - Macros
      summary: Delete Macro
      description: |
        #### Allowed For
        * Agents, with restrictions applying on certain actions
      responses:
        "204":
          description: No Content
  /api/v2/macros/{macro_id}/apply:
    parameters:
      - $ref: '#/components/parameters/MacroId'
    get:
      operationId: ShowChangesToTicket
      tags:
        - Macros
      summary: Show Changes to Ticket
      description: |
        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](/api-reference/ticketing/tickets/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](#show-ticket-after-changes).

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroApplyTicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroChangesToTicketsResponseExample'
  /api/v2/macros/{macro_id}/attachments:
    parameters:
      - $ref: '#/components/parameters/MacroId'
    get:
      operationId: ListMacroAttachments
      tags:
        - Macros
      summary: List Macro Attachments
      description: |
        Lists the attachments associated with a macro.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentsResponseExample'
    post:
      operationId: CreateAssociatedMacroAttachment
      tags:
        - Macros
      summary: Create Macro Attachment
      description: |
        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
      responses:
        "201":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentResponseExample'
  /api/v2/macros/actions:
    get:
      operationId: ListMacrosActions
      tags:
        - Macros
      summary: List Supported Actions for Macros
      description: |
        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  actions:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
              examples:
                default:
                  $ref: '#/components/examples/MacroActionsResponseExample'
  /api/v2/macros/active:
    get:
      operationId: ListActiveMacros
      tags:
        - Macros
      summary: List Active Macros
      description: |
        Lists all active shared and personal macros available to the current user.

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/MacroInclude'
        - $ref: '#/components/parameters/MacroAccess'
        - $ref: '#/components/parameters/MacroCategory'
        - $ref: '#/components/parameters/MacroGroupId'
        - $ref: '#/components/parameters/MacroSortBy'
        - $ref: '#/components/parameters/MacroSortOrder'
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
  /api/v2/macros/attachments:
    post:
      operationId: CreateMacroAttachment
      tags:
        - Macros
      summary: Create Unassociated Macro Attachment
      description: |
        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.

        #### Allowed For

        * Agents
      responses:
        "201":
          description: Created Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentResponseExample'
  /api/v2/macros/attachments/{attachment_id}:
    parameters:
      - $ref: '#/components/parameters/AttachmentId'
    get:
      operationId: ShowMacroAttachment
      tags:
        - Macros
      summary: Show Macro Attachment
      description: |
        Shows the properties of the specified macro attachment.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentResponseExample'
  /api/v2/macros/categories:
    get:
      operationId: ListMacroCategories
      tags:
        - Macros
      summary: List Macro Categories
      description: |
        Lists all macro categories available to the current user.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroCategoriesResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroCategoriesResponseExample'
  /api/v2/macros/definitions:
    get:
      operationId: ListMacroActionDefinitions
      tags:
        - Macros
      summary: List Macro Action Definitions
      description: |
        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](/documentation/ticketing/reference-guides/actions-reference).

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  definitions:
                    type: object
                    properties:
                      actions:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
              examples:
                default:
                  $ref: '#/components/examples/ShowDerivedMacroResponseExample'
  /api/v2/macros/destroy_many:
    delete:
      operationId: DeleteManyMacros
      tags:
        - Macros
      summary: Bulk Delete Macros
      description: |
        Deletes the macros corresponding to the provided comma-separated list of IDs.

        #### Allowed For
        * Agents
      parameters:
        - name: ids
          in: query
          description: The IDs of the macros to delete
          required: true
          schema:
            type: array
            items:
              type: integer
          example:
            - 1
            - 2
            - 3
      responses:
        "204":
          description: No Content
  /api/v2/macros/new:
    parameters:
      - $ref: '#/components/parameters/MacroIdQuery'
      - name: ticket_id
        in: query
        description: The ID of the ticket from which to build a macro replica
        required: true
        schema:
          type: integer
        example: 35436
    get:
      operationId: ShowDerivedMacro
      tags:
        - Macros
      summary: Show Macro Replica
      description: |
        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.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroResponseExample'
  /api/v2/macros/search:
    parameters:
      - $ref: '#/components/parameters/MacroInclude'
      - $ref: '#/components/parameters/MacroAccess'
      - $ref: '#/components/parameters/MacroActive'
      - $ref: '#/components/parameters/MacroCategory'
      - $ref: '#/components/parameters/MacroGroupId'
      - $ref: '#/components/parameters/MacroOnlyViewable'
      - $ref: '#/components/parameters/MacroSearchSortBy'
      - $ref: '#/components/parameters/MacroSortOrder'
      - $ref: '#/components/parameters/MacroQuery'
    get:
      operationId: SearchMacro
      tags:
        - Macros
      summary: Search Macros
      description: |
        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
  /api/v2/macros/update_many:
    put:
      operationId: UpdateManyMacros
      tags:
        - Macros
      summary: Update Many Macros
      description: |
        Updates the provided macros with the specified changes.

        #### Allowed For
        * Agents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MacroUpdateManyInput'
            examples:
              default:
                value:
                  macros:
                    - active: false
                      id: 25
                    - id: 23
                      position: 5
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
  /api/v2/object_layouts/{object_type}/essentials_card:
    parameters:
      - $ref: '#/components/parameters/EssentialsCardKey'
    get:
      operationId: ShowEssentialsCard
      tags:
        - Essentials Card
      summary: Show Essentials Card
      description: |
        Gets the essentials card for an object type.
        #### Allowed For
        * Admins and agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EssentialsCardResponse'
              examples:
                default:
                  $ref: '#/components/examples/EssentialsCardExample'
    put:
      operationId: UpdateEssentialsCard
      tags:
        - Essentials Card
      summary: Update Essentials Card
      description: |
        Updates the essentials card for an object type.
        #### Allowed For
        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EssentialsCardResponse'
              examples:
                default:
                  $ref: '#/components/examples/EssentialsCardExample'
    delete:
      operationId: DeleteEssentialsCard
      tags:
        - Essentials Card
      summary: Delete Essentials Card
      description: |
        Delete the essentials card for an object type.
        #### Allowed For
        * Admins and agents
      responses:
        "204":
          description: Success response
  /api/v2/object_layouts/essentials_cards:
    get:
      operationId: ShowEssentialsCards
      tags:
        - Essentials Card
      summary: List of Essentials Cards
      description: |
        Gets the list of essentials cards.
        #### Allowed For
        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EssentialsCardsResponse'
              examples:
                default:
                  $ref: '#/components/examples/EssentialsCardsExample'
  /api/v2/organization_fields:
    get:
      operationId: ListOrganizationFields
      tags:
        - Organization Fields
      summary: List Organization Fields
      description: |
        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](/api-reference/ticketing/organizations/organizations/) resource.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationFieldsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationFieldsResponseExample'
    post:
      operationId: CreateOrganizationField
      tags:
        - Organization Fields
      summary: Create Organization Field
      description: |
        Creates any of the following custom field types:

        * text (default when no "type" is specified)
        * textarea
        * checkbox
        * date
        * integer
        * decimal
        * regexp
        * dropdown
        * lookup
        * multiselect

        See [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in Zendesk help.

        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationFieldCreateResponseExample'
  /api/v2/organization_fields/{organization_field_id}:
    parameters:
      - $ref: '#/components/parameters/OrganizationFieldId'
    get:
      operationId: ShowOrganizationField
      tags:
        - Organization Fields
      summary: Show Organization Field
      description: |
        #### Allowed for

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationFieldResponseExample'
    put:
      operationId: UpdateOrganizationField
      tags:
        - Organization Fields
      summary: Update Organization Field
      description: |
        #### Updating a Dropdown (Tagger) or Multiselect Field

        Dropdown and multiselect fields return an array of `custom_field_options` which specify the name, value, and order of dropdown or multiselect options. When updating a dropdown or multiselect 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

        ```bash
        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}/token:{api_token}
        ```
        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationFieldUpdateResponseExample'
    delete:
      operationId: DeleteOrganizationField
      tags:
        - Organization Fields
      summary: Delete Organization Field
      description: |
        #### Allowed for

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/organization_fields/reorder:
    put:
      operationId: ReorderOrganizationField
      tags:
        - Organization Fields
      summary: Reorder Organization Field
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/organization_memberships:
    get:
      operationId: ListOrganizationMemberships
      tags:
        - Organization Memberships
      summary: List Memberships
      description: |
        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](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        - Agents
        - End users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipsResponseExample'
    post:
      operationId: CreateOrganizationMembership
      tags:
        - Organization Memberships
      summary: Create Membership
      description: |
        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
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipCreateResponseExample'
  /api/v2/organization_memberships/{organization_membership_id}:
    parameters:
      - $ref: '#/components/parameters/OrganizationMembershipId'
    get:
      operationId: ShowOrganizationMembershipById
      tags:
        - Organization Memberships
      summary: Show Membership
      description: |
        #### Allowed for

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipResponseExample'
    delete:
      operationId: DeleteOrganizationMembership
      tags:
        - Organization Memberships
      summary: Delete Membership
      description: |
        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
      responses:
        "204":
          description: No Content response
  /api/v2/organization_memberships/create_many:
    post:
      operationId: CreateManyOrganizationMemberships
      tags:
        - Organization Memberships
      summary: Create Many Memberships
      description: |
        Accepts an array of up to 100 organization membership objects.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For
        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipCreateManyResponseExample'
  /api/v2/organization_memberships/destroy_many:
    delete:
      operationId: DeleteManyOrganizationMemberships
      tags:
        - Organization Memberships
      summary: Bulk Delete Memberships
      description: |
        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](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Agents
      parameters:
        - name: ids
          in: query
          description: The IDs of the organization memberships to delete
          schema:
            type: array
            items:
              type: integer
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
  /api/v2/organization_merges/{organization_merge_id}:
    parameters:
      - $ref: '#/components/parameters/OrganizationMergeId'
    get:
      operationId: ShowOrganizationMerge
      tags:
        - Organizations
      summary: Show Organization Merge
      description: |
        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
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMergeResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMergeResponseExample'
  /api/v2/organization_subscriptions:
    get:
      operationId: ListOrganizationSubscriptions
      tags:
        - Organization Subscriptions
      summary: List Organization Subscriptions
      description: |-
        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/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.
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSubscriptionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationSubscriptionsResponseExample'
    post:
      operationId: CreateOrganizationSubscription
      tags:
        - Organization Subscriptions
      summary: Create Organization Subscription
      description: |-
        #### Allowed For:

        * Agents
        * End users

        End users can only subscribe to shared organizations in which they're members.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationSubscriptionCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/OrganizationSubscriptionCreateRequestExample'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSubscriptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationSubscriptionResponseExample'
  /api/v2/organization_subscriptions/{organization_subscription_id}:
    get:
      operationId: ShowOrganizationSubscription
      tags:
        - Organization Subscriptions
      summary: Show Organization Subscription
      description: |-
        #### Allowed For:

        * Agents
        * End users

        For end users, the response will only list the subscriptions created by the requesting end user.
      parameters:
        - $ref: '#/components/parameters/OrganizationSubscriptionId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationSubscriptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationSubscriptionResponseExample'
    delete:
      operationId: DeleteOrganizationSubscription
      tags:
        - Organization Subscriptions
      summary: Delete Organization Subscription
      description: |-
        #### Allowed For:

        * Agents
        * End users
      parameters:
        - $ref: '#/components/parameters/OrganizationSubscriptionId'
      responses:
        "204":
          description: No content
  /api/v2/organizations:
    get:
      operationId: ListOrganizations
      tags:
        - Organizations
      summary: List Organizations
      description: |
        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/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](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents#topic_cxn_hig_bd) in Zendesk help.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationsResponseExample'
    post:
      operationId: CreateOrganization
      tags:
        - Organizations
      summary: Create Organization
      description: |
        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)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationRequest'
            examples:
              default:
                $ref: '#/components/examples/CreateOrganizationRequestExample'
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
              examples:
                default:
                  $ref: '#/components/examples/CreatedOrganizationResponseExample'
  /api/v2/organizations/{organization_id}:
    parameters:
      - $ref: '#/components/parameters/OrganizationId'
    get:
      operationId: ShowOrganization
      tags:
        - Organizations
      summary: Show Organization
      description: |
        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationResponseExample'
    put:
      operationId: UpdateOrganization
      tags:
        - Organizations
      summary: Update Organization
      description: |
        #### 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

        ```js
        {
          "organization": {
            "notes": "Something interesting"
          }
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
              examples:
                default:
                  $ref: '#/components/examples/UpdateOrganizationResponseExample'
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                default:
                  value:
                    errors:
                      - code: TooManyRequests
                        title: Too many requests to update
    delete:
      operationId: DeleteOrganization
      tags:
        - Organizations
      summary: Delete Organization
      description: |
        #### Allowed For

        * Admins
        * Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
      responses:
        "204":
          description: No Content Response
  /api/v2/organizations/{organization_id}/merge:
    parameters:
      - $ref: '#/components/parameters/OrganizationId'
    post:
      operationId: CreateOrganizationMerge
      tags:
        - Organizations
      summary: Merge Organization With Another Organization
      description: "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:\n\n- The \"losing\" organization will be deleted.\n- Other organization fields and their values will not be carried over to the \"winning\" organization.\n- The merge operation creates an `Organization Merge` record which contains a status indicating the progress of the merge.\n\n**Note**: This operation is irreversible.\n\n#### Merge Statuses\n\n| Status | Description |\n|--------|-------------|\n| new | A job has been queued to merge the two organizations. |\n| in progress | The job to merge the two organizations has started. |\n| error | An error occurred during the merge job. The merge can be retried by repeating the API call. | \n| complete | The merge has been completed successfully. |\n\n#### Allowed For\n\n* Admins\n"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrganizationMergeRequest'
            examples:
              default:
                $ref: '#/components/examples/OrganizationMergeRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMergeResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMergeResponseExample'
  /api/v2/organizations/{organization_id}/merges:
    parameters:
      - $ref: '#/components/parameters/OrganizationId'
    get:
      operationId: ListOrganizationMerges
      tags:
        - Organizations
      summary: List Organization Merges
      description: |
        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](/api-reference/introduction/pagination/) for more details.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMergeListResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMergeListResponseExample'
  /api/v2/organizations/{organization_id}/related:
    parameters:
      - $ref: '#/components/parameters/OrganizationId'
    get:
      operationId: OrganizationRelated
      tags:
        - Organizations
      summary: Show Organization's Related Information
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationsRelatedResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationsRelatedResponse'
  /api/v2/organizations/autocomplete:
    parameters:
      - $ref: '#/components/parameters/OrganizationQueryFragment'
      - $ref: '#/components/parameters/LookupRelationshipAutocompleteFieldIdFragment'
      - $ref: '#/components/parameters/LookupRelationshipAutocompleteSourceFragment'
    get:
      operationId: AutocompleteOrganizations
      tags:
        - Organizations
      summary: Autocomplete Organizations
      description: |
        Returns an array of organizations whose name starts with the
        value specified in the `name` parameter.

        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutocompleteOrganizationsResponseExample'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                default:
                  value:
                    errors:
                      - code: QueryError
                        title: Invalid type:sample_type
        "429":
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                default:
                  value:
                    errors:
                      - code: TooManyRequests
                        title: Too many requests to autocomplete
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              examples:
                default:
                  value:
                    errors:
                      - code: Unavailable
                        title: Internal Server Error
  /api/v2/organizations/count:
    get:
      operationId: CountOrganizations
      tags:
        - Organizations
      summary: Count Organizations
      description: |
        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
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountOrganizationResponse'
              examples:
                default:
                  $ref: '#/components/examples/CountOrganizationsResponseExample'
  /api/v2/organizations/create_many:
    post:
      operationId: CreateManyOrganizations
      tags:
        - Organizations
      summary: Create Many Organizations
      description: |
        Accepts an array of up to 100 organization objects.

        #### Response

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Agents, with restrictions applying on certain actions
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/ShowJobStatusResponseExample'
  /api/v2/organizations/create_or_update:
    post:
      operationId: CreateOrUpdateOrganization
      tags:
        - Organizations
      summary: Create Or Update Organization
      description: |
        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
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
              examples:
                default:
                  $ref: '#/components/examples/CreatedOrganizationResponseExample'
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationResponse'
              examples:
                default:
                  $ref: '#/components/examples/CreatedOrganizationResponseExample'
  /api/v2/organizations/destroy_many:
    parameters:
      - $ref: '#/components/parameters/OrganizationIds'
      - $ref: '#/components/parameters/OrganizationExternalIds'
    delete:
      operationId: DeleteManyOrganizations
      tags:
        - Organizations
      summary: Bulk Delete Organizations
      description: |
        Accepts a comma-separated list of up to 100 organization ids or external ids.

        #### Response

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Admins
        * Agents assigned to a custom role with permissions to manage organizations (Enterprise only)
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
  /api/v2/organizations/search:
    parameters:
      - $ref: '#/components/parameters/OrganizationExternalId'
      - $ref: '#/components/parameters/OrganizationName'
    get:
      operationId: SearchOrganizations
      tags:
        - Organizations
      summary: Search Organizations
      description: |
        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](https://support.zendesk.com/hc/en-us/articles/203662026#topic_cxn_hig_bd) in the Support Help Center.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationsResponseExample'
  /api/v2/organizations/show_many:
    parameters:
      - $ref: '#/components/parameters/OrganizationIds'
      - $ref: '#/components/parameters/OrganizationExternalIds'
    get:
      operationId: ShowManyOrganizations
      tags:
        - Organizations
      summary: Show Many Organizations
      description: |
        Accepts a comma-separated list of up to 100 organization ids or external ids.

        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutocompleteOrganizationsResponseExample'
  /api/v2/organizations/update_many:
    parameters:
      - $ref: '#/components/parameters/OrganizationIds'
      - $ref: '#/components/parameters/OrganizationExternalIds'
    put:
      operationId: UpdateManyOrganizations
      tags:
        - Organizations
      summary: Update Many Organizations
      description: |
        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`

        ```js
        {
          "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`

        ```js
        {
          "organizations": [
            { "id": 1, "notes": "Priority" },
            { "id": 2, "notes": "Normal" }
          ]
        }
        ```

        #### Response

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Admins
        * Agents

        Agents with no permissions restrictions can only update "notes" on organizations.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/ShowJobStatusResponseExample'
  /api/v2/problems:
    get:
      operationId: ListTicketProblems
      tags:
        - Tickets
      summary: List Ticket Problems
      description: |-
        The response is always ordered by `updated_at` in descending order

        #### Allowed For

        * Agents

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTicketProblemsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListTicketProblemsResponseExample'
  /api/v2/problems/autocomplete:
    post:
      operationId: AutocompleteProblems
      tags:
        - Tickets
      summary: Autocomplete Problems
      description: |-
        Returns tickets whose type is "problem" and whose subject contains the string specified in the `text` parameter.

        You can specify the `text` parameter in the request body rather than the query string. Example:

        `{"text": "fire"}`

        #### Allowed For

        * Agents
      parameters:
        - name: text
          in: query
          description: The text to search for
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: The text to search for
            example:
              text: fire
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTicketProblemsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListTicketProblemsResponseExample'
  /api/v2/push_notification_devices/destroy_many:
    post:
      operationId: PushNotificationDevices
      tags:
        - Push Notification Devices
      summary: Bulk Unregister Push Notification Devices
      description: |-
        Unregisters the mobile devices that are receiving push notifications. Specify the devices as an array of mobile device tokens.

        #### Allowed for

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PushNotificationDevicesRequest'
            examples:
              default:
                $ref: '#/components/examples/PushNotificationDevicesRequestExample'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: string
                description: empty
                example: ""
              example: ""
  /api/v2/queues:
    get:
      operationId: ListQueues
      tags:
        - Omnichannel Routing Queues
      summary: List queues
      description: |
        Returns all active queues for an account.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueuesResponse'
              examples:
                default:
                  $ref: '#/components/examples/QueuesResponseExample'
    post:
      operationId: CreateQueue
      tags:
        - Omnichannel Routing Queues
      summary: Create Queue
      description: |
        Creates a queue. Accepts a JSON queue definition as the request body.

        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueResponse'
              examples:
                default:
                  $ref: '#/components/examples/QueueCreateResponseExample'
  /api/v2/queues/{queue_id}:
    parameters:
      - $ref: '#/components/parameters/OcrQueueId'
    get:
      operationId: ShowQueueById
      tags:
        - Omnichannel Routing Queues
      summary: Show Queue
      description: |
        Returns a queue for the given queue id.
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueResponse'
              examples:
                default:
                  $ref: '#/components/examples/QueueResponseExample'
    put:
      operationId: UpdateQueue
      tags:
        - Omnichannel Routing Queues
      summary: Update Queue
      description: |
        Updates the queue definition for a given queue id.
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueResponse'
              examples:
                default:
                  $ref: '#/components/examples/QueuesUpdateResponseExample'
    delete:
      operationId: DeleteQueue
      tags:
        - Omnichannel Routing Queues
      summary: Delete Queue
      description: |
        Deletes the queue and related records.
        #### Allowed For

        * Admins
      responses:
        "204":
          description: No content response
  /api/v2/queues/definitions:
    get:
      operationId: ListQueueDefinitions
      tags:
        - Omnichannel Routing Queues
      summary: List Queue Definitions
      description: |
        Returns the definitions of the queues and the
        definitions of the conditions under which a queue can execute. The
        definition of the action includes a title ("Status"), a type ("list"), and
        possible values. The definition of the condition includes the same fields
        as well as the possible operators.
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefinitionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/DefinitionsResponseExample'
  /api/v2/queues/order:
    patch:
      operationId: ReorderQueues
      tags:
        - Omnichannel Routing Queues
      summary: Reorder Queues
      description: |
        Alters the evaluation order of OCR queues in the account.
        The evaluation order is set in a `queue_ids` array in the request body.

        You must include every queue id in your account to reorder the OCR queues. If not, the endpoint will return 400 Bad Request.

        #### Allowed For

        * Admins
      responses:
        "204":
          description: No Content
  /api/v2/recipient_addresses:
    get:
      operationId: ListSupportAddresses
      tags:
        - Support Addresses
      summary: List Support Addresses
      description: |
        Lists all the support addresses for the account.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportAddressesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SupportAddressesResponseExample'
    post:
      operationId: CreateSupportAddress
      tags:
        - Support Addresses
      summary: Create Support Address
      description: |
        Adds a Zendesk or external support address to your account.

        To add a Zendesk address, use the following syntax: `{local-part}@{accountname}.zendesk.com`.
        Example: 'sales-team@example.zendesk.com'. The [local-part](https://en.wikipedia.org/wiki/Email_address#Local-part) can be anything you like.

        To add an external email address such as help@omniwearshop.com, the email must already exist and you must set up forwarding on your email server. The exact steps depend on your mail server. See [Forwarding incoming email to Zendesk Support](https://support.zendesk.com/hc/en-us/articles/203663266). After setting up forwarding, run the [Verify Support Address Forwarding](#verify-support-address-forwarding) endpoint. The address won't work in Zendesk Support until it's been verified.

        #### Allowed For

        * Admins
        * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportAddressResponse'
              examples:
                default:
                  $ref: '#/components/examples/SupportAddressCreateResponseExample'
  /api/v2/recipient_addresses/{support_address_id}:
    parameters:
      - $ref: '#/components/parameters/SupportAddressId'
    get:
      operationId: ShowSupportAddress
      tags:
        - Support Addresses
      summary: Show Support Address
      description: |
        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportAddressResponse'
              examples:
                default:
                  $ref: '#/components/examples/SupportAddressResponseExample'
    put:
      operationId: UpdateSupportAddress
      tags:
        - Support Addresses
      summary: Update Support Address
      description: |
        Updates an existing support address for your account.

        You can't use this endpoint to update a support address's `email` property.
        Instead, you can create a new address using the [Create Support
        Address](#create-support-address) endpoint.

        #### Allowed For

        * Admins
        * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SupportAddressResponse'
              examples:
                default:
                  $ref: '#/components/examples/SupportAddressUpdateResponseExample'
    delete:
      operationId: DeleteRecipientAddress
      tags:
        - Support Addresses
      summary: Delete Support Address
      description: |
        Deletes a support address.

        #### Allowed For

        * Admins
        * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
      responses:
        "204":
          description: No Content response
  /api/v2/recipient_addresses/{support_address_id}/verify:
    parameters:
      - $ref: '#/components/parameters/SupportAddressId'
    put:
      operationId: VerifySupportAddressForwarding
      tags:
        - Support Addresses
      summary: Verify Support Address Forwarding
      description: |
        Sends a test email to the specified support address to verify that email forwarding for the address works. An external support address won't work in Zendesk Support until it's verified.

        **Note**: You don't need to verify Zendesk system support addresses.

        The endpoint takes the following body: `{"type": "forwarding"}`. The value of the `type` property defaults to "forwarding" if none is specified, but the values "spf" and "dns" are also accepted.

        Use this endpoint after [adding](#create-support-address) an external support address to Zendesk Support and setting up forwarding on your email server. See [Forwarding incoming email to Zendesk Support](https://support.zendesk.com/hc/en-us/articles/203663266).

        The endpoint doesn't return the results of the test. Instead, use the [Show Support Address](#show-support-address) endpoint to check that the `forwarding_status` property is "verified".

        Other verification checks can also be performed using this API. These include SPF checks and DNS checks.

        When calling the endpoint with `type` set to "spf", it will queries the DNS records to check that the SPF records for Zendesk are present for outbound emails.

        When calling the endpoint with `type` set to "dns", it runs checks on your CNAME records to make sure they are set up properly in your DNS.

        #### Allowed For

        * Admins
        * Agents with permission to manage channels and extensions. See the system permissions in [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026-Creating-custom-roles-and-assigning-agents-Enterprise-#topic_cxn_hig_bd) in the Support Help Center
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/relationships/definitions/{target_type}:
    get:
      operationId: GetRelationshipFilterDefinitions
      tags:
        - Lookup Relationships
      summary: Filter Definitions
      description: |
        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`.
      parameters:
        - name: target_type
          in: path
          description: |
            The target type for which you would like to see filter definitions.
            The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY"
          required: true
          schema:
            type: string
          example: zen:custom_object:apartment
        - name: source_type
          in: query
          description: |
            The source type for which you would like to see filter definitions.
            The options are "zen:user", "zen:ticket", and "zen:organization"
          schema:
            type: string
          example: zen:user
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RelationshipFilterDefinitionResponse'
              examples:
                default:
                  $ref: '#/components/examples/RelationshipFilterDefinitionExample'
  /api/v2/requests:
    get:
      operationId: ListRequests
      tags:
        - Requests
      summary: List Requests
      description: |
        #### Allowed for

        * End Users

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - name: sort_by
          in: query
          description: Possible values are "updated_at", "created_at"
          schema:
            type: string
        - name: sort_order
          in: query
          description: One of "asc", "desc". Defaults to "asc"
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestsResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestsResponseExample'
    post:
      operationId: CreateRequest
      tags:
        - Requests
      summary: Create Request
      description: |
        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](/documentation/developer-tools/getting-started/getting-a-trial-or-sponsored-account-for-development/))

        #### Additional properties

        In addition to the writable request properties in the [JSON Format table](#json-format) 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](#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](/documentation/ticketing/managing-tickets/creating-and-managing-requests#setting-collaborators)
        | requester           | object | yes*      | \*Required for anonymous requests. Specifies the requester of the anonymous request. See [Creating anonymous requests](/documentation/ticketing/managing-tickets/creating-and-managing-requests#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.
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestCreateResponseExample'
  /api/v2/requests/{request_id}:
    parameters:
      - $ref: '#/components/parameters/RequestId'
    get:
      operationId: ShowRequest
      tags:
        - Requests
      summary: Show Request
      description: |
        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | users            | The email ccs for a request by side-loading users

        #### Allowed For

        * End Users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestResponseExample'
    put:
      operationId: UpdateRequest
      tags:
        - Requests
      summary: Update Request
      description: |
        Updates a request with a comment or collaborators (cc's). The end user who created the request can also use it to mark the request as solved. The endpoint can't be used to update other request attributes.

        #### Writable properties
        This endpoint can only update the following properties in the request.

        | Name                     | Type    | Required | Description                                          |
        | ------------------------ | ------- | -------- | ---------------------------------------------------- |
        | comment                  | object  | no       | Adds a comment to the request. See [Request comments](#request-comments) |
        | solved                   | boolean | no       | Marks the request as solved. Example: `{"request": {"solved": "true"}}`. End users can mark requests as solved only if the request's `can_be_solved_by_me` property is true. The property is true only when the ticket is assigned to an agent and the ticket type is not a problem but a question, task, or incident |
        | additional_collaborators | array   | no       | Adds collaborators to the request. An email notification is sent to them when the ticket is updated. See [Adding collaborators](/documentation/ticketing/managing-tickets/creating-and-managing-requests#adding-collaborators) |

        #### Allowed For

        * End users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestCreateResponseExample'
  /api/v2/requests/{request_id}/comments:
    parameters:
      - $ref: '#/components/parameters/RequestId'
    get:
      operationId: ListComments
      tags:
        - Requests
      summary: Listing Comments
      description: |
        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        #### Sorting

        By default, comments are sorted by creation date in ascending order.

        When using cursor pagination, use the following parameter to change the sort order:

        | Name   | Type   | Required | Comments
        | ------ | ------ | -------- | --------
        | `sort` | string | no       | Possible values are "created_at" (ascending order) or "-created_at" (descending order)

        When using offset pagination, use the following parameters to change the sort order:

        | Name         | Type   | Required | Comments
        | ------------ | ------ | -------- | --------
        | `sort_by`    | string | no       | One of `created_at`, `updated_at`
        | `sort_order` | string | no       | One of `asc`, `desc`

        #### Allowed For

        * End Users
      parameters:
        - name: since
          in: query
          description: Filters the comments from the given datetime
          schema:
            type: string
        - name: role
          in: query
          description: One of "agent", "end_user". If not specified it does not filter
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketCommentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestListCommentsResponseExample'
  /api/v2/requests/{request_id}/comments/{ticket_comment_id}:
    parameters:
      - $ref: '#/components/parameters/RequestId'
      - $ref: '#/components/parameters/TicketCommentId'
    get:
      operationId: ShowComment
      tags:
        - Requests
      summary: Getting Comments
      description: |
        #### Allowed For

        * End Users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketCommentResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestGetCommentResponseExample'
  /api/v2/requests/search:
    get:
      operationId: SearchRequests
      tags:
        - Requests
      summary: Search Requests
      description: |
        Examples:

        * `GET /api/v2/requests/search.json?query=printer`
        * `GET /api/v2/requests/search.json?query=printer&organization_id=1`
        * `GET /api/v2/requests/search.json?query=printer&cc_id=true`
        * `GET /api/v2/requests/search.json?query=printer&status=hold,open`

        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Results limit

        The Search Requests endpoint returns up to 1,000 results per query, with a maximum of 100 results per page. See [Pagination](/api-reference/ticketing/introduction/#pagination). If you request a page past the limit (`page=11` at 100 results per page), a 422 Insufficient Resource Error is returned.

        #### Allowed For

        * End Users
      parameters:
        - name: query
          in: query
          description: The syntax and matching logic for the string is detailed in the [Zendesk Support search reference](https://support.zendesk.com/hc/en-us/articles/203663226). See also [Query basics](/api-reference/ticketing/ticket-management/search/#query-basics) in the Tickets API doc.
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestsResponse'
              examples:
                default:
                  $ref: '#/components/examples/RequestsResponseExample'
  /api/v2/resource_collections:
    get:
      operationId: ListResourceCollections
      tags:
        - Resource Collections
      summary: List Resource Collections
      description: |
        Lists resource collections for the account.

        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceCollectionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ResourceCollectionsResponseExample'
    post:
      operationId: CreateResourceCollection
      tags:
        - Resource Collections
      summary: Create Resource Collection
      description: |
        Creates a resource collection from a provided `payload` object. The `payload` object is specified the same way as the content of a requirements.json file in a Zendesk app. See [Specifying Apps Requirements](/documentation/apps/app-developer-guide/apps_requirements/) in the Zendesk Apps framework docs.

        The response includes a [job
        status](/api-reference/ticketing/ticket-management/job_statuses/) for creation of the specified resources.

        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/ResourceCollectionCreateResponseExample'
  /api/v2/resource_collections/{resource_collection_id}:
    parameters:
      - $ref: '#/components/parameters/ResourceCollectionId'
    get:
      operationId: RetrieveResourceCollection
      tags:
        - Resource Collections
      summary: Show Resource Collection
      description: |
        Retrieves details for a specified resource collection.

        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceCollectionResponse'
              examples:
                default:
                  $ref: '#/components/examples/ResourceCollectionResponseExample'
    put:
      operationId: UpdateResourceCollection
      tags:
        - Resource Collections
      summary: Update Resource Collection
      description: |
        Updates a resource collection using a provided `payload` object. The `payload` object  is specified the same way as the content of a requirements.json file in a Zendesk app. See [Specifying Apps Requirements](/documentation/apps/app-developer-guide/apps_requirements/) in the Zendesk Apps framework docs.

        The response includes a [job
        status](/api-reference/ticketing/ticket-management/job_statuses/) for the resource updates.

        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/ResourceCollectionUpdateResponseExample'
    delete:
      operationId: DeleteResourceCollection
      tags:
        - Resource Collections
      summary: Delete Resource Collection
      description: |
        Deletes a specified resource collection.

        The response includes a [job
        status](/api-reference/ticketing/ticket-management/job_statuses/) for deletion of the collection's resources.

        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/ResourceCollectionDeleteResponseExample'
  /api/v2/routing/agents/{user_id}/instance_values:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ListAGentAttributeValues
      tags:
        - Skill Based Routing
      summary: List Agent Attribute Values
      description: |
        Returns an attribute value.

        #### Allowed For

        * Agents and admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeValuesResponseExample'
    post:
      operationId: SetAgentAttributeValues
      tags:
        - Skill Based Routing
      summary: Set Agent Attribute Values
      description: |
        Adds the specified attributes if no attributes exists, or replaces all existing attributes with the specified attributes.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeValuesResponseExample'
  /api/v2/routing/attributes:
    get:
      operationId: ListAccountAttributes
      tags:
        - Skill Based Routing
      summary: List Account Attributes
      description: |
        Returns a list of attributes for the account.

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | attribute_values | The attribute values available on the account

        #### Allowed For

        * Agents and admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributesResponseExample'
    post:
      operationId: CreateAttribute
      tags:
        - Skill Based Routing
      summary: Create Attribute
      description: |
        Creates an attribute.

        #### Allowed For

        * Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeCreateResponseExample'
  /api/v2/routing/attributes/{attribute_id}:
    parameters:
      - $ref: '#/components/parameters/SkillBasedRoutingAttributeId'
    get:
      operationId: ShowAttribute
      tags:
        - Skill Based Routing
      summary: Show Attribute
      description: |
        Returns an attribute.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeResponseExample'
    put:
      operationId: UpdateAttribute
      tags:
        - Skill Based Routing
      summary: Update Attribute
      description: |
        Updates an attribute.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeUpdateResponseExample'
    delete:
      operationId: DeleteAttribute
      tags:
        - Skill Based Routing
      summary: Delete Attribute
      description: |
        Deletes an attribute.

        #### Allowed For

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/routing/attributes/{attribute_id}/values:
    parameters:
      - $ref: '#/components/parameters/SkillBasedRoutingAttributeId'
    get:
      operationId: ListAttributeValues
      tags:
        - Skill Based Routing
      summary: List Attribute Values for an Attribute
      description: |
        Returns a list of attribute values for a provided attribute.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeValuesResponseExample'
    post:
      operationId: CreateAttributeValue
      tags:
        - Skill Based Routing
      summary: Create Attribute Value
      description: |
        Creates an attribute value.

        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValueResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeValueCreateResponseExample'
  /api/v2/routing/attributes/{attribute_id}/values/{attribute_value_id}:
    parameters:
      - $ref: '#/components/parameters/SkillBasedRoutingAttributeId'
      - $ref: '#/components/parameters/SkillBasedRoutingAttributeValueId'
    get:
      operationId: ShowAttributeValue
      tags:
        - Skill Based Routing
      summary: Show Attribute Value
      description: |
        Returns an attribute value.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValueResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeValueResponseExample'
    patch:
      operationId: UpdateAttributeValue
      tags:
        - Skill Based Routing
      summary: Update Attribute Value
      description: |
        Updates the name and ticket conditions of a skill. When a ticket is created, the skill is applied to a ticket  if the ticket meets the specified condition or conditions. See the [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference/) for more information.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValueResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeValueUpdateResponseExample'
    delete:
      operationId: DeleteAttributeValue
      tags:
        - Skill Based Routing
      summary: Delete Attribute Value
      description: |
        Deletes an attribute value.

        #### Allowed For

        * Agents
      responses:
        "204":
          description: No Content response
  /api/v2/routing/attributes/definitions:
    get:
      operationId: ListRoutingAttributeDefinitions
      tags:
        - Skill Based Routing
      summary: List Routing Attribute Definitions
      description: |
        Returns the condition definitions that can be configured to apply attributes to a ticket.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeDefinitions'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingAttributeDefinitionsExample'
  /api/v2/routing/requirements/fulfilled:
    get:
      operationId: ListTicketsFullfilledByUser
      tags:
        - Skill Based Routing
      summary: List Tickets Fulfilled by a User
      description: |
        Returns a list of ticket ids that contain attributes matching the current user's attributes. Accepts a `ticket_ids` parameter for relevant tickets to check for matching attributes.

        #### Allowed For

        * Agents and admins
      parameters:
        - name: ticket_ids
          in: query
          description: The IDs of the relevant tickets to check for matching attributes
          required: true
          schema:
            type: integer
          example: 1
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingTicketFulfilledResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingTicketFulfilledResponseExample'
  /api/v2/routing/tickets/{ticket_id}/instance_values:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    get:
      operationId: ListTicketAttributeValues
      tags:
        - Skill Based Routing
      summary: List Ticket Attribute Values
      description: |
        Returns a list of attributes values for the ticket.

        #### Allowed For

        * Agents and admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingTicketAttributesResponseExample'
    post:
      operationId: SetTicketAttributeValues
      tags:
        - Skill Based Routing
      summary: Set Ticket Attribute Values
      description: |
        Adds the specified attributes if no attributes exists, or replaces all existing attributes with the specified attributes.

        Invalid or deleted attributes are ignored.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SkillBasedRoutingAttributeValuesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SkillBasedRoutingTicketAttributesResponseExample'
  /api/v2/satisfaction_ratings:
    get:
      operationId: ListSatisfactionRatings
      tags:
        - Satisfaction Ratings
      summary: List Satisfaction Ratings
      description: |
        #### Allowed For
        * Admins

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        #### Filters

        | Parameter  | Value
        | ---------- | -----
        | score      | offered, unoffered, received, received\_with\_comment, received\_without\_comment,<br/>good, good\_with\_comment, good\_without\_comment,<br/>bad, bad\_with\_comment, bad\_without\_comment
        | start_time | Time of the oldest satisfaction rating, as a [Unix epoch time](https://www.epochconverter.com/)
        | end_time   | Time of the most recent satisfaction rating, as a [Unix epoch time](https://www.epochconverter.com/)

        If you specify an unqualified score such as `good`, the results include all the records with and without comments.

        Examples:

        * `/api/v2/satisfaction_ratings.json?score=bad`
        * `/api/v2/satisfaction_ratings.json?score=bad&start_time=1498151194`
        * `/api/v2/satisfaction_ratings.json?start_time=1340384793&end_time=1371920793`
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SatisfactionRatingsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SatisfactionRatingsResponseExample'
  /api/v2/satisfaction_ratings/{satisfaction_rating_id}:
    get:
      operationId: ShowSatisfactionRating
      tags:
        - Satisfaction Ratings
      summary: Show Satisfaction Rating
      description: |
        Returns a specific satisfaction rating. You can get the id from
        the [List Satisfaction Ratings](#list-satisfaction-ratings) endpoint.

        #### Allowed For

         * Admins
      parameters:
        - name: satisfaction_rating_id
          in: path
          description: The id of the satisfaction rating to retrieve
          required: true
          schema:
            type: integer
          example: 35436
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SatisfactionRatingResponse'
              examples:
                default:
                  $ref: '#/components/examples/SatisfactionRatingResponseExample'
  /api/v2/satisfaction_ratings/count:
    get:
      operationId: CountSatisfactionRatings
      tags:
        - Satisfaction Ratings
      summary: Count Satisfaction Ratings
      description: |-
        Returns an approximate count of satisfaction ratings in the account. If the count exceeds 100,000, the count will return a cached result. This cached result will update every 24 hours.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For
        * Admins
      responses:
        "200":
          description: Count of satisfaction ratings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SatisfactionRatingsCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/SatisfactionRatingsCountResponseExample'
  /api/v2/satisfaction_reasons:
    get:
      operationId: ListSatisfactionRatingReasons
      tags:
        - Satisfaction Reasons
      summary: List Reasons for Satisfaction Rating
      description: |
        List all reasons for an account

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SatisfactionReasonsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SatisfactionReasonsResponseExample'
  /api/v2/satisfaction_reasons/{satisfaction_reason_id}:
    get:
      operationId: ShowSatisfactionRatings
      tags:
        - Satisfaction Reasons
      summary: Show Reason for Satisfaction Rating
      description: |
        #### Allowed For

        * Admins
      parameters:
        - name: satisfaction_reason_id
          in: path
          description: The id of the satisfaction rating reason
          required: true
          schema:
            type: integer
          example: 35121
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SatisfactionReasonResponse'
              examples:
                default:
                  $ref: '#/components/examples/SatisfactionReasonResponseExample'
  /api/v2/search:
    get:
      operationId: ListSearchResults
      tags:
        - Search
      summary: List Search Results
      description: "Returns the search results. See [Query basics](#query-basics) for the syntax of the `query` parameter.\n\nUse the ampersand character (&) to append the `sort_by` or `sort_order` parameters to the URL.\n\nFor examples, see [Searching with Zendesk API](/documentation/ticketing/using-the-zendesk-api/searching-with-the-zendesk-api).\n\n#### Allowed For\n\n* Agents\n\n#### Pagination\n\n* Offset pagination only\n\nOffset pagination may result in duplicate results when paging. You can also use the \n[Export Search Results](/api-reference/ticketing/ticket-management/search/#export-search-results) endpoint, which \nuses cursor-based pagination and doesn't return duplicate results. See \n[Using cursor pagination](/api-reference/introduction/pagination/#using-cursor-pagination) for more information.\n\n\n#### Errors JSON Format\n\nErrors are represented as JSON objects which have the following keys:\n\n| Name                  | Type                 | Comment\n| --------------------- | ---------------------| --------------------\n| error                 | string               | The type of error. Examples: \"unavailable\", \"invalid\"\n| description           | string               |\n\n##### Example Error\n```js\n{\n  \"error\": \"unavailable\",\n  \"description\": \"Sorry, we could not complete your search query. Please try again in a moment.\"\n}\n```\n"
      parameters:
        - name: query
          in: query
          description: The search query. See [Query basics](#query-basics) above. For details on the query syntax, see the [Zendesk Support search reference](https://support.zendesk.com/hc/en-us/articles/203663226)
          required: true
          schema:
            type: string
          example: https://subdomain.zendesk.com/api/v2/search.json?query=type:ticket status:closed&sort_by=status&sort_order=desc
        - name: sort_by
          in: query
          description: One of `updated_at`, `created_at`, `priority`, `status`, or `ticket_type`. Defaults to sorting by relevance
          schema:
            type: string
        - name: sort_order
          in: query
          description: One of `asc` or `desc`.  Defaults to `desc`
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
              examples:
                default:
                  $ref: '#/components/examples/SearchResponseExample'
  /api/v2/search/count:
    get:
      operationId: CountSearchResults
      tags:
        - Search
      summary: Show Results Count
      description: "Returns the number of items matching the query rather than the items. The search string works the same as a regular search.\n    \n#### Allowed For\n\n- Agents\n"
      parameters:
        - name: query
          in: query
          description: The search query
          required: true
          schema:
            type: string
          example: https://subdomain.zendesk.com/api/v2/search.json?query=type:ticket status:closed
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/SearchCountResponseExample'
  /api/v2/search/export:
    get:
      operationId: ExportSearchResults
      tags:
        - Search
      summary: Export Search Results
      description: |
        Exports a set of results. See [Query syntax](#query-syntax) for the syntax of the `query` parameter.

        Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the `created_at` attribute.

        The search only returns results of a single object type. The following object types are supported: ticket, organization, user, or group.

        You must specify the type in the `filter[type]` parameter. Searches with type in the query string will result in an error.

        #### Allowed For

        - Agents

        #### Pagination

        - Cursor pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 1000 records per page. The number of results shown in a page is determined by the `page[size]` parameter.

        **Note**: You may experience a speed reduction or a timeout if you request 1000 results per page and you have many archived tickets in the results. Try reducing the number of results per page. We recommend 100 results per page.

        The cursor specified by the `after_cursor` property in a response expires after one hour.

        For more information on cursor-based pagination, see the following articles:

        - [Comparing cursor pagination and offset pagination](/documentation/developer-tools/pagination/comparing-cursor-pagination-and-offset-pagination)
        - [Paginating through lists using cursor pagination](/documentation/developer-tools/pagination/paginating-through-lists-using-cursor-pagination)

        #### Limits

        This API endpoint is rate-limited to 100 requests per minute per account. The limit also counts towards the global API rate limit.

        #### Response Format

        | Name                  | Type                 | Comment
        | --------------------- | ---------------------| --------------------
        | links[next]           | string               | URL to the next page of results
        | meta[has_more]        | string               | Boolean indicating if there are more results
        | meta[after_cursor]    | string               | Cursor object returned from the Search Service
        | results               | array                | May consist of tickets, users, groups, or organizations, as specified by the `filter_type` parameter

        The response is similar to the response of `GET /api/v2/search.json?`, with a few changes:

        * `links` - Has the following nested properties: `prev` and `next`. These replace the `next_page` and `prev_page` links. The `prev` property is always null because backward pagination is not supported. The `next` property may include an auto-generated link to the next page of results.
        * `meta` - Has the following nested properties: `has_more` and `after_cursor`. The `has_more` property indicates whether the next page has more results. The `after_cursor` property is the cursor used to paginate to the next page. It expires after one hour.

        There's no `count` property.
      parameters:
        - name: query
          in: query
          description: The search query. See [Query basics](#query-basics) above. For details on the query syntax, see the [Zendesk Support search reference](https://support.zendesk.com/hc/en-us/articles/203663226)
          required: true
          schema:
            type: string
          example: https://subdomain.zendesk.com/api/v2/search.json?query=type:ticket status:closed&sort_by=status&sort_order=desc
        - name: page[size]
          in: query
          description: The number of results shown in a page.
          schema:
            type: integer
        - name: filter[type]
          in: query
          description: The object type returned by the export query. Can be `ticket`, `organization`, `user`, or `group`.
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchExportResponse'
              examples:
                default:
                  $ref: '#/components/examples/SearchExportResponseExample'
  /api/v2/sessions:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ListSessions
      tags:
        - Sessions
      summary: List Sessions
      description: |
        If authenticated as an admin, returns all the account's sessions. If authenticated as an agent or end user, returns only the sessions of the user making the request.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        #### Allowed For

        * Admins, Agents, End users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SessionsResponseExample'
  /api/v2/sharing_agreements:
    get:
      operationId: ListSharingAgreements
      tags:
        - Sharing Agreements
      summary: List Sharing Agreements
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingAgreementsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SharingAgreementsResponseExample'
    post:
      operationId: CreateSharingAgreement
      tags:
        - Sharing Agreements
      summary: Create Sharing Agreement
      description: |
        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingAgreementResponse'
              examples:
                default:
                  $ref: '#/components/examples/SharingAgreementResponseExample'
  /api/v2/sharing_agreements/{sharing_agreement_id}:
    parameters:
      - $ref: '#/components/parameters/SharingAgreementId'
    get:
      operationId: ShowSharingAgreement
      tags:
        - Sharing Agreements
      summary: Show a Sharing Agreement
      description: |
        Returns a sharing agreement for your account.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingAgreementResponse'
              examples:
                default:
                  $ref: '#/components/examples/SharingAgreementResponseExample'
    put:
      operationId: UpdateSharingAgreement
      tags:
        - Sharing Agreements
      summary: Update a Sharing Agreement
      description: |
        Returns an updated sharing agreement. Only `status` is allowed to be updated.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharingAgreementResponse'
              examples:
                default:
                  $ref: '#/components/examples/SharingAgreementUpdateResponseExample'
    delete:
      operationId: DeleteSharingAgreement
      tags:
        - Sharing Agreements
      summary: Delete a Sharing Agreement
      description: |
        Deletes a sharing agreement.

        #### Allowed For

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/skips:
    post:
      operationId: RecordNewSkip
      tags:
        - Ticket Skips
      summary: Record a New Skip for the Current User
      description: |
        Record a new ticket skip for the current user.

        #### Allowed For

        * Agents
      responses:
        "201":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketSkipCreation'
              examples:
                default:
                  $ref: '#/components/examples/TicketSkipCreationExample'
  /api/v2/slas/policies:
    get:
      operationId: ListSLAPolicies
      tags:
        - SLA Policies
      summary: List SLA Policies
      description: |
        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SLAPoliciesResponse'
              examples:
                default:
                  $ref: '#/components/examples/SLAPoliciesResponseExample'
    post:
      operationId: CreateSLAPolicy
      tags:
        - SLA Policies
      summary: Create SLA Policy
      description: |
        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SLAPolicyResponse'
              examples:
                default:
                  $ref: '#/components/examples/SLAPolicyCreateResponse'
  /api/v2/slas/policies/{sla_policy_id}:
    parameters:
      - $ref: '#/components/parameters/SLAPolicyId'
    get:
      operationId: ShowSLAPolicy
      tags:
        - SLA Policies
      summary: Show SLA Policy
      description: |
        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SLAPolicyResponse'
              examples:
                default:
                  $ref: '#/components/examples/SLAPolicyResponseExample'
    put:
      operationId: UpdateSLAPolicy
      tags:
        - SLA Policies
      summary: Update SLA Policy
      description: |
        Updates the specified policy.

        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SLAPolicyResponse'
              examples:
                default:
                  $ref: '#/components/examples/SLAPolicyUpdateResponse'
    delete:
      operationId: DeleteSLAPolicy
      tags:
        - SLA Policies
      summary: Delete SLA Policy
      description: |
        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/slas/policies/definitions:
    get:
      operationId: RetrieveSLAPolicyFilterDefinitionItems
      tags:
        - SLA Policies
      summary: Retrieve Supported Filter Definition Items
      description: |
        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SLAPolicyFilterDefinitionResponse'
              examples:
                default:
                  $ref: '#/components/examples/SLAPolicyFilterDefinitionResponseExample'
  /api/v2/slas/policies/reorder:
    put:
      operationId: ReorderSLAPolicies
      tags:
        - SLA Policies
      summary: Reorder SLA Policies
      description: |
        #### Availability

        * Accounts on the Support Professional or Suite Growth plan or above

        #### Allowed For

        * Admins
      parameters:
        - name: sla_policy_ids
          in: query
          description: The IDs of the SLA Policies to reorder
          schema:
            type: array
            items:
              type: integer
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/suspended_tickets:
    parameters:
      - $ref: '#/components/parameters/SuspendedTicketsSortBy'
      - $ref: '#/components/parameters/SuspendedTicketsSortOrder'
    get:
      operationId: ListSuspendedTickets
      tags:
        - Suspended Tickets
      summary: List Suspended Tickets
      description: |
        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
        * Unrestricted agents on all other plans

        #### Sorting

        You can sort the tickets with the `sort_by` and `sort_order` query string parameters.

        #### Pagination

        * Cursor pagination

        See [Pagination](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuspendedTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SuspendedTicketsResponseExample'
  /api/v2/suspended_tickets/{id}:
    get:
      operationId: ShowSuspendedTickets
      tags:
        - Suspended Tickets
      summary: Show Suspended Ticket
      description: |
        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
        * Unrestricted agents on all other plans
      parameters:
        - $ref: '#/components/parameters/SuspendedTicketId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuspendedTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SuspendedTicketsResponseExample'
    delete:
      operationId: DeleteSuspendedTicket
      tags:
        - Suspended Tickets
      summary: Delete Suspended Ticket
      description: |
        #### Allowed For

        * Unrestricted agents
      parameters:
        - $ref: '#/components/parameters/SuspendedTicketId'
      responses:
        "204":
          description: No Content response
  /api/v2/suspended_tickets/{id}/recover:
    put:
      operationId: RecoverSuspendedTicket
      tags:
        - Suspended Tickets
      summary: Recover Suspended Ticket
      description: |
        **Note**: During recovery, the API sets the requester to the authenticated agent who called the API, not the original requester. This prevents the ticket from being re-suspended after recovery. To preserve the original requester, use the [Recover Multiple Suspended Tickets](#recover-multiple-suspended-tickets) endpoint with the single ticket.

        This endpoint does not queue an asynchronous job that can be tracked from [Job Statuses](/api-reference/ticketing/ticket-management/job_statuses/). Instead, it processes the request with a synchronous response.
           - If all recoveries are successful, it returns a 200 with a `tickets` array in the response.
           - If all recoveries fail, it returns a 422 with a `suspended_tickets` array in the response.
           - If there is a mixture of successes and failures in a single call, it returns a 422 with a `suspended_tickets` array of the failures in the response.

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
        * Unrestricted agents on all other plans
      parameters:
        - $ref: '#/components/parameters/SuspendedTicketId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecoverSuspendedTicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/RecoverSuspendedTicketResponseExample'
        "422":
          description: Recovery failed response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecoverSuspendedTicketUnprocessableContentResponse'
              examples:
                default:
                  $ref: '#/components/examples/RecoverSuspendedTicketUnprocessableContentResponseExample'
  /api/v2/suspended_tickets/attachments:
    parameters:
      - $ref: '#/components/parameters/SuspendedTicketId'
    post:
      operationId: SuspendedTicketsAttachments
      tags:
        - Suspended Tickets
      summary: Suspended Ticket Attachments
      description: |
        Makes copies of any attachments on a suspended ticket and returns them as [attachment tokens](/api-reference/ticketing/tickets/ticket-attachments/). If the  ticket is manually recovered, you can include the attachment tokens on the new ticket.

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
        * Unrestricted agents on all other plans
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuspendedTicketsAttachmentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/SuspendedTicketsAttachmentsResponseExample'
  /api/v2/suspended_tickets/destroy_many:
    parameters:
      - $ref: '#/components/parameters/SuspendedTicketsDeleteIds'
    delete:
      operationId: DeleteSuspendedTickets
      tags:
        - Suspended Tickets
      summary: Delete Multiple Suspended Tickets
      description: |
        Accepts up to 100 ids (the auto-generated id, not the ticket id.)

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
        * Unrestricted agents on all other plans
      responses:
        "204":
          description: No Content response
  /api/v2/suspended_tickets/export:
    post:
      operationId: ExportSuspendedTickets
      tags:
        - Suspended Tickets
      summary: Export Suspended Tickets
      description: |
        Exports a list of suspended tickets for the Zendesk Support instance. To export the list, the endpoint enqueues a job to create a CSV file with the data. When done, Zendesk sends the requester an email containing a link to the CSV file. In the CSV, tickets are sorted by the update timestamp in ascending order.

         #### Allowed For

         * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
         * Unrestricted agents on all other plans

         #### Rate limits

         Limited to one request per minute and up to one million records in return. The rate-limiting mechanism behaves identically to the one described in [Usage limits](/api-reference/ticketing/account-configuration/usage_limits/#monitoring-your-request-activity).
         We recommend using the `Retry-After` header value as described in [Catching errors caused by rate limiting](/documentation/ticketing/using-the-zendesk-api/best-practices-for-avoiding-rate-limiting#catch).
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuspendedTicketsExportResponse'
              examples:
                default:
                  $ref: '#/components/examples/SuspendedTicketsExportResponseExample'
  /api/v2/suspended_tickets/recover_many:
    parameters:
      - $ref: '#/components/parameters/SuspendedTicketsRecoverIds'
    put:
      operationId: RecoverSuspendedTickets
      tags:
        - Suspended Tickets
      summary: Recover Multiple Suspended Tickets
      description: |
        Accepts up to 100 ids (the auto-generated id, not the ticket id.) Note that suspended tickets that fail to be recovered are still included in the response.

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage suspended tickets on Enterprise plans
        * Unrestricted agents on all other plans
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecoverSuspendedTicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/RecoverSuspendedTicketsResponseExample'
  /api/v2/tags:
    get:
      operationId: ListTags
      tags:
        - Tags
      summary: List Tags
      description: |
        Lists up to the 20,000 most popular tags in the last 60 days, in decreasing popularity.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TagsResponseExample'
  /api/v2/tags/count:
    get:
      operationId: CountTags
      tags:
        - Tags
      summary: Count Tags
      description: |
        Returns an approximate count of tags. 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, the `refreshed_at` property in the `count` object may
        occasionally be null. This indicates that the count is being
        updated in the background and the `value` property in the `count` object is limited to
        100,000 until the update is complete.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/TagCountResponseExample'
  /api/v2/target_failures:
    get:
      operationId: ListTargetFailures
      tags:
        - Target Failures
      summary: List Target Failures
      description: |
        Returns the 25 most recent target failures, per target.

        #### Stability

        * Development

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetFailuresResponse'
              examples:
                default:
                  $ref: '#/components/examples/TargetFailuresResponseExample'
  /api/v2/target_failures/{target_failure_id}:
    parameters:
      - $ref: '#/components/parameters/TargetFailureId'
    get:
      operationId: ShowTargetFailure
      tags:
        - Target Failures
      summary: Show Target Failure
      description: |
        #### Stability

        * Development

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetFailureResponse'
              examples:
                default:
                  $ref: '#/components/examples/TargetFailureResponseExample'
  /api/v2/targets:
    get:
      operationId: ListTargets
      tags:
        - Targets
      summary: List Targets
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TargetsResponseExample'
    post:
      operationId: CreateTarget
      tags:
        - Targets
      summary: Create Target
      description: |
        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetResponse'
              examples:
                default:
                  $ref: '#/components/examples/TargetCreateResponseExample'
  /api/v2/targets/{target_id}:
    parameters:
      - $ref: '#/components/parameters/TargetId'
    get:
      operationId: ShowTarget
      tags:
        - Targets
      summary: Show Target
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetResponse'
              examples:
                default:
                  $ref: '#/components/examples/TargetResponseExample'
    put:
      operationId: UpdateTarget
      tags:
        - Targets
      summary: Update Target
      description: |
        #### Allowed For
        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TargetResponse'
              examples:
                default:
                  $ref: '#/components/examples/TargetUpdateResponseExample'
    delete:
      operationId: DeleteTarget
      tags:
        - Targets
      summary: Delete Target
      description: |
        #### Allowed For
        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/ticket_audits:
    get:
      operationId: ListTicketAudits
      tags:
        - Ticket Audits
      summary: List All Ticket Audits
      description: "Returns ticket audits. Archived tickets are not included in the response. Use the [List Audits for a Ticket](#list-audits-for-a-ticket) endpoint to \nretrieve audit records for an archived ticket. To learn more about archived tickets, see [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756).\n\nThis endpoint should not be used for capturing change data. When continually chasing the tail of a cursor, some records will be skipped. For this use case, use the [Incremental Ticket Event Export API](/api-reference/ticketing/ticket-management/incremental_exports/#incremental-ticket-event-export).\n\n#### Allowed For\n\n* Admins\n"
      parameters:
        - name: page[before]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[after]
          in: query
          description: |
            A [pagination cursor](/documentation/api-basics/pagination/paginating-through-lists-using-cursor-pagination) 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.
          schema:
            type: string
        - name: page[size]
          in: query
          description: Specifies how many records to be returned in the response. You can specify up to 100 records per page.
          schema:
            type: integer
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketAuditsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketAuditsResponseExample'
  /api/v2/ticket_fields:
    get:
      operationId: ListTicketFields
      tags:
        - Ticket Fields
      summary: List Ticket Fields
      description: |
        Returns a list of all system and custom ticket fields in your account.

        For end users, only the ticket fields with visible_in_portal set to true are returned.

        Cursor pagination returns a maximum of 100 records per page and fields are returned in the order specified by their id.

        If the results are not paginated, every field is returned in the response and fields are returned in the order specified by the position.

        You can adjust the position of ticket fields by:

        - Using the [Update Ticket Field](/api-reference/ticketing/tickets/ticket_fields/#update-ticket-field) endpoint
        - Using the [Reorder Ticket Fields](/api-reference/ticketing/tickets/ticket_fields/#reorder-ticket-fields) endpoint
        - Ticket Fields page in the Admin Center (**Admin Center** > **Manage** > **Ticket** > **Fields** > **Actions** > **Edit order**)

        These adjustments determine the order in which fields are displayed in various locations. For accounts without access to multiple ticket forms, the order will also be used to display field values within tickets. However, for accounts with access to multiple ticket forms, the field order on the ticket page is defined within each form.

        Consider caching this resource to use with the [Tickets](/api-reference/ticketing/tickets/tickets/#json-format) API.

        #### Pagination

        - Cursor pagination (recommended)
        - No pagination

        See [Pagination](/api-reference/introduction/pagination/).

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | users            | The user or users that created the ticket field

        #### Allowed For

        * Anyone
      parameters:
        - name: locale
          in: query
          description: |
            Forces the `title_in_portal` property to return a dynamic content variant for the specified locale.
             Only accepts [active locale ids](/api-reference/ticketing/account-configuration/locales/#list-locales).
            Example: `locale="de"`.
          schema:
            type: string
        - name: creator
          in: query
          description: |
            Displays the `creator_user_id` and `creator_app_name` properties. If the ticket field is created
             by an app, `creator_app_name` is the name of the app and `creator_user_id` is `-1`. If the ticket field
             is not created by an app, `creator_app_name` is null
          schema:
            type: boolean
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFieldsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFieldsResponseExample'
    post:
      operationId: CreateTicketField
      tags:
        - Ticket Fields
      summary: Create Ticket Field
      description: "Creates any of the following custom field types:\n\n| Custom field type | Description                                                                                                                                                     |\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| text              | Default custom field type when `type` is not specified                                                                                                          |\n| textarea          | For multi-line text                                                                                                                                             |\n| checkbox          | To capture a boolean value. Allowed values are true or false. Optionally, you can specify a tag to be added to the ticket when the value is true.               |\n| date              | Example: 2021-04-16                                                                                                                                             |\n| integer           | String composed of numbers. May contain an optional decimal point                                                                                               |\n| decimal           | For numbers containing decimals                                                                                                                                 |\n| regexp            | Matches the Regex pattern found in the custom field settings                                                                                                    |\n| partialcreditcard | A credit card number. Only the last 4 digits are retained                                                                                                       | \n| multiselect       | Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging to the field's options.                             |\n| tagger            | Single-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {\"id\": 21938362, \"value\": [\"hd_3000\", \"hd_5555\"]}) |\n| lookup            | A field to create a relationship (see [lookup relationships](/api-reference/ticketing/lookup_relationships/lookup_relationships/)) to another object such as a user, ticket, or organization |\n\n**Note**: Tags can't be re-used across custom ticket fields. For example, if you configure a tag for a checkbox field, you can't use that tag value for a dropdown field option.\n\nSee [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in the Zendesk Help Center.\n\n#### Allowed For\n\n* Admins\n\n#### Field limits\n\nWe recommend the following best practices for ticket fields limits. Creating more than these amounts can affect performance.\n\n* 400 ticket fields per account if your account doesn't have ticket forms\n* 400 ticket fields per ticket form if your account has ticket forms\n"
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFieldResponseExample'
  /api/v2/ticket_fields/{ticket_field_id}:
    parameters:
      - $ref: '#/components/parameters/TicketFieldId'
      - $ref: '#/components/parameters/Creator'
    get:
      operationId: ShowTicketfield
      tags:
        - Ticket Fields
      summary: Show Ticket Field
      description: |
        #### Allowed for

        * Agents

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | users            | The user or users that created the ticket field
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFieldResponseExample'
    put:
      operationId: UpdateTicketField
      tags:
        - Ticket Fields
      summary: Update Ticket Field
      description: |
        #### Updating drop-down field options

        You can also use the update endpoint to add, update, or remove options in a drop-down custom field. Updating field options for multi-select fields works exactly the same as drop-down field options.

        **Important**: Unless you want to remove some options, you must specify all existing options in any update request. Omitting an option removes it from the drop-down field, which removes its values from any tickets or macros.

        Use the `custom_field_options` attribute to update the options. The attribute consists of an array of option objects, with each object consisting of a `name` and `value` property. The properties correspond to the "Title" and "Tag" text boxes in the admin interface. Example request body:

        ```json
        {"ticket_field": {
            "custom_field_options": [
              {"name": "Apple Pie", "value": "apple"},
              {"name": "Pecan Pie", "value": "pecan"}
            ]
          }
        }
        ```

        #### Example Request

        ```bash
        curl https://{subdomain}.zendesk.com/api/v2/ticket_fields/{id}.json \
          -d '{"ticket_field": {"custom_field_options": [{"name": "Apple Pie", "value": "apple"}, {"name": "Pecan Pie", "value": "pecan"}]}}' \
          -H "Content-Type: application/json" -X PUT \
          -v -u {email_address}/token:{api_token}
        ```

        #### Example Response

        ```http
        Status: 200 OK

        {
          "ticket_field": {
            "id":21938362,
            "type":"tagger",
            "title":"Pies",
            ...
            "custom_field_options": [
              {
                "id":21029772,
                "name":"Apple Pie",
                "raw_name":"Apple Pie",
                "value":"apple",
                "default":false
              },
              ...
            ]
          }
        }
        ```

        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFieldUpdateResponseExample'
    delete:
      operationId: DeleteTicketField
      tags:
        - Ticket Fields
      summary: Delete Ticket Field
      description: |
        #### Allowed for

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/ticket_fields/{ticket_field_id}/options:
    parameters:
      - $ref: '#/components/parameters/TicketFieldId'
    get:
      operationId: ListTicketFieldOptions
      tags:
        - Ticket Fields
      summary: List Ticket Field Options
      description: |
        Returns a list of custom ticket field options for the given drop-down ticket field.

        #### Allowed For

        * Agents

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomTicketFieldOptionsResponseExample'
    post:
      operationId: CreateOrUpdateTicketFieldOption
      tags:
        - Ticket Fields
      summary: Create or Update Ticket Field Option
      description: |
        Creates or updates an option for the given drop-down ticket field.

        To update an option, include the id of the option in the `custom_field_option` object. Example:

        `{"custom_field_option": {"id": 10002, "name": "Pineapples", ... }`

        If an option exists for the given ID, the option will be updated. Otherwise, a new option will be created.

        #### Response

        Returns one of the following status codes:

        - 200 with `Location: /api/v2/ticket_fields/{ticket_field_id}/options.json` if the ticket field option already exists in the database
        - 201 with `Location: /api/v2/ticket_fields/{ticket_field_id}/options.json` if the ticket field option is new

        #### Allowed For

        * Admins

        #### Rate Limit
        You can make 100 requests every 1 minute using this endpoint.
        The rate limiting mechanism behaves as described in
        [Monitoring your request activity](/api-reference/ticketing/account-configuration/usage_limits/#monitoring-your-request-activity) in the API introduction.

        #### Field Option Limits

        * 2000 options per ticket field
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomTicketFieldOptionUpdateResponseExample'
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomTicketFieldOptionCreateResponseExample'
  /api/v2/ticket_fields/{ticket_field_id}/options/{ticket_field_option_id}:
    parameters:
      - $ref: '#/components/parameters/TicketFieldId'
      - $ref: '#/components/parameters/TicketFieldOptionId'
    get:
      operationId: ShowTicketFieldOption
      tags:
        - Ticket Fields
      summary: Show Ticket Field Option
      description: |
        #### Allowed for
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomTicketFieldOptionResponseExample'
    delete:
      operationId: DeleteTicketFieldOption
      tags:
        - Ticket Fields
      summary: Delete Ticket Field Option
      description: |
        #### Allowed for
        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/ticket_fields/count:
    get:
      operationId: CountTicketFields
      tags:
        - Ticket Fields
      summary: Count Ticket Fields
      description: |-
        Returns an approximate count of system and custom ticket fields in the account. If the count exceeds 100,000, the count will return a cached result.  This cached result will update every 24 hours.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Count of ticket fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFieldCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFieldCountResponseExample'
  /api/v2/ticket_fields/reorder:
    put:
      operationId: ReorderTicketFields
      tags:
        - Ticket Fields
      summary: Reorder Ticket Fields
      description: |
        #### Allowed For
        * Admins

        #### Request Parameters

        You can pass in the following parameter in the payload:

        | Name                | Type   | Comment
        | ------------------- | ------ | --------
        | ticket_field_ids    | array  | An array of ticket field ids. Example: "[2, 23, 46, 50]". Not all ticket_field_ids are necessary in the payload; only those provided will be assigned to the first positions. Missing IDs will be assigned incremental positions automatically.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/ticket_form_statuses:
    get:
      operationId: ListTicketFormStatuses
      tags:
        - Ticket Form Statuses
      summary: List Ticket Form Statuses
      description: |
        Fetches all of the ticket form statuses for the account.

        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
  /api/v2/ticket_form_statuses/show_many:
    get:
      operationId: ShowManyTicketFormStatuses
      tags:
        - Ticket Form Statuses
      summary: Show Many Ticket Form Statuses
      description: |
        Fetches all of the ticket form statuses specified by a comma separated list of ids.
        #### Allowed For
        * Admins
        * Agents
      parameters:
        - name: ids
          in: query
          description: Ticket form status ids to retrieve records for
          required: true
          schema:
            type: string
          example: abc,def,ghi
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
  /api/v2/ticket_forms:
    get:
      operationId: ListTicketForms
      tags:
        - Ticket Forms
      summary: List Ticket Forms
      description: |
        Returns a list of all ticket forms for your account if accessed as an admin or agent. End users only see ticket forms that have `end_user_visible` set to true.

        #### Allowed For

        * Anyone
      parameters:
        - name: active
          in: query
          description: true returns active ticket forms; false returns inactive ticket forms. If not present, returns both
          schema:
            type: boolean
        - name: end_user_visible
          in: query
          description: true returns ticket forms where `end_user_visible`; false returns ticket forms that are not end-user visible. If not present, returns both
          schema:
            type: boolean
        - name: fallback_to_default
          in: query
          description: true returns the default ticket form when the criteria defined by the parameters results in a set without active and end-user visible ticket forms
          schema:
            type: boolean
        - name: associated_to_brand
          in: query
          description: true returns the ticket forms of the brand specified by the url's subdomain
          schema:
            type: boolean
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormsResponseExample'
    post:
      operationId: CreateTicketForm
      tags:
        - Ticket Forms
      summary: Create Ticket Form
      description: |
        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormCreateResponseExample'
  /api/v2/ticket_forms/{ticket_form_id}:
    parameters:
      - $ref: '#/components/parameters/TicketFormId'
    get:
      operationId: ShowTicketForm
      tags:
        - Ticket Forms
      summary: Show Ticket Form
      description: |
        #### Allowed For

        * Admins, Agents, and End Users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormResponseExample'
    put:
      operationId: UpdateTicketForm
      tags:
        - Ticket Forms
      summary: Update Ticket Form
      description: |
        #### Allowed For
        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormUpdateResponseExample'
    delete:
      operationId: DeleteTicketForm
      tags:
        - Ticket Forms
      summary: Delete Ticket Form
      description: |
        #### Allowed For
        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/ticket_forms/{ticket_form_id}/clone:
    parameters:
      - $ref: '#/components/parameters/TicketFormId'
    post:
      operationId: CloneTicketForm
      tags:
        - Ticket Forms
      summary: Clone an Already Existing Ticket Form
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormResponseExample'
  /api/v2/ticket_forms/{ticket_form_id}/ticket_form_statuses:
    parameters:
      - $ref: '#/components/parameters/TicketFormId'
    get:
      operationId: TicketFormTicketFormStatuses
      tags:
        - Ticket Forms
        - Ticket Form Statuses
      summary: List Ticket Form Statuses of a Ticket Form
      description: |
        Fetches all of the associated ticket form statuses of a ticket form.

        #### Allowed For

        * Admins
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
    post:
      operationId: CreateTicketFormStatuses
      tags:
        - Ticket Forms
        - Ticket Form Statuses
      summary: Create Ticket Form Statuses
      description: |
        Creates one or many ticket form status associations

        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketFormStatusesParams'
            example:
              ticket_form_status:
                - custom_status_id: 1234
                - custom_status_id: 1235
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
    put:
      operationId: UpdateTicketFormStatuses
      tags:
        - Ticket Forms
        - Ticket Form Statuses
      summary: Bulk Update Ticket Form Statuses of a Ticket Form
      description: |
        Updates or deletes ticket form status associations. This is a bulk operation that can both add and remove ticket form status associations for a form in one call.

        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTicketFormStatusesParams'
            example:
              ticket_form_status:
                - _destroy: "1"
                  id: abcdef
                - custom_status_id: 1
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
    delete:
      operationId: DeleteTicketFormStatuses
      tags:
        - Ticket Form Statuses
      summary: Delete Ticket Form Statuses
      description: |
        Deletes all of of the ticket form statuses by id.

        #### Allowed For

        * Admins
        * Agents
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: array
                  description: List of ids to delete
                  items:
                    type: string
            example:
              id:
                - abc
                - def
                - hij
      responses:
        "204":
          description: Success response
  /api/v2/ticket_forms/{ticket_form_id}/ticket_form_statuses/{ticket_form_status_id}:
    parameters:
      - $ref: '#/components/parameters/TicketFormId'
      - $ref: '#/components/parameters/TicketFormStatusId'
    put:
      operationId: UpdateTicketFormStatusById
      tags:
        - Ticket Forms
        - Ticket Form Statuses
      summary: Update Ticket Form Status By Id
      description: |
        Updates or deletes ticket form status association by id.

        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTicketFormStatusesParams'
            example:
              ticket_form_status:
                - custom_status_id: 1
                - custom_status_id: 2
                - custom_status_id: 3
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormStatusesResponseExample'
    delete:
      operationId: DeleteTicketFormStatusById
      tags:
        - Ticket Form Statuses
      summary: Delete Ticket Form Status By Id
      description: |
        Deletes a ticket form status by id.

        #### Allowed For

        * Admins
      responses:
        "204":
          description: Success response
  /api/v2/ticket_forms/reorder:
    put:
      operationId: ReorderTicketForms
      tags:
        - Ticket Forms
      summary: Reorder Ticket Forms
      description: |
        #### Allowed For
        * Admins

        #### Request Parameters

        You can pass in the following parameter in the payload:

        | Name                | Type   | Comment
        | ------------------- | ------ | --------
        | ticket_form_ids     | array  | An array of ticket form ids. Example: "[2, 23, 46, 50]"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormsResponseExample'
  /api/v2/ticket_forms/show_many:
    get:
      operationId: ShowManyTicketForms
      tags:
        - Ticket Forms
      summary: Show Many Ticket Forms
      description: |
        Takes an `ids` query parameter that accepts a comma-separated list of up to 100 ticket form ids. This endpoint is used primarily by the [mobile SDK](/documentation/classic-web-widget-sdks/) and the [Web Widget](/api-reference/widget/introduction/).

        #### Allowed For

        * Anyone
      parameters:
        - name: ids
          in: query
          description: IDs of the ticket forms to be shown
          required: true
          schema:
            type: string
          example: 1,2,3
        - name: active
          in: query
          description: true returns active ticket forms; false returns inactive ticket forms. If not present, returns both
          schema:
            type: boolean
        - name: end_user_visible
          in: query
          description: true returns ticket forms where `end_user_visible`; false returns ticket forms that are not end-user visible. If not present, returns both
          schema:
            type: boolean
        - name: fallback_to_default
          in: query
          description: true returns the default ticket form when the criteria defined by the parameters results in a set without active and end-user visible ticket forms
          schema:
            type: boolean
        - name: associated_to_brand
          in: query
          description: true returns the ticket forms of the brand specified by the url's subdomain
          schema:
            type: boolean
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketFormsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketFormsResponseExample'
  /api/v2/ticket_metrics:
    get:
      operationId: ListTicketMetrics
      tags:
        - Ticket Metrics
      summary: List Ticket Metrics
      description: |
        Returns a list of tickets with their metrics.

        Tickets are ordered chronologically by created date, from newest to oldest.
        The last ticket listed may not be the absolute oldest ticket in your account
        due to ticket archiving.

        Archived tickets are not included in the response. See
        [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756) in
        Zendesk help.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.


        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketMetricsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketMetricsResponseExample'
  /api/v2/ticket_metrics/{ticket_metric_id}:
    get:
      operationId: ShowTicketMetrics
      tags:
        - Ticket Metrics
      summary: Show Ticket Metrics
      description: |
        Returns a specific metric, or the metrics of a specific ticket.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      parameters:
        - name: ticket_metric_id
          in: path
          description: The id of the ticket metric to retrieve
          required: true
          schema:
            type: string
          example: "10001"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketMetricsByTicketMetricIdResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketMetricResponseExample'
  /api/v2/tickets:
    get:
      operationId: ListTickets
      tags:
        - Tickets
      summary: List Tickets
      parameters:
        - name: external_id
          in: query
          description: Lists tickets by external id. External ids don't have to be unique for each ticket. As a result, the request may return multiple tickets with the same external id.
          schema:
            type: string
      responses:
        "200":
          description: List tickets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketsResponseExample'
    post:
      operationId: CreateTicket
      tags:
        - Tickets
      summary: Create Ticket
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/TicketCreateRequestExample'
      responses:
        "201":
          description: Create ticket
          headers:
            Location:
              description: The URL of the created ticket
              schema:
                type: string
                format: url
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketResponseExample'
  /api/v2/tickets/{ticket_id}:
    get:
      operationId: ShowTicket
      tags:
        - Tickets
      summary: Show Ticket
      description: |-
        Returns a number of ticket properties though not the ticket comments. To get the comments, use [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments)

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Ticket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketResponseExample'
    put:
      operationId: UpdateTicket
      tags:
        - Tickets
      summary: Update Ticket
      parameters:
        - $ref: '#/components/parameters/TicketId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/TicketUpdateRequestExample'
      responses:
        "200":
          description: Successful request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketUpdateResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketUpdateResponseExample'
    delete:
      operationId: DeleteTicket
      tags:
        - Tickets
      summary: Delete Ticket
      description: |-
        #### Allowed For

        * Admins
        * Agents with permission to delete tickets

        Agent delete permissions are set in Support. See
        [Deleting tickets](https://support.zendesk.com/hc/en-us/articles/203690936)
        in the Support Help Center.

        #### Ticket deletion rate limit

        You can delete 400 tickets every 1 minute using this endpoint.
        The rate limiting mechanism behaves as described in
        [Rate limits](/api-reference/introduction/rate-limits/) in the API introduction.
        Zendesk recommends that you obey the Retry-After header values.
        To delete many tickets, you may use [Bulk Delete Tickets](/api-reference/ticketing/tickets/tickets/#bulk-delete-tickets).
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "204":
          description: No content
  /api/v2/tickets/{ticket_id}/audits:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    get:
      operationId: ListAuditsForTicket
      tags:
        - Ticket Audits
      summary: List Audits for a Ticket
      description: |
        Lists the audits for a specified ticket.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        **Note**: Audits for [Archived Tickets](https://support.zendesk.com/hc/en-us/articles/4408887617050) do not support pagination for this endpoint.

        #### Allowed for

        * Agents
      responses:
        "200":
          description: OK response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketAuditsResponseNoneCursor'
              examples:
                default:
                  $ref: '#/components/examples/TicketAuditsForTicketResponseExample'
  /api/v2/tickets/{ticket_id}/audits/{ticket_audit_id}:
    parameters:
      - $ref: '#/components/parameters/TicketId'
      - $ref: '#/components/parameters/TicketAuditId'
    get:
      operationId: ShowTicketAudit
      tags:
        - Ticket Audits
      summary: Show Audit
      description: |
        #### Allowed for

        * Agents
      responses:
        "200":
          description: OK response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketAuditResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketAuditResponseExample'
  /api/v2/tickets/{ticket_id}/audits/{ticket_audit_id}/make_private:
    parameters:
      - $ref: '#/components/parameters/TicketId'
      - $ref: '#/components/parameters/TicketAuditId'
    put:
      operationId: MakeTicketCommentPrivateFromAudits
      tags:
        - Ticket Audits
      summary: Change a Comment From Public To Private
      description: |
        #### Allowed for

        * Agents
      responses:
        "200":
          description: description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/tickets/{ticket_id}/audits/count:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    get:
      operationId: CountAuditsForTicket
      tags:
        - Ticket Audits
      summary: Count Audits for a Ticket
      description: |
        Returns an approximate count of audits for a specified ticket. If the count exceeds 100,000, the count will return a cached result.  This cached result will update every 24 hours.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: If the total number of audits for a ticket exceeds 100,000, this endpoint returns a count of 100,000 with a `count[refreshed_at]` value of null. This value is cached for 24 hours, during which any requests returns the same count and timestamp. After 24 hours, the endpoint temporarily shows the same count again before providing an updated total.

        #### Allowed for

        * Agents
      responses:
        "200":
          description: Count of audits on a ticket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketAuditsCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketAuditsCountResponseExample'
  /api/v2/tickets/{ticket_id}/collaborators:
    get:
      operationId: ListTicketCollaborators
      tags:
        - Tickets
      summary: List Collaborators for a Ticket
      description: |-
        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTicketCollaboratorsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListTicketCollaboratorsResponseExample'
  /api/v2/tickets/{ticket_id}/comments:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    get:
      operationId: ListTicketComments
      tags:
        - Ticket Comments
      summary: List Comments
      description: |
        Returns the comments added to the ticket.

        Each comment may include a `content_url` for an attachment or a `recording_url` for a voice comment that points to a file that may be hosted externally. For security reasons, take care not to inadvertently send Zendesk authentication credentials to third parties when attempting to access these files. See [Working with url properties](/documentation/ticketing/managing-tickets/working-with-url-properties).

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Sorting

        By default, comments are sorted by creation date in ascending order.

        When using cursor pagination, use the following parameter to change the sort order:

        | Name   | Type   | Required | Comments
        | ------ | ------ | -------- | --------
        | `sort` | string | no       | Possible values are "created_at" (ascending order) or "-created_at" (descending order)

        When using offset pagination, use the following parameters to change the sort order:

        | Name         | Type   | Required | Comments
        | ------------ | ------ | -------- | --------
        | `sort_order` | string | no       | One of `asc`, `desc`. Defaults to `asc`

        #### Allowed For

        * Agents
      parameters:
        - name: include_inline_images
          in: query
          description: Default is false. When true, inline images are also listed as attachments in the response
          schema:
            type: boolean
        - name: include
          in: query
          description: 'Accepts "users". Use this parameter to list email CCs by side-loading users. Example: `?include=users`. **Note**: If the comment source is email, a deleted user will be represented as the CCd email address. If the comment source is anything else, a deleted user will be represented as the user name.'
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketCommentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketCommentsResponseExample'
  /api/v2/tickets/{ticket_id}/comments/{comment_id}/attachments/{attachment_id}/redact:
    parameters:
      - $ref: '#/components/parameters/TicketId'
      - $ref: '#/components/parameters/CommentId'
      - $ref: '#/components/parameters/AttachmentId'
    put:
      operationId: RedactCommentAttachment
      tags:
        - Attachments
      summary: Redact Comment Attachment
      description: |
        Redaction allows you to permanently remove attachments from an existing comment on a ticket. Once removed from a comment, the attachment is replaced with an empty "redacted.txt" file.

        The redaction is permanent. It is not possible to undo redaction or see what was removed. Once a ticket is closed, redacting its attachments is no longer possible.

        Also, if you want to redact an inline attachment, you can use the `include_inline_images` parameter in the [List Comments](/api-reference/ticketing/tickets/ticket_comments/#list-comments) operation to obtain the inline attachment ID, and use it in the request URL.

        #### Allowed For

        * Admins
        * Agents when [deleting tickets is enabled for agents on professional accounts](https://support.zendesk.com/hc/en-us/articles/360002128107)
        * Agents assigned to a custom role with permissions to redact ticket content (Enterprise only)
      responses:
        "200":
          description: OK response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentResponseExample'
  /api/v2/tickets/{ticket_id}/comments/{ticket_comment_id}/make_private:
    parameters:
      - $ref: '#/components/parameters/TicketId'
      - $ref: '#/components/parameters/TicketCommentId'
    put:
      operationId: MakeTicketCommentPrivate
      tags:
        - Ticket Comments
      summary: Make Comment Private
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/tickets/{ticket_id}/comments/{ticket_comment_id}/redact:
    parameters:
      - $ref: '#/components/parameters/TicketId'
      - $ref: '#/components/parameters/TicketCommentId'
    put:
      operationId: RedactStringInComment
      tags:
        - Ticket Comments
      summary: Redact String in Comment
      description: |
        Permanently removes words or strings from a ticket comment. Specify the string to redact in an object with a `text` property. Example: `'{"text": "987-65-4320"}'`. The characters of the word or string are replaced by the ▇ symbol.

        If the comment was made by email, the endpoint also attempts to redact the string from the original email retained by Zendesk for audit purposes.

        **Note**: If you use the rich text editor, support for redacting formatted text (bold, italics, hyperlinks) is limited.

        Redaction is permanent. You can't undo the redaction or see *what* was removed. Once a ticket is closed, you can no longer redact strings from its comments.

        To use this endpoint, the "Agents can delete tickets" option must be enabled in the Zendesk Support admin interface at **Admin** > **Settings** > **Agents**.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketCommentResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketCommentStringRedactResponseExample'
  /api/v2/tickets/{ticket_id}/comments/count:
    get:
      operationId: CountTicketComments
      tags:
        - Ticket Comments
      summary: Count Ticket Comments
      description: |-
        Returns an approximate count of the comments added to the ticket. If the count exceeds 100,000, the count will return a cached result.  This cached result will update every 24 hours.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Count of ticket comments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketCommentsCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketCommentsCountResponseExample'
  /api/v2/tickets/{ticket_id}/email_ccs:
    get:
      operationId: ListTicketEmailCCs
      tags:
        - Tickets
      summary: List Email CCs for a Ticket
      description: |-
        Returns any users cc'd on the ticket.

        #### Availability

        The [CCs and Followers](https://support.zendesk.com/hc/en-us/articles/203690846) feature must be enabled in Zendesk Support.

        If the feature is not enabled, the default CC functionality is used. In that case, use [List Collaborators](/api-reference/ticketing/tickets/tickets/#list-collaborators-for-a-ticket) to list the users cc'ed on the ticket.

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTicketEmailCCsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListTicketEmailCCsResponseExample'
  /api/v2/tickets/{ticket_id}/followers:
    get:
      operationId: ListTicketFollowers
      tags:
        - Tickets
      summary: List Followers for a Ticket
      description: |-
        Returns any users who follow the ticket.

        #### Availability

        The [CCs and Followers](https://support.zendesk.com/hc/en-us/articles/203690846) feature must be enabled in Zendesk Support.

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTicketFollowersResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListTicketFollowersResponseExample'
  /api/v2/tickets/{ticket_id}/incidents:
    get:
      operationId: ListTicketIncidents
      tags:
        - Tickets
      summary: List Ticket Incidents
      description: |-
        #### Allowed For

        * Agents

        #### Pagination
        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTicketIncidentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ListTicketIncidentsResponseExample'
  /api/v2/tickets/{ticket_id}/macros/{macro_id}/apply:
    parameters:
      - $ref: '#/components/parameters/MacroId'
      - name: ticket_id
        in: path
        description: The ID of the ticket
        required: true
        schema:
          type: integer
        example: 35436
    get:
      operationId: ShowTicketAfterChanges
      tags:
        - Macros
      summary: Show Ticket After Changes
      description: |
        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](#show-changes-to-ticket).

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroApplyTicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroChangesToTicketsResponseExample'
  /api/v2/tickets/{ticket_id}/mark_as_spam:
    put:
      operationId: MarkTicketAsSpamAndSuspendRequester
      tags:
        - Tickets
      summary: Mark Ticket as Spam and Suspend Requester
      description: |-
        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: string
                example: ""
              example: ""
  /api/v2/tickets/{ticket_id}/merge:
    post:
      operationId: MergeTicketsIntoTargetTicket
      tags:
        - Tickets
      summary: Merge Tickets into Target Ticket
      description: |-
        Merges one or more tickets into the ticket with the specified id.

        See [Merging tickets](https://support.zendesk.com/hc/en-us/articles/203690916)
        in the Support Help Center for ticket merging rules.

        Any attachment to the source ticket is copied to the target ticket.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Agents

        Agents in the Enterprise account must have merge permissions.
        See [Creating custom roles and assigning agents (Enterprise)](https://support.zendesk.com/hc/en-us/articles/203662026)
        in the Support Help Center.

        #### Available parameters

        The request takes a data object with the following properties:

        | Name                     | Type    | Required | Comments                                                |
        | ------------------------ | ------- | -------- | ------------------------------------------------------- |
        | ids                      | array   | yes      | Ids of tickets to merge into the target ticket          |
        | target_comment           | string  | no       | Private comment to add to the target ticket. This comment is optional but strongly recommended |
        | source_comment           | string  | no       | Private comment to add to the source ticket. This comment is optional but strongly recommended |
        | target_comment_is_public | boolean | no       | Whether comments in the target ticket are public or private   |
        | source_comment_is_public | boolean | no       | Whether comments in the source tickets are public or private |

        `target_comment` and `source_comment` can be used to provide a reason for the merge for recordkeeping purposes. If the source ticket has attachments, they are included in `target_comment`.

        Comments are private and can't be modified in the following cases:

          * Any of the sources or target tickets are private
          * Any of the sources or target tickets were created through X (formerly Twitter), Facebook or the Channel framework

        In any other case, comments default to private but can be modified with the comment privacy parameters.
      parameters:
        - $ref: '#/components/parameters/TicketId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketMergeInput'
            examples:
              default:
                $ref: '#/components/examples/TicketMergeInputExample'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/tickets/{ticket_id}/related:
    get:
      operationId: TicketRelatedInformation
      tags:
        - Tickets
      summary: Ticket Related Information
      description: |-
        The request returns a data object with the following properties:

        | Name                | Type    | Comment
        | ------------------- | ------- | -------
        | topic_id            | string  | Related topic in the Web portal (deprecated feature)
        | jira_issue_ids      | array   | Array of associated jira issues
        | followup_source_ids | array   | Sources to follow up
        | from_archive        | boolean | Is true if the current ticket is archived
        | incidents           | integer | A count of related incident occurrences

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketId'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketRelatedInformation'
              examples:
                default:
                  $ref: '#/components/examples/TicketRelatedInformationExample'
  /api/v2/tickets/{ticket_id}/satisfaction_rating:
    parameters:
      - name: ticket_id
        in: path
        description: The id of the ticket
        required: true
        schema:
          type: integer
        example: 35436
    post:
      operationId: CreateTicketSatisfactionRating
      tags:
        - Satisfaction Ratings
      summary: Create a Satisfaction Rating
      description: |
        Creates a CSAT rating for a solved ticket, or for a ticket that was previously
        solved and then reopened.

        Only the end user listed as the ticket requester can create a satisfaction rating for the ticket.

        #### Allowed For

        * End user who requested the ticket

        The end user must be a verified user.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SatisfactionRatingResponse'
              examples:
                default:
                  $ref: '#/components/examples/SatisfactionRatingResponseExample'
  /api/v2/tickets/{ticket_id}/tags:
    parameters:
      - $ref: '#/components/parameters/TicketId'
    get:
      operationId: ListResourceTags
      tags:
        - Tags
      summary: List Resource Tags
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsByObjectIdResponse'
              examples:
                default:
                  $ref: '#/components/examples/TagsByObjectIdResponse'
    post:
      operationId: SetTagsTicket
      tags:
        - Tags
      summary: Set Tags
      description: |
        #### Allowed For

        * Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsByObjectIdResponse'
              examples:
                default:
                  $ref: '#/components/examples/TagsByObjectIdResponse'
    put:
      operationId: PutTagsTicket
      tags:
        - Tags
      summary: Add Tags
      description: |
        You can also add tags to multiple tickets with the [Update Many
        Tickets](/api-reference/ticketing/tickets/tickets/#update-many-tickets) endpoint.

        #### Safe Update

        If the same ticket is updated by multiple API requests at
        the same time, some tags could be lost because of ticket
        update collisions. Include `updated_stamp` and `safe_update`
        properties in the request body to make a safe update.

        For `updated_stamp`, retrieve and specify the ticket's
        latest `updated_at` timestamp. The tag update only occurs
        if the `updated_stamp` timestamp matches the ticket's
        actual `updated_at` timestamp at the time of the request.
        If the timestamps don't match (in other words, if the
        ticket was updated since you retrieved the ticket's
        last `updated_at` timestamp), the request returns a
        409 Conflict error.

        #### Example

        ```js
        {
          "tags": ["customer"],
          "updated_stamp":"2019-09-12T21:45:16Z",
          "safe_update":"true"
        }
        ```

        For details, see [Protecting against ticket update collisions](/api-reference/ticketing/tickets/tickets/#protecting-against-ticket-update-collisions).

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TagsByObjectIdResponse'
              examples:
                default:
                  $ref: '#/components/examples/TagsByObjectIdResponse'
    delete:
      operationId: DeleteTagsTicket
      tags:
        - Tags
      summary: Remove Tags
      description: |
        You can also delete tags from multiple tickets with the
        [Update Many Tickets](/api-reference/ticketing/tickets/tickets/#update-many-tickets) endpoint.

        This endpoint supports safe updates. See [Safe Update](/api-reference/ticketing/ticket-management/tags/#safe-update).

        #### Allowed For

        * Agents
      responses:
        "204":
          description: No Content response
  /api/v2/tickets/count:
    get:
      operationId: CountTickets
      tags:
        - Tickets
      summary: Count Tickets
      description: |-
        Returns an approximate count of tickets in the account. If the count exceeds 100,000, it is updated every 24 hours.

        `ccd` lists tickets that the specified user is cc'd on.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Count of tickets
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: object
                    properties:
                      refreshed_at:
                        type: string
                        format: date-time
                      value:
                        type: integer
              examples:
                default:
                  value:
                    count:
                      refreshed_at: "2020-04-06T02:18:17Z"
                      value: 102
  /api/v2/tickets/create_many:
    post:
      operationId: TicketsCreateMany
      tags:
        - Tickets
      summary: Create Many Tickets
      description: |-
        Accepts an array of up to 100 ticket objects. **Note**: Every ticket created with this endpoint may be affected by your business rules, which can include sending email notifications to your end users. If you are importing historical tickets or creating more than 1000 tickets, consider using the [Ticket Bulk Import](/api-reference/ticketing/tickets/ticket_import/#ticket-bulk-import) endpoint.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For
        * Agents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TicketsCreateRequest'
            examples:
              default:
                $ref: '#/components/examples/TicketsCreateRequestExample'
      responses:
        "200":
          description: Create many tickets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/tickets/destroy_many:
    delete:
      operationId: BulkDeleteTickets
      tags:
        - Tickets
      summary: Bulk Delete Tickets
      description: |-
        Accepts a comma-separated list of up to 100 ticket ids.

        #### Allowed For

        * Admins
        * Agents with permission to delete tickets

        Agent delete permissions are set in Support. See
        [Deleting tickets](https://support.zendesk.com/hc/en-us/articles/203690936)
        in the Support Help Center.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
      parameters:
        - $ref: '#/components/parameters/TicketIds'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/tickets/mark_many_as_spam:
    put:
      operationId: MarkManyTicketsAsSpam
      tags:
        - Tickets
      summary: Bulk Mark Tickets as Spam
      description: |-
        Accepts a comma-separated list of up to 100 ticket ids.

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.

        #### Allowed For

        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketIds'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/tickets/show_many:
    get:
      operationId: TicketsShowMany
      tags:
        - Tickets
      summary: Show Multiple Tickets
      description: |-
        Accepts a comma-separated list of ticket ids to return.

        This endpoint will return up to 100 tickets records.

        #### Allowed For
        * Agents
      parameters:
        - $ref: '#/components/parameters/TicketIds'
      responses:
        "200":
          description: List tickets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketsResponseExample'
  /api/v2/tickets/update_many:
    put:
      operationId: TicketsUpdateMany
      tags:
        - Tickets
      summary: Update Many Tickets
      description: Accepts an array of up to 100 ticket objects, or a comma-separated list of up to 100 ticket ids.
      parameters:
        - name: ids
          in: query
          description: Comma-separated list of ticket ids
          schema:
            type: string
          example: 35436,35437
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/trigger_categories:
    get:
      operationId: ListTriggerCategories
      tags:
        - Trigger Categories
      summary: List Ticket Trigger Categories
      description: |
        Returns all the ticket trigger categories in the account.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - name: page
          in: query
          description: Pagination parameters
          style: deepObject
          explode: true
          schema:
            type: object
            properties:
              after:
                type: string
              before:
                type: string
              size:
                type: integer
          example:
            after: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
            before: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
            size: 50
        - name: sort
          in: query
          description: Sort parameters
          schema:
            type: string
            enum:
              - position
              - -position
              - name
              - -name
              - created_at
              - -created_at
              - updated_at
              - -updated_at
        - name: include
          in: query
          description: Allowed sideloads
          schema:
            type: string
            enum:
              - rule_counts
      responses:
        "200":
          description: A paged array of ticket trigger categories
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/TriggerCategoriesResponse'
                  - $ref: '#/components/schemas/Pagination'
              example:
                links:
                  next: https://{subdomain}.zendesk.com/api/v2/trigger_categories.json?include=rule_counts&page[after]=eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9&page[size]=2&sort=position
                  prev: https://{subdomain}.zendesk.com/api/v2/trigger_categories.json?include=rule_counts&page[before]=eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9&page[size]=2&sort=position
                meta:
                  after_cursor: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
                  before_cursor: eyJvIjoiLXNjb3JlLGlkIiwidiI6ImFRSUFBQUFBQUFBQWFRMHBJUUVBQUFBQSJ9
                  has_more: true
                trigger_categories:
                  - created_at: "2020-07-17T01:30:07Z"
                    id: "10001"
                    name: Email Triggers
                    position: 0
                    updated_at: "2020-07-17T01:30:07Z"
                  - created_at: "2020-07-17T01:30:07Z"
                    id: "10002"
                    name: SMS Triggers
                    position: 1
                    updated_at: "2020-07-17T01:30:07Z"
        "400":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: InvalidPaginationParameter
                    title: page[after] is not valid
        "403":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: TriggerCategoriesNotEnabled
                    title: Ticket trigger categories are not enabled for your account
    post:
      operationId: CreateTriggerCategory
      tags:
        - Trigger Categories
      summary: Create Ticket Trigger Category
      description: Creates a ticket trigger category.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                trigger_category:
                  allOf:
                    - $ref: '#/components/schemas/TriggerCategoryRequest'
                    - $ref: '#/components/schemas/TriggerCategoryRequestRequired'
            example:
              trigger_category:
                name: All Notification Triggers
                position: 0
      responses:
        "200":
          description: The created ticket trigger category
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerCategoryResponse'
              example:
                trigger_category:
                  created_at: "2020-07-17T01:30:07Z"
                  id: "10001"
                  name: All Notification Triggers
                  position: 0
                  updated_at: "2020-07-17T01:30:07Z"
        "400":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: InvalidTriggerCategory
                    title: Name cannot be blank
        "403":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: TriggerCategoriesNotEnabled
                    title: Ticket trigger categories are not enabled for your account
                  - code: ProductLimitExceeded
                    title: Your account has reached the limit of 500 ticket trigger categories.
  /api/v2/trigger_categories/{trigger_category_id}:
    get:
      operationId: ShowTriggerCategoryById
      tags:
        - Trigger Categories
      summary: Show Ticket Trigger Category
      description: Returns the ticket trigger category with the specified ID.
      parameters:
        - name: trigger_category_id
          in: path
          description: The id of the ticket trigger category to retrieve
          required: true
          schema:
            type: string
          example: "10001"
      responses:
        "200":
          description: The requested ticket trigger category
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerCategoryResponse'
              example:
                trigger_category:
                  created_at: "2020-07-17T01:30:07Z"
                  id: "10001"
                  name: All Notification Triggers
                  position: 0
                  updated_at: "2020-07-17T01:30:07Z"
        "404":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: TriggerCategoryNotFound
                    title: Category can’t be found. Check the ID and try again.
    patch:
      operationId: UpdateTriggerCategory
      tags:
        - Trigger Categories
      summary: Update Ticket Trigger Category
      description: Updates the ticket trigger category with the specified ID.
      parameters:
        - name: trigger_category_id
          in: path
          description: The id of the ticket trigger category to update
          required: true
          schema:
            type: string
          example: "10001"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                trigger_category:
                  $ref: '#/components/schemas/TriggerCategoryRequest'
            example:
              trigger_category:
                name: All Notification Triggers Updated
                position: 10
      responses:
        "200":
          description: The updated trigger category
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerCategoryResponse'
              example:
                trigger_category:
                  created_at: "2020-07-17T01:30:07Z"
                  id: "10001"
                  name: All Notification Triggers Updated
                  position: 10
                  updated_at: "2020-07-18T05:23:32Z"
        "400":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: InvalidTriggerCategory
                    title: Name cannot be blank
        "404":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: TriggerCategoryNotFound
                    title: Category can’t be found. Check the ID and try again.
    delete:
      operationId: DeleteTriggerCategory
      tags:
        - Trigger Categories
      summary: Delete Ticket Trigger Category
      description: Deletes the ticket trigger category with the specified ID.
      parameters:
        - name: trigger_category_id
          in: path
          description: The id of the ticket trigger category to delete
          required: true
          schema:
            type: string
          example: "10001"
      responses:
        "204":
          description: No content
        "400":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: TriggerCategoryNotEmpty
                    title: A category with active ticket triggers cannot be deleted.
        "404":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: TriggerCategoryNotFound
                    title: Category can’t be found. Check the ID and try again.
  /api/v2/trigger_categories/jobs:
    post:
      operationId: BatchOperateTriggerCategories
      tags:
        - Trigger Categories
      summary: Create Batch Job for Ticket Trigger Categories
      description: Creates a job that performs a batch operation for the given ticket trigger categories.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchJobRequest'
            example:
              job:
                action: patch
                items:
                  trigger_categories:
                    - id: "10001"
                      position: 0
                    - id: "10002"
                      position: 1
                  triggers:
                    - active: false
                      category_id: "10001"
                      id: "10011"
                      position: 10
                    - active: true
                      category_id: "10002"
                      id: "10012"
                      position: 1
      responses:
        "200":
          description: The response to the batch job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchJobResponse'
              example:
                results:
                  trigger_categories:
                    - created_at: "2020-07-18T01:24:53Z"
                      id: "10001"
                      name: Notifications
                      position: 0
                      updated_at: "2020-07-20T01:30:07Z"
                    - created_at: "2020-07-17T06:31:12Z"
                      id: "10002"
                      name: Apply Tags
                      position: 1
                      updated_at: "2020-07-20T01:30:07Z"
                  triggers:
                    - actions:
                        - {}
                      active: true
                      conditions: {}
                      created_at: "2012-09-25T22:50:26Z"
                      description: Notify external target
                      id: 10012
                      position: 1
                      raw_title: Notify target
                      title: Notify Target
                      updated_at: "2020-07-20T01:30:07Z"
                      url: http://{subdomain}.zendesk.com/api/v2/triggers/10012.json
                    - actions:
                        - {}
                      active: false
                      conditions: {}
                      created_at: "2012-09-25T22:50:26Z"
                      description: Close and save a ticket
                      id: 10011
                      position: 10
                      raw_title: Close and Save
                      title: Close and Save
                      updated_at: "2020-07-20T01:30:07Z"
                      url: http://{subdomain}.zendesk.com/api/v2/triggers/10011.json
                status: complete
        "400":
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchJobResponse'
              example:
                errors:
                  - code: InvalidTrigger
                    title: category_id is not valid
                    trigger_id: "10001"
                status: failed
  /api/v2/triggers:
    get:
      operationId: ListTriggers
      tags:
        - Triggers
      summary: List Ticket Triggers
      description: |
        Lists all ticket triggers for the current account.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents

        #### Sideloads

        The following sideloads are supported. The usage sideloads are only supported on the Support Professional or Suite Growth plan or above.

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each trigger, if present
        | permissions      | The permissions for each trigger
        | usage_1h         | The number of times each trigger has been used in the past hour
        | usage_24h        | The number of times each trigger has been used in the past day
        | usage_7d         | The number of times each trigger has been used in the past week
        | usage_30d        | The number of times each trigger has been used in the past thirty days
      parameters:
        - $ref: '#/components/parameters/TriggerActive'
        - $ref: '#/components/parameters/TriggerSort'
        - $ref: '#/components/parameters/TriggerSortBy'
        - $ref: '#/components/parameters/TriggerSortOrder'
        - $ref: '#/components/parameters/TriggerCategoryId'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggersResponseExample'
    post:
      operationId: CreateTrigger
      tags:
        - Triggers
      summary: Create Trigger
      description: |
        #### Allowed For

        * Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerWithCategoryRequest'
            examples:
              default:
                $ref: '#/components/examples/TriggerWithCategoryRequestExample'
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerResponseExample'
  /api/v2/triggers/{trigger_id}:
    parameters:
      - $ref: '#/components/parameters/TriggerId'
    get:
      operationId: GetTrigger
      tags:
        - Triggers
      summary: Show Ticket Trigger
      description: |
        #### Allowed For

        * Agents

        The Via Type value is a number instead of a text string. See [Via types reference](/documentation/ticketing/reference-guides/via-types/) for the keys.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerResponseExample'
    put:
      operationId: UpdateTrigger
      tags:
        - Triggers
      summary: Update Ticket Trigger
      description: |
        #### Allowed For

        * Agents

        #### Note

        Updating a condition or action updates both the conditions and actions arrays,
        clearing all existing values of both arrays. Include all your conditions
        and actions when updating any condition or action.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerWithCategoryRequest'
            examples:
              default:
                $ref: '#/components/examples/TriggerWithCategoryRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerResponseExample'
    delete:
      operationId: DeleteTrigger
      tags:
        - Triggers
      summary: Delete Ticket Trigger
      description: |
        #### Allowed For

        * Agents
      responses:
        "204":
          description: No Content response
  /api/v2/triggers/{trigger_id}/revisions:
    parameters:
      - $ref: '#/components/parameters/TriggerId'
    get:
      operationId: ListTriggerRevisions
      tags:
        - Triggers
      summary: List Ticket Trigger Revisions
      description: |
        List the revisions associated with a ticket trigger. Ticket trigger revision history is only available on Enterprise plans.

        #### Allowed For

         * Agents

        #### Sideloads

        The following sideloads are supported:

        | Name  | Will sideload
        | ----- | -------------
        | users | The user that authored each revision

        #### Pagination

        This endpoint uses cursor-based pagination. The records are ordered in
        descending order by the `created_at` timestamp, then by `id` on duplicate
        `created_at` values.

        The `cursor` parameter is a non-human-readable argument you can use to move
        forward or backward in time.

        Each JSON response will contain the following attributes to help you get
        more results:

        - `after_url` requests more recent results
        - `before_url` requests older results
        - `after_cursor` is the cursor to build the request yourself
        - `before_cursor` is the cursor to build the request yourself

        The properties are null if no more records are available.

        You can request a maximum of 1000 records using the `limit` parameter. If
        no `limit` parameter is supplied, it will default to 1,000.
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerRevisionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerRevisionsResponseExample'
  /api/v2/triggers/{trigger_id}/revisions/{trigger_revision_id}:
    parameters:
      - $ref: '#/components/parameters/TriggerId'
      - $ref: '#/components/parameters/TriggerRevisionId'
    get:
      operationId: TriggerRevision
      tags:
        - Triggers
      summary: Show Ticket Trigger Revision
      description: |
        Fetches a revision associated with a ticket trigger. Ticket trigger revision history is only available on Enterprise plans.

        #### Allowed For

         * Agents

        #### Sideloads

        The following sideloads are supported:

        | Name  | Will sideload
        | ----- | -------------
        | users | The user that authored each revision
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerRevisionResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerRevisionResponseExample'
  /api/v2/triggers/active:
    parameters:
      - $ref: '#/components/parameters/TriggerSort'
      - $ref: '#/components/parameters/TriggerSortBy'
      - $ref: '#/components/parameters/TriggerSortOrder'
      - $ref: '#/components/parameters/TriggerCategoryId'
    get:
      operationId: ListActiveTriggers
      tags:
        - Triggers
      summary: List Active Ticket Triggers
      description: |
        Lists all active ticket triggers.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.
        #### Allowed For

        * Agents

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each ticket trigger, if present
        | permissions      | The permissions for each trigger
        | usage_1h         | The number of times each ticket trigger has been used in the past hour
        | usage_24h        | The number of times each ticket trigger has been used in the past day
        | usage_7d         | The number of times each ticket trigger has been used in the past week
        | usage_30d        | The number of times each ticket trigger has been used in the past thirty days
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggersActiveResponseExample'
  /api/v2/triggers/definitions:
    get:
      operationId: ListTriggerActionConditionDefinitions
      tags:
        - Triggers
      summary: List Ticket Trigger Action and Condition Definitions
      description: |
        Returns the definitions of the actions a ticket trigger can perform and the
        definitions of the conditions under which a ticket trigger can execute. The
        definition of the action includes a title ("Status"), a type ("list"), and
        possible values. The definition of the condition includes the same fields
        as well as the possible operators.

        For a list of supported actions, see the [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
        For a list of supported conditions, see the [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerDefinitionResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerDefinitionResponseExample'
  /api/v2/triggers/destroy_many:
    parameters:
      - $ref: '#/components/parameters/TriggerIds'
    delete:
      operationId: DeleteManyTriggers
      tags:
        - Triggers
      summary: Bulk Delete Ticket Triggers
      description: |
        Deletes the ticket triggers corresponding to the provided comma-separated list of IDs.

        #### Allowed For

        * Agents

        #### Request Parameters

        The DELETE request takes one parameter, an `ids` object that lists the
        ticket triggers to delete.

        | Name | Description
        | ---- | -----------
        | ids  | The IDs of the triggers to delete

        #### Example request

        ```js
        {
          "ids": "25,23,27,22"
        }
        ```
      responses:
        "204":
          description: No content response
  /api/v2/triggers/reorder:
    put:
      operationId: ReorderTriggers
      tags:
        - Triggers
      summary: Reorder Ticket Triggers
      description: |
        Alters the firing order of ticket triggers in the account. See
        [Reordering and sorting triggers](https://support.zendesk.com/hc/en-us/articles/115015696088)
        in the Zendesk Help Center. The firing order is set in a `trigger_ids` array in the request body.

        You must include every ticket trigger id in your account to reorder the ticket triggers. If not, the endpoint will return 404 Forbidden.

        Reordering ticket triggers via the API is not permitted if you have more than one ticket trigger category. If there is more than one
        ticket trigger category, the endpoint will return a `LimitOneCategory` error.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggerResponseExample'
  /api/v2/triggers/search:
    parameters:
      - $ref: '#/components/parameters/TriggerSearchQuery'
      - $ref: '#/components/parameters/TriggerSearchFilter'
      - $ref: '#/components/parameters/TriggerActive'
      - $ref: '#/components/parameters/TriggerSort'
      - $ref: '#/components/parameters/TriggerSortBy'
      - $ref: '#/components/parameters/TriggerSortOrder'
      - $ref: '#/components/parameters/TriggerInclude'
    get:
      operationId: SearchTriggers
      tags:
        - Triggers
      summary: Search Ticket Triggers
      description: |
        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For

        * Agents

        #### Sideloads

        The following sideloads are supported. For more information, see [Side-loading](/documentation/ticketing/using-the-zendesk-api/side_loading/).

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each ticket trigger, if present
        | permissions      | The permissions for each ticket trigger
        | usage_1h         | The number of times each ticket trigger has been used in the past hour
        | usage_24h        | The number of times each ticket trigger has been used in the past day
        | usage_7d         | The number of times each ticket trigger has been used in the past week
        | usage_30d        | The number of times each ticket trigger has been used in the past thirty days

        #### Filter

        Use the `filter` query parameter to filter a ticket trigger search by one or more attributes. For example, the following `filter` argument filters ticket triggers by the `description` attribute:

        ```json
        {
          "json": {
            "description": "Close a ticket"
          }
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggersSearchResponseExample'
  /api/v2/triggers/update_many:
    put:
      operationId: UpdateManyTriggers
      tags:
        - Triggers
      summary: Update Many Ticket Triggers
      description: |
        Updates the position or the active status of multiple ticket triggers. Any additional properties are ignored.

        #### Allowed For

        * Agents

        #### Request Parameters

        The PUT request expects a `triggers` object that lists the ticket triggers to update.

        Each ticket trigger may have the following properties:

        | Name        | Mandatory | Description
        | --------    | --------- | -----------
        | id          | yes       | The ID of the ticket trigger to update
        | position    | no        | The new position of the ticket trigger
        | active      | no        | The active status of the ticket trigger (true or false)
        | category_id | no        | The ID of the new category the ticket trigger is to be moved to

        #### Example Request

        ```js
        {
          "triggers": [
            {"id": 25, "position": 3},
            {"id": 23, "position": 5},
            {"id": 27, "position": 9},
            {"id": 22, "position": 7}
          ]
        }
        ```
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerBulkUpdateRequest'
            examples:
              default:
                $ref: '#/components/examples/TriggerBulkUpdateRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggersResponse'
              examples:
                default:
                  $ref: '#/components/examples/TriggersResponseExample'
  /api/v2/uploads:
    post:
      operationId: UploadFiles
      tags:
        - Attachments
      summary: Upload Files
      description: |
        Uploads a file that can be attached to a ticket comment. It doesn't attach the file to the comment. For details and examples, see [Attaching ticket comments with the API](/documentation/ticketing/using-the-zendesk-api/adding-ticket-attachments-with-the-api).

        The endpoint has a required `filename` query parameter. The parameter specifies what the file will be named when attached to the ticket comment (to give the agent more context about the file). The parameter does not specify the file on the local system to be uploaded. While the two names can be different, their file extensions must be the same. If they don't match, the agent's browser or file reader could give an error when attempting to open the attachment.

        The `Content-Type` header must contain a recognized MIME type that correctly describes the type of the uploaded file. Failing to send a recognized, correct type may cause undesired behavior. For example, in-browser audio playback may be interrupted by the browser's security mechanisms for MP3s uploaded with an incorrect type.

        Adding multiple files to the same upload is handled by splitting requests and passing the API token received from the first request to each subsequent request. The token is valid for 3 days.

        **Note**: Even if [private attachments](https://support.zendesk.com/hc/en-us/articles/204265396) are enabled in the Zendesk Support instance, uploaded files are visible to any authenticated user at the `content_URL` specified in the [JSON response](#json-format) until the upload token is consumed. Once a file is associated with a ticket or post, visibility is restricted to users with access to the ticket or post with the attachment.

        #### Allowed For

        * End users
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentUploadResponse'
              examples:
                default:
                  $ref: '#/components/examples/AttachmentUploadResponseExample'
  /api/v2/uploads/{token}:
    delete:
      operationId: DeleteUpload
      tags:
        - Attachments
      summary: Delete Upload
      description: |
        #### Allowed for

        * End Users
      parameters:
        - name: token
          in: path
          description: The token of the uploaded attachment
          required: true
          schema:
            type: string
          example: 6bk3gql82em5nmf
      responses:
        "204":
          description: No Content response
  /api/v2/user_fields:
    get:
      operationId: ListUserFields
      tags:
        - User Fields
      summary: List User Fields
      description: |
        Returns a list of custom user fields in your account. Fields are returned in the order that you specify in your user fields configuration in Zendesk Support. Clients should cache this resource for the duration of their API usage and map the key for each User Field to the values returned under the `user_fields` attribute on the [User](/api-reference/ticketing/users/users/) resource.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFieldsResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserFieldsResponseExample'
    post:
      operationId: CreateUserField
      tags:
        - User Fields
      summary: Create User Field
      description: |
        Creates any of the following custom field types:

        * text (default when no "type" is specified)
        * textarea
        * checkbox
        * date
        * integer
        * decimal
        * regexp
        * dropdown
        * lookup
        * multiselect

        See [About custom field types](https://support.zendesk.com/hc/en-us/articles/203661866) in Zendesk help.

        #### Allowed For

        * Admins
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserFieldCreateResponseExample'
  /api/v2/user_fields/{user_field_id}:
    parameters:
      - $ref: '#/components/parameters/UserFieldId'
    get:
      operationId: ShowUserField
      tags:
        - User Fields
      summary: Show User Field
      description: |
        #### Allowed for

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserFieldResponseExample'
    put:
      operationId: UpdateUserField
      tags:
        - User Fields
      summary: Update User Field
      description: |
        #### Updating a Dropdown (Tagger) or Multiselect Field

        Dropdown and multiselect fields return an array of `custom_field_options` which specify the name, value, and order of the list of dropdown or multiselect options.
        Understand the following behavior when updating a dropdown or multiselect field:

        - 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 `name` and `value`.
        - To update an existing option, pass its `id` along with `name` and `value`.
        - To re-order 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

        ```bash
        curl https://{subdomain}.zendesk.com/api/v2/user_fields/{user_field_id}.json \
          -H "Content-Type: application/json" -X PUT \
          -d '{"user_field": {"custom_field_options": [{"id": 124, "name": "Option 2", "value": "option_2"}, {"id": 123, "name": "Option 1", "value": "option_1"}, {"id": 125, "name": "Option 2", "value": "option_3"}]}}' \
          -v -u {email_address}/token:{api_token}
        ```
        #### Allowed for

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserFieldResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserFieldUpdateResponseExample'
    delete:
      operationId: DeleteUserField
      tags:
        - User Fields
      summary: Delete User Field
      description: |
        #### Allowed for

        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/user_fields/{user_field_id}/options:
    parameters:
      - $ref: '#/components/parameters/UserFieldId'
    get:
      operationId: ListUserFieldOptions
      tags:
        - User Fields
      summary: List User Field Options
      description: |
        Returns a list of custom user field options for the given dropdown user field.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionsResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomUserFieldOptionsResponseExample'
    post:
      operationId: CreateOrUpdateUserFieldOption
      tags:
        - User Fields
      summary: Create or Update a User Field Option
      description: |
        Creates a new option or updates an existing option for the given drop-down user field.

        To update an option, include the id of the option in the `custom_field_option` object. Example: `{"custom_field_option": {"id": 10002, "name": "Pineapples", ... }`. If an option exists for the given ID, the option will be updated. Otherwise, a new option will be created.

        #### Response

        Returns one of the following status codes:

        - 200 with `Location: /api/v2/user_fields/{user_field_id}/options.json` if the user field option already exists in the database
        - 201 with `Location: /api/v2/user_fields/{user_field_id}/options.json` if the user field option is new

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomUserFieldOptionUpdateResponseExample'
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomUserFieldOptionCreateResponseExample'
  /api/v2/user_fields/{user_field_id}/options/{user_field_option_id}:
    parameters:
      - $ref: '#/components/parameters/UserFieldId'
      - $ref: '#/components/parameters/UserFieldOptionId'
    get:
      operationId: ShowUserFieldOption
      tags:
        - User Fields
      summary: Show a User Field Option
      description: |
        #### Allowed for
        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldOptionResponse'
              examples:
                default:
                  $ref: '#/components/examples/CustomUserFieldOptionResponseExample'
    delete:
      operationId: DeleteUserFieldOption
      tags:
        - User Fields
      summary: Delete User Field Option
      description: |
        #### Allowed for
        * Admins
      responses:
        "204":
          description: No Content response
  /api/v2/user_fields/reorder:
    put:
      operationId: ReorderUserField
      tags:
        - User Fields
      summary: Reorder User Field
      description: |
        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/users:
    get:
      operationId: ListUsers
      tags:
        - Users
      summary: List Users
      description: |
        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Admins, Agents and Light Agents
      parameters:
        - $ref: '#/components/parameters/UserRoleFilter'
        - $ref: '#/components/parameters/UserRolesFilter'
        - $ref: '#/components/parameters/UserPermissionSetFilter'
        - $ref: '#/components/parameters/UserExternalIdFilter'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/UsersResponseExample'
    post:
      operationId: CreateUser
      tags:
        - Users
      summary: Create User
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
            examples:
              default:
                $ref: '#/components/examples/UserRequestExample'
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserCreateResponseExample'
  /api/v2/users/{user_id}:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ShowUser
      tags:
        - Users
      summary: Show User
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserResponseExample'
    put:
      operationId: UpdateUser
      tags:
        - Users
      summary: Update User
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
            examples:
              default:
                $ref: '#/components/examples/UpdateUserRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/UpdateUserResponseExample'
    delete:
      operationId: DeleteUser
      tags:
        - Users
      summary: Delete User
      description: |
        Deletes the user and associated records from the account.

        **Warning**:

        * Deleted users are not recoverable.
        * Both agents and administrators can soft delete users in the agent interface in Zendesk Support. Agents with permission can delete end users, while administrators can delete all users except the account owner.

        To comply with GDPR, a further step is needed. See [Permanently Delete User](/api-reference/ticketing/users/users/#permanently-delete-user).

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/DeleteUserResponseExample'
  /api/v2/users/{user_id}/compliance_deletion_statuses:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ShowUserComplianceDeletionStatuses
      tags:
        - Users
      summary: Show Compliance Deletion Statuses
      description: |
        Returns the GDPR status for each user per area of compliance. A Zendesk area of compliance is typically a product like "support/explore" but can be more fine-grained for areas within the product lines.

        If the user is not in the account, the request returns a 404 status.

        ```http
        Status: 404
        {
          "error":"RecordNotFound",
          "description":"Not found"
        }
        ```

        #### Allowed For

        * Agents, with restrictions

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - name: application
          in: query
          description: Area of compliance
          schema:
            type: string
          example: chat
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComplianceDeletionStatusesResponse'
              examples:
                default:
                  $ref: '#/components/examples/ComplianceDeletionStatusesResponseExample'
  /api/v2/users/{user_id}/group_memberships/{group_membership_id}/make_default:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/GroupMembershipId'
    put:
      operationId: GroupMembershipSetDefault
      tags:
        - Group Memberships
      summary: Set Membership as Default
      description: |
        #### Allowed For:

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/GroupMembershipsResponseExample'
  /api/v2/users/{user_id}/identities:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - name: type[]
        in: query
        description: Filters results by one or more identity types using the format `?type[]={type}&type[]={type}`
        explode: true
        schema:
          type: string
          enum:
            - email
            - facebook
            - phone_number
            - sdk
            - twitter
            - messaging
            - microsoft
    get:
      operationId: ListUserIdentities
      tags:
        - User Identities
      summary: List Identities
      description: |
        Returns a list of identities for the given user.

        Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only list email and phone number identities.

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
        * Verified end users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserIdentitiesResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserIdentitiesResponseExample'
    post:
      operationId: CreateUserIdentity
      tags:
        - User Identities
      summary: Create Identity
      description: |
        Adds an identity to a user's profile. An agent can add an identity to any user profile.

        Supported identity types:

        | Type             | Example |
        | ---------------- | ------- |
        | email            | `{ "type" : "email", "value" : "someone@example.com" }` |
        | twitter          | `{ "type" : "twitter", "value" : "screen_name" }` |
        | facebook         | `{ "type" : "facebook", "value" : "855769377321" }` |
        | google           | `{ "type" : "google", "value" : "example@gmail.com" }` |
        | agent_forwarding | `{ "type" : "agent_forwarding", "value" : "+1 555-123-4567" }` |
        | phone_number     | `{ "type" : "phone_number", "value" : "+1 555-123-4567" }` |

        To create an identity without sending out a verification email, include a `"skip_verify_email": true` property. The `"skip_verify_email": true` property does not apply when updating your own agent profile. A welcome or verification email will be sent regardless of this setting.

        #### Allowed For

        * Agents
      responses:
        "201":
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserIdentityResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserIdentityCreateResponseExample'
  /api/v2/users/{user_id}/identities/{user_identity_id}:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/UserIdentityId'
    get:
      operationId: ShowUserIdentity
      tags:
        - User Identities
      summary: Show Identity
      description: |
        Shows the identity with the given id for a given user.

        Use the first endpoint if authenticating as an agent. Use the second if authenticating as an end user. End users can only view email or phone number identity.

        #### Allowed For

        * Agents
        * Verified end users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserIdentityResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserIdentityResponseExample'
    put:
      operationId: UpdateUserIdentity
      tags:
        - User Identities
      summary: Update Identity
      description: |
        This endpoint allows you to:

        * Set the specified identity as verified (but you cannot unverify a verified identity)
        * Update the `value` property of the specified identity

        You can't change an identity's `primary` attribute with this endpoint. You must use the [Make Identity Primary](#make-identity-primary) endpoint instead.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserIdentityResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserIdentityUpdateResponseExample'
    delete:
      operationId: DeleteUserIdentity
      tags:
        - User Identities
      summary: Delete Identity
      description: |
        Deletes the identity for a given user.
        In certain cases, a phone number associated with an identity is still visible on the user profile after the identity has been deleted via API. You can remove the phone number from the user profile by updating the `phone` attribute of the user to an empty string. See [Update User via API](/api-reference/ticketing/users/users/#update-user) for details and examples.

        Deleting identities with type `messaging` could break messaging functionality. For example, an agent may stop being able to send messages via the messaging channel.

        #### Allowed For
        * Agents
      responses:
        "204":
          description: No Content response
  /api/v2/users/{user_id}/identities/{user_identity_id}/make_primary:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/UserIdentityId'
    put:
      operationId: MakeUserIdentityPrimary
      tags:
        - User Identities
      summary: Make Identity Primary
      description: |
        Sets the specified identity as primary. To change other attributes, use the [Update  Identity](#update-identity) endpoint. This is a collection-level operation and the correct behavior for an API client is to subsequently reload the entire collection.

        The first endpoint is the preferred option if authenticating as an agent. If authenticating as an end user, you can only use the second endpoint. In addition, an end user can only make an email identity primary if the email is verified.

        #### Allowed For

        * Agents
        * Verified end users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserIdentitiesResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserIdentitiesResponseExample'
  /api/v2/users/{user_id}/identities/{user_identity_id}/request_verification:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/UserIdentityId'
    put:
      operationId: RequestUserVerfication
      tags:
        - User Identities
      summary: Request User Verification
      description: |
        Sends the user a verification email with a link to verify ownership of the email address.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/users/{user_id}/identities/{user_identity_id}/verify:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/UserIdentityId'
    put:
      operationId: VerifyUserIdentity
      tags:
        - User Identities
      summary: Verify Identity
      description: |
        Sets the specified identity as verified.

        For security reasons, you can't use this endpoint to update the email identity of the account owner. To verify the person's identity, send a verification email. See [Verifying the account owner's email address](https://support.zendesk.com/hc/en-us/articles/4408828975130) in Zendesk help.

        If [automatic mapping of users to organizations using the email domain](https://support.zendesk.com/hc/en-us/articles/4408882246298-Creating-organizations#topic_nxl_vdt_bc) is enabled and the user is not already a member of an organization, they will be automatically added to the organization associated with the email domain once the email identity is verified.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserIdentityResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserIdentityResponseExample'
  /api/v2/users/{user_id}/merge:
    parameters:
      - $ref: '#/components/parameters/UserId'
    put:
      operationId: MergeEndUsers
      tags:
        - Users
      summary: Merge End Users
      description: |
        Merges the end user specified in the path parameter into the existing end user specified in the request body.

        Any two end users can be merged with the exception of end users created by sharing agreements.

        To be eligible for merging, the user in the path parameter must be a requester on 10,000 or fewer tickets. Otherwise, the merge will be blocked.

        Agents, admins, and users with more than 10,000 requested tickets cannot be merged.

        For more information about how user data is merged, see [Merging a user's duplicate account](https://support.zendesk.com/hc/en-us/articles/4408887695898) in Zendesk help.

        #### Allowed For

        * Admins or agents with permission to edit end users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
            examples:
              default:
                $ref: '#/components/examples/MergeEndUsersRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserResponseExample'
  /api/v2/users/{user_id}/organization_memberships/{organization_membership_id}/make_default:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/OrganizationMembershipId'
    put:
      operationId: SetOrganizationMembershipAsDefault
      tags:
        - Organization Memberships
      summary: Set Membership as Default
      description: |
        Sets the default organization membership of a given user.

        #### Allowed for

        * Admins
        * Agents when setting the default organization membership for an end user
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipsResponseExample'
  /api/v2/users/{user_id}/organizations/{organization_id}:
    parameters:
      - $ref: '#/components/parameters/OrganizationId'
      - $ref: '#/components/parameters/UserId'
    delete:
      operationId: UnassignOrganization
      tags:
        - Organization Memberships
      summary: Unassign Organization
      description: |
        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
      responses:
        "204":
          description: No Content response
  /api/v2/users/{user_id}/organizations/{organization_id}/make_default:
    parameters:
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/OrganizationId'
    put:
      operationId: SetOrganizationAsDefault
      tags:
        - Organization Memberships
      summary: Set Organization as Default
      description: |
        Sets the default organization membership of a given user.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipResponse'
              examples:
                default:
                  $ref: '#/components/examples/OrganizationMembershipResponseExample'
  /api/v2/users/{user_id}/password:
    parameters:
      - $ref: '#/components/parameters/UserId'
    post:
      operationId: SetUserPassword
      tags:
        - User Passwords
      summary: Set a User's Password
      description: |
        An admin can set a user's password only if the setting is enabled in Zendesk Support under **Settings** > **Security** > **Global**. The setting is off by default. Only the account owner can access and change this setting.

        #### Allowed For

        * Admins
      responses:
        "200":
          description: Success description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
    put:
      operationId: ChangeOwnPassword
      tags:
        - User Passwords
      summary: Change Your Password
      description: |
        You can only change your own password. Nobody can change the password of another user because it requires knowing the user's existing password. However, an admin can set a new password for another user without knowing the existing password. See [Set a User's Password](#set-a-users-password) above.

        #### Allowed For

        * Agents
        * End Users
      responses:
        "200":
          description: Success description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/users/{user_id}/password/requirements:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: GetUserPasswordRequirements
      tags:
        - User Passwords
      summary: List password requirements
      description: |
        #### Allowed For

        * Agents
        * End Users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPasswordRequirementsResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserPasswordRequirementsResponseExample'
  /api/v2/users/{user_id}/related:
    parameters:
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ShowUserRelated
      tags:
        - Users
      summary: Show User Related Information
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserRelatedResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserRelatedResponseExample'
  /api/v2/users/{user_id}/sessions:
    parameters:
      - $ref: '#/components/parameters/UserId'
    delete:
      operationId: BulkDeleteSessionsByUserId
      tags:
        - Sessions
      summary: Bulk Delete Sessions
      description: |
        Deletes all the sessions for a user.

        #### Allowed For

        * Admins, Agents, End users
      responses:
        "204":
          description: No Content
  /api/v2/users/{user_id}/sessions/{session_id}:
    parameters:
      - $ref: '#/components/parameters/SessionId'
      - $ref: '#/components/parameters/UserId'
    get:
      operationId: ShowSession
      tags:
        - Sessions
      summary: Show Session
      description: |
        #### Allowed For

        * Admins, Agents, End users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
              examples:
                default:
                  $ref: '#/components/examples/SessionResponseExample'
    delete:
      operationId: DeleteSession
      tags:
        - Sessions
      summary: Delete Session
      description: |
        #### Allowed For

        * Admins, Agents, End users
      responses:
        "204":
          description: No Content
  /api/v2/users/{user_id}/skips:
    parameters:
      - $ref: '#/components/parameters/SkipTicketUserId'
      - $ref: '#/components/parameters/TicketSortOrder'
      - $ref: '#/components/parameters/TicketId'
    get:
      operationId: ListTicketSkips
      tags:
        - Ticket Skips
      summary: List Ticket Skips
      description: |
        Archived tickets are not included in the response. See
        [About archived tickets](https://support.zendesk.com/hc/en-us/articles/203657756) in
        the Support Help Center.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For
        * Agents with "View only" or higher reports permissions in Support.
          These permissions are distinct from Explore permissions.
        * Agents retrieving their own skips
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketSkipsResponse'
              examples:
                default:
                  $ref: '#/components/examples/TicketSkipResponseExample'
  /api/v2/users/autocomplete:
    get:
      operationId: AutocompleteUsers
      tags:
        - Users
      summary: Autocomplete Users
      description: |
        Returns an array of users whose name starts with the value specified in the `name` parameter.
        It only returns users with no foreign identities.

        #### Allowed For

        * Agents
      parameters:
        - name: name
          in: query
          description: |
            The name to search for the user.
          required: true
          schema:
            type: string
          example: gil
        - $ref: '#/components/parameters/LookupRelationshipAutocompleteFieldIdFragment'
        - $ref: '#/components/parameters/LookupRelationshipAutocompleteSourceFragment'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/SearchUsersResponseExample'
  /api/v2/users/count:
    get:
      operationId: CountUsers
      tags:
        - Users
      summary: Count Users
      description: |
        Returns an approximate count of users. If the count exceeds 100,000, it is updated every 24 hours.

        The response includes a `refreshed_at` property in a `count` object that contains a timestamp indicating when the count was last updated.

        **Note**: When the count exceeds 100,000, the `refreshed_at` property may occasionally be null.
        This indicates that the count is being updated in the background. The `count` object's `value` property is limited to 100,000 until the update is complete.

        #### Allowed For

        * Admins, Agents and Light Agents
      parameters:
        - $ref: '#/components/parameters/UserRoleFilter'
        - $ref: '#/components/parameters/UserRolesFilter'
        - $ref: '#/components/parameters/UserPermissionSetFilter'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CountResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserCountResponseExample'
  /api/v2/users/create_many:
    post:
      operationId: CreateManyUsers
      tags:
        - Users
      summary: Create Many Users
      description: |
        Accepts an array of up to 100 user objects.

        **Note**: To protect the data in your Zendesk account, bulk user imports are not enabled by default in Zendesk accounts. The account owner must contact [Zendesk Customer Support](https://support.zendesk.com/hc/en-us/articles/4408843597850) to enable the imports. A 403 Forbidden
        error is returned if data imports are not enabled.

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members

        #### Specifying an organization

        You can assign a user to an existing organization by setting an
        `organization_id` property in the user object.

        #### Response

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersRequest'
            examples:
              default:
                $ref: '#/components/examples/UsersCreateManyRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/users/create_or_update:
    post:
      operationId: CreateOrUpdateUser
      tags:
        - Users
      summary: Create Or Update User
      description: |
        Creates a user if the user does not already exist, or updates an existing user
        identified by e-mail address or external ID.

        If you don't specify a role parameter, the new user is assigned the role of end user.

        If you need to create users without sending out a verification email, include a `"skip_verify_email": true` property in the body.

        #### External ID Case Sensitivity

        When providing an external id to identify an existing user to update, the search for the user record is not case sensitive.

        However, if an existing user is found, the system will update the user's external id to match the case of the external id used to find the user.

        #### Response Status Code

        - If the user exists in Zendesk, a successful request returns a 200 status code with "Location: /api/v2/users/{user_id}.json".
        - If the user does not exist in Zendesk, a successful request returns a 201 status code with "Location: /api/v2/users/{new_user_id}.json".

        #### Allowed For

        * Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
            examples:
              default:
                $ref: '#/components/examples/UserRequestExample'
      responses:
        "200":
          description: Successful response, when user exits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserCreateResponseExample'
        "201":
          description: Created response, when user is new
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
              examples:
                default:
                  $ref: '#/components/examples/UserCreateResponseExample'
  /api/v2/users/create_or_update_many:
    post:
      operationId: CreateOrUpdateManyUsers
      tags:
        - Users
      summary: Create Or Update Many Users
      description: "Accepts an array of up to 100 user objects. For each user, the user is created if it does not\nalready exist, or the existing user is updated.\n\n**Note**: To protect the data in your Zendesk account, bulk user imports are not enabled by default in Zendesk accounts. The account owner must contact [Zendesk Customer Support](https://support.zendesk.com/hc/en-us/articles/4408843597850) to enable the imports. A 403 Forbidden\nerror is returned if data imports are not enabled.    \n\nEach individual user object can identify an existing user by `email` or by `external_id`.\n\nThis endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.\n\n#### Allowed For\n\n* Admins and [agents in custom roles with permission](https://support.zendesk.com/hc/en-us/articles/4408882153882#topic_cxn_hig_bd) to manage end users or team members\n"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsersRequest'
            examples:
              default:
                $ref: '#/components/examples/UsersRequestExample'
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/users/destroy_many:
    delete:
      operationId: DestroyManyUsers
      tags:
        - Users
      summary: Bulk Delete Users
      description: |
        Accepts a comma-separated list of up to 100 user ids.

        The request takes an `ids` or an `external_ids` query parameter.

        #### Allowed for

        - Admins

        #### Response

        This endpoint returns a `job_status` [JSON object](/api-reference/ticketing/ticket-management/job_statuses/#json-format) and queues a background job to do the work. Use the [Show Job Status](/api-reference/ticketing/ticket-management/job_statuses/#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](/api-reference/introduction/rate-limits/#job-limit) for more information.
      parameters:
        - name: ids
          in: query
          description: Id of the users to delete. Comma separated
          schema:
            type: string
          example: 1,2,3
        - name: external_ids
          in: query
          description: External Id of the users to delete. Comma separated
          schema:
            type: string
          example: abc,def,ghi
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusBulkDeleteResponseExample'
  /api/v2/users/logout_many:
    post:
      operationId: LogoutManyUsers
      tags:
        - Users
      summary: Logout many users
      description: |
        Accepts a comma-separated list of up to 100 user ids.

        #### Allowed For:

        * Admins
      parameters:
        - name: ids
          in: query
          description: |
            Accepts a comma-separated list of up to 100 user ids.
          schema:
            type: string
          example: 1,2
      responses:
        "202":
          description: Accepted response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/users/me:
    get:
      operationId: ShowCurrentUser
      tags:
        - Users
      summary: Show Self
      description: "The endpoint returns [user information](/api-reference/ticketing/users/users/) and an `authenticity_token`. \n\n#### Allowed For\n\n* Anonymous users\n\n#### Authenticity Token\n\nZendesk API calls made by end users from a Zendesk help center must include `authenticity_token` in the `X-CSRF-Token` HTTP header. This helps prevent [cross-site request forgery (CSRF)](https://en.wikipedia.org/wiki/Cross-site_request_forgery) attacks.\n\nFor an example using an authenticity token, see the AJAX request in the [Upgrading from Templating API v1](https://developer.zendesk.com/documentation/help_center/help-center-templates/v1#jquery) documentation.\n"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentUserResponse'
              examples:
                default:
                  $ref: '#/components/examples/CurrentUserResponseExample'
  /api/v2/users/me/logout:
    delete:
      operationId: DeleteAuthenticatedSession
      tags:
        - Sessions
      summary: Delete the Authenticated Session
      description: |
        Deletes the current session. In practice, this only works when using session auth for requests, such as client-side requests
        made from a Zendesk app. When using OAuth or basic authentication, you don't have a current session so this endpoint has no effect.

        #### Allowed For

        * Admins, Agents, End users
      responses:
        "204":
          description: No Content
  /api/v2/users/me/session:
    get:
      operationId: ShowCurrentlyAuthenticatedSession
      tags:
        - Sessions
      summary: Show the Currently Authenticated Session
      description: |
        #### Allowed For

        * Admins, Agents, End users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
              examples:
                default:
                  $ref: '#/components/examples/SessionResponseExample'
  /api/v2/users/me/session/renew:
    get:
      operationId: RenewCurrentSession
      tags:
        - Sessions
      summary: Renew the current session
      description: |
        #### Allowed For

        * Admins, Agents, End users
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewSessionResponse'
              examples:
                default:
                  $ref: '#/components/examples/RenewSessionResponseExample'
  /api/v2/users/request_create:
    post:
      operationId: RequestUserCreate
      tags:
        - Users
      summary: Request User Create
      description: |
        Sends the owner a reminder email to update their subscription so more agents can be created.

        #### Allowed For

        * Agents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
            examples:
              default:
                $ref: '#/components/examples/RequestUserCreateRequestExample'
      responses:
        "200":
          description: description
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/users/search:
    get:
      operationId: SearchUsers
      tags:
        - Users
      summary: Search Users
      description: |
        Returns an array of users who meet the search criteria.

        Returns up to 100 records per page to a maximum of 10,000 records per query. See [Using offset pagination](/api-reference/introduction/pagination/#using-offset-pagination).

        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For

        * Agents
      parameters:
        - name: query
          in: query
          description: |
            The `query` parameter supports the Zendesk search syntax for more advanced
            user searches. It can specify a partial or full value of any
            user property, including name, email address, notes, or phone. Example:
            `query="jdoe"`.
            See the [Search API](/api-reference/ticketing/ticket-management/search/).
          schema:
            type: string
          example: jdoe
        - name: external_id
          in: query
          description: |
            The `external_id` parameter does not support the search syntax. It only accepts ids.
          schema:
            type: string
          example: abc124
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/SearchUsersResponseExample'
  /api/v2/users/show_many:
    get:
      operationId: ShowManyUsers
      tags:
        - Users
      summary: Show Many Users
      description: |
        Accepts a comma-separated list of up to 100 user ids or external ids.

        #### Allowed For:

        * Agents
      parameters:
        - name: ids
          in: query
          description: |
            Accepts a comma-separated list of up to 100 user ids.
          schema:
            type: string
          example: 1,2
        - name: external_ids
          in: query
          description: |
            Accepts a comma-separated list of up to 100 external ids.
          schema:
            type: string
          example: abc,def
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersResponse'
              examples:
                default:
                  $ref: '#/components/examples/ShowManyUsersResponseExample'
  /api/v2/users/update_many:
    put:
      operationId: UpdateManyUsers
      tags:
        - Users
      summary: Update Many Users
      parameters:
        - name: ids
          in: query
          description: Id of the users to update. Comma separated
          schema:
            type: string
          example: 1,2,3
        - name: external_ids
          in: query
          description: External Id of the users to update. Comma separated
          schema:
            type: string
          example: abc,def,ghi
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/UserRequest'
                - $ref: '#/components/schemas/UsersRequest'
              additionalProperties: true
            examples:
              default:
                $ref: '#/components/examples/UpdateManyUsersRequestExample'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
              examples:
                default:
                  $ref: '#/components/examples/JobStatusResponseExample'
  /api/v2/views:
    get:
      operationId: ListViews
      tags:
        - Views
      summary: List Views
      description: |
        Lists shared and personal views available to the current user.

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each view, if present
        | permissions      | The permissions for each view

        #### Pagination

        - Cursor pagination (recommended, but only sorts by `created_at`)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      parameters:
        - name: access
          in: query
          description: Only views with given access. May be "personal", "shared", or "account"
          schema:
            type: string
        - name: active
          in: query
          description: Only active views if true, inactive views if false
          schema:
            type: boolean
        - name: group_id
          in: query
          description: Only views belonging to given group
          schema:
            type: integer
        - name: sort_by
          in: query
          description: Possible values are "alphabetical", "created_at", or "updated_at". Defaults to "position"
          schema:
            type: string
        - name: sort_order
          in: query
          description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsResponseExample'
    post:
      operationId: CreateView
      tags:
        - Views
      summary: Create View
      description: |
        #### Allowed For

        * Agents

        #### JSON Format

        The JSON format consists of one property, a `view` object that lists the values to set when the view is created.

        **Note**: The request must include at least one condition in the `all` array that checks one of the following fields: `status`, `type`, `group_id`, `assignee_id`, or `requester_id`.

        | Name        | Description
        | ----------- | -----------
        | title       | Required. The title of the view
        | all         | Required. An array of one or more conditions. A ticket must meet all of them to be included in the view. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
        | any         | An array of one or more conditions. A ticket must meet any of them to be included in the view. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
        | description | The description of the view
        | active      | Allowed values are true or false. Determines if the view is displayed or not
        | output      | An object that specifies the columns to display. Example: `"output": {"columns": ["status", "description", "priority"]}`. See [View columns](#view-columns)
        | restriction | An object that describes who can access the view. To give all agents access to the view, omit this property

        The `restriction` object has the following properties.

        | Name | Comment
        | ---- | -------
        | type | Allowed values are "Group" or "User"
        | id   | The numeric ID of a single group or user
        | ids  | The numeric IDs of a single or more groups. Recommended for "Group" `type`

        If `type` is "Group", the `ids` property is the preferred method of specifying the group id or ids.

        #### Example Request Body

        ```js
        {
          "view": {
            "title": "Kelly's tickets",
            "raw_title": "{{dc.tickets_assigned_to_kelly}}",
            "description": "Tickets that are assigned to Kelly",
            "active": true,
            "position": 3,
            "restriction": {
              "type": "User",
              "id": "213977756"
            },
            "all": [
              {
                "field": "status",
                "operator": "less_than",
                "value": "solved"
              },
              {
                "field": "group_id",
                "operator": "is",
                "value": "24000932"
              },
              {
                "field": "custom_fields_360011872073",
                "operator": "is",
                "value": "Canada"
              },
              ...
            ],
            "output": {
              "columns": ["status", "requester", "assignee"],
              "group_by": "assignee",
              "group_order": "desc",
              "sort_by": "status",
              "sort_order": "desc"
            }
          }
        }
        ```

        #### View columns

        The `output` request parameter lets you specify what columns to include in the view in the agent interface. Example: `"output": {"columns": ["status", "description", "priority"]}`. The following table lists possible columns for views in the agent UI and the corresponding values in the `columns` array.

        For custom fields, specify the id of the custom field in the `columns` array.

        You can specify a total of 10 columns to a view.

        | View column title in UI     | Value                |
        |---------------------------- | -------------------- |
        | Assigned                    | `assigned`           |
        | Assignee                    | `assignee`           |
        | Due Date                    | `due_date`           |
        | Group                       | `group`              |
        | ID                          | `nice_id`            |
        | Updated                     | `updated`            |
        | Assignee updated            | `updated_assignee`   |
        | Requester updated           | `updated_requester`  |
        | Updater                     | `updated_by_type`    |
        | Organization                | `organization`       |
        | Priority                    | `priority`           |
        | Requested                   | `created`            |
        | Requester                   | `requester`          |
        | Requester language          | `locale_id`          |
        | Satisfaction                | `satisfaction_score` |
        | Solved                      | `solved`             |
        | Status category             | `status`             |
        | Subject                     | `description`        |
        | Submitter                   | `submitter`          |
        | Ticket form                 | `ticket_form`        |
        | Type                        | `type`               |
        | Brand                       | `brand`              |
        | Ticket status               | `custom_status_id`   |

        #### View sorting

        You can group and sort items in the view by adding items to the `output` parameter:

        | Attribute                   | Description
        |-----------------------------| -----------
        | `group_by`, `sort_by`       | Sort or group the tickets by a column in the [View columns](#view-columns) table. The `description`, `submitter` and `custom_status_id` columns are not supported
        | `group_order`, `sort_order` | Either "asc" or "desc"
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewCreateResponseExample'
  /api/v2/views/{view_id}:
    parameters:
      - $ref: '#/components/parameters/ViewId'
    get:
      operationId: ShowView
      tags:
        - Views
      summary: Show View
      description: |
        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewResponseExample'
    put:
      operationId: UpdateView
      tags:
        - Views
      summary: Update View
      description: |
        #### Allowed For

        * Agents

        #### JSON Format

         The PUT request takes one property, a `view` object that lists the values to update. All properties are optional.

        **Note**: Updating a condition updates the containing array, clearing the other conditions. Include all your conditions when updating any condition.

        | Name        | Description
        | ----------- | -----------
        | title       | The title of the view
        | all         | An array of one or more conditions. A ticket must meet all the conditions to be included in the view. The PUT request replaces all existing conditions. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
        | any         | An array of one or more conditions. A ticket must meet any of them to be included in the view. At least one `all` condition must be defined with the `any` conditions. The PUT request replaces all existing `any` conditions. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
        | active      | Allowed values are true or false. Determines if the view is displayed or not
        | output      | An object that specifies the columns to display. Example: `"output": {"columns": ["status", "description," "priority"]}`. See [View columns](#view-columns)
        | restriction | An object that describes who can access the view. To give all agents access to the view, omit this property

        The `restriction` object has the following properties.

        | Name | Comment
        | ---- | -------
        | type | Allowed values are "Group" or "User"
        | id   | The numeric ID of a single group or user
        | ids  | The numeric IDs of a single or more groups. Recommended for "Group" `type`

        If `type` is "Group", the `ids` property is the preferred method of specifying the group id or ids.

        You can also update how items are sorted and grouped. See [View sorting](#view-sorting) in Create View.

        #### Example Request Body

        ```js
        {
          "view": {
            "title": "Code red tickets",
            "restriction": {
              "type": "Group",
              "ids": [10052, 10057, 10062, 10002]
            },
            "all": [
              {
                "field": "priority",
                "operator": "is",
                "value": "urgent"
              }
            ],
            "output": {
              "columns": ["status", "requester", "assignee", "updated"]
            }
          }
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewUpdateResponseExample'
    delete:
      operationId: DeleteView
      tags:
        - Views
      summary: Delete View
      description: |
        #### Allowed For
        * Agents
      responses:
        "204":
          description: No Content response
  /api/v2/views/{view_id}/count:
    parameters:
      - $ref: '#/components/parameters/ViewId'
    get:
      operationId: GetViewCount
      tags:
        - Views
      summary: Count Tickets in View
      description: |
        Returns the ticket count for a single view.

        This endpoint is rate limited to 5 requests per minute, per view, per agent.

        #### View Counts

        The view count endpoints, Count Tickets in View (this endpoint) and [Count Tickets in Views](#count-tickets-in-views), let you estimate how many tickets remain in a view without having to retrieve the entire view. They're designed to help estimate view size. From a business perspective, accuracy becomes less relevant as view size increases.

        To ensure quality of service, these counts are cached more heavily as the number of tickets in a view grows. For a view with thousands of tickets, you can expect the count to be cached for 60-90 minutes. As a result, the count may not reflect the actual number of tickets in your view.

        View counts are represented as JSON objects with the following attributes:

        | Name            | Type        | Comment
        | --------------- | ------------| -------
        | view_id         | integer     | The id of the view
        | url             | string      | The API url of the count
        | value           | integer     | The cached number of tickets in the view. Can also be null if the system is loading and caching new data. Not to be confused with 0 tickets
        | pretty          | string      | A pretty-printed text approximation of the view count
        | fresh           | boolean     | false if the cached data is stale and the system is still loading and caching new data
        | active          | boolean     | Only active views if true, inactive views if false, all views if null.

        #### Example
        ```js
        {
          "view_count": {
            "view_id": 25,
            "url":     "https://company.zendesk.com/api/v2/views/25/count.json",
            "value":   719,
            "pretty":  "~700",
            "fresh":   true
          }
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewCountResponseExample'
  /api/v2/views/{view_id}/execute:
    parameters:
      - $ref: '#/components/parameters/ViewId'
    get:
      operationId: ExecuteView
      tags:
        - Views
      summary: Execute View
      description: |
        Returns the column titles and the rows of the specified view.

        The `columns` array lists the view's column titles and includes only views parameters.

        The `rows` array lists the values of each column for each ticket and includes parameters from both views and tickets. Though not displayed in the view, a partial ticket object is included with each row object.

        **Note**: To get the full ticket objects for a specified view, use [List Tickets from a View](#list-tickets-from-a-view).

        This endpoint is rate limited to 5 requests per minute, per view, per agent. This rate limit includes activity in Zendesk Support. An API script is more likely to encounter rate limit errors if the authenticating agent or admin is concurrently active in Zendesk Support.

        The view execution system is designed for periodic rather than high-frequency API usage. In particular, views called very frequently may be cached by Zendesk. This means that the API client will still receive a result, but that result may have been computed at any time within the last 10 minutes.

        Zendesk recommends using the Incremental Ticket Export endpoint to get the latest changes. You can call it more often, and it returns all the tickets that changed since the last poll. For details and rate limits, see [Incremental Exports](/api-reference/ticketing/ticket-management/incremental_exports/).

        View output sorting can be controlled by passing the `sort_by` and `sort_order` parameters in the format described in the table in [Preview Views](#preview-views).

        #### Allowed For

        * Agents

        #### Pagination

        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - name: sort_by
          in: query
          description: The ticket field used for sorting. This will either be a title or a custom field id.
          schema:
            type: string
        - name: sort_order
          in: query
          description: The direction the tickets are sorted. May be one of 'asc' or 'desc'
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewExecuteResponseExample'
  /api/v2/views/{view_id}/export:
    parameters:
      - $ref: '#/components/parameters/ViewId'
    get:
      operationId: ExportView
      tags:
        - Views
      summary: Export View
      description: |
        Returns the csv attachment of the specified view if possible. Enqueues a job to produce the csv if necessary.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewExportResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewExportResponseExample'
  /api/v2/views/{view_id}/tickets:
    parameters:
      - $ref: '#/components/parameters/ViewId'
    get:
      operationId: ListTicketsFromView
      tags:
        - Views
      summary: List Tickets From a View
      description: |
        #### Allowed For

        * Agents

        #### Pagination
        * Cursor pagination (recommended)
        * Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).
      parameters:
        - name: sort_by
          in: query
          description: Sort or group the tickets by a column in the [View columns](#view-columns) table. The `subject` and `submitter` columns are not supported
          schema:
            type: string
        - name: sort_order
          in: query
          description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TicketsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewListTicketsResponseEXample'
  /api/v2/views/active:
    get:
      operationId: ListActiveViews
      tags:
        - Views
      summary: List Active Views
      description: |
        Lists active shared and personal views available to the current user.

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each view, if present
        | permissions      | The permissions for each view

        #### Pagination

        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        Returns a maximum of 100 records per page.

        #### Allowed For

        * Agents
      parameters:
        - name: access
          in: query
          description: Only views with given access. May be "personal", "shared", or "account"
          schema:
            type: string
        - name: group_id
          in: query
          description: Only views belonging to given group
          schema:
            type: integer
        - name: sort_by
          in: query
          description: Possible values are "alphabetical", "created_at", or "updated_at". Defaults to "position"
          schema:
            type: string
        - name: sort_order
          in: query
          description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
          schema:
            type: string
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsActiveResponseExample'
  /api/v2/views/compact:
    get:
      operationId: ListCompactViews
      tags:
        - Views
      summary: List Views - Compact
      description: |
        A compacted list of shared and personal views available to the current user. This endpoint never returns more than 32 records and does not respect the "per_page" option.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsResponseExample'
  /api/v2/views/count:
    get:
      operationId: CountViews
      tags:
        - Views
      summary: Count Views
      description: |-
        Returns an approximate count of shared and personal views available to the current user. If the count exceeds 100,000, the count will return a cached result.  This cached result will update every 24 hours.

        The `count[refreshed_at]` property is a timestamp that indicates when the count was last updated.

        **Note**: When the count exceeds 100,000, `count[refreshed_at]` may occasionally be null.
        This indicates that the count is being updated in the background, and `count[value]` is limited to 100,000 until the update is complete.

        #### Allowed For
        * Agents
      responses:
        "200":
          description: Count of views
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsCountResponseExample'
  /api/v2/views/count_many:
    get:
      operationId: GetViewCounts
      tags:
        - Views
      summary: Count Tickets in Views
      description: |
        Returns the ticket count of each view in a list of views. Accepts up to 20 view ids per request. For the ticket count of a single view, see [Count Tickets in View](#count-tickets-in-view).

        Only returns values for personal and shared views accessible to the user performing the request.

        This endpoint is rate limited to 6 requests every 5 minutes.

        #### Allowed For

        * Agents
      parameters:
        - name: ids
          in: query
          description: List of view's ids separated by commas.
          required: true
          schema:
            type: string
          example: 1,2,3
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewCountsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewCountsResponseExample'
  /api/v2/views/destroy_many:
    delete:
      operationId: BulkDeleteViews
      tags:
        - Views
      summary: Bulk Delete Views
      description: |
        Deletes the views corresponding to the provided list of IDs.

        #### Allowed For
        * Agents
      parameters:
        - name: ids
          in: query
          description: The IDs of the views to delete
          required: true
          schema:
            type: string
          example: 1,2,3
      responses:
        "204":
          description: No Content response
  /api/v2/views/preview:
    post:
      operationId: PreviewViews
      tags:
        - Views
      summary: Preview Views
      description: |
        You can preview views by constructing the conditions in the proper format and nesting them under the `view` property. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference/). The output can also be controlled by passing in any of the following parameters and nesting them under the `output` property.

        | Name            | Type    | Comment
        | --------------- | ------- | -------
        | columns         | Array   | The ticket fields to display. System fields are looked up by name, custom fields by title or id. See the [View columns](#view-columns) table
        | group_by        | String  | When present, the field by which the tickets are grouped
        | group_order     | String  | The direction the tickets are grouped. May be one of "asc" or "desc"
        | sort_order      | String  | The direction the tickets are sorted. May be one of "asc" or "desc"
        | sort_by         | String  | The ticket field used for sorting. This will either be a title or a custom field id.

        This endpoint is rate limited to 5 requests per minute, per view, per agent.

        #### Pagination

        - Cursor pagination (recommended)
        - Offset pagination

        See [Pagination](/api-reference/introduction/pagination/).

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewPreviewResponseExample'
  /api/v2/views/preview/count:
    post:
      operationId: PreviewCount
      tags:
        - Views
      summary: Preview Ticket Count
      description: |
        Returns the ticket count for a single preview.

        #### Allowed For

        * Agents
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewCountResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewCountResponseExample'
  /api/v2/views/search:
    get:
      operationId: SearchViews
      tags:
        - Views
      summary: Search Views
      description: |
        #### Pagination

        * Offset pagination only

        See [Using Offset Pagination](/api-reference/ticketing/introduction/#using-offset-pagination).

        #### Allowed For

        * Agents

        #### Sideloads

        The following sideloads are supported. For more information, see [Side-loading](/documentation/ticketing/using-the-zendesk-api/side_loading/).

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each view, if present
        | permissions      | The permissions for each view
      parameters:
        - name: query
          in: query
          description: Query string used to find all views with matching title
          required: true
          schema:
            type: string
          example: sales&group_id=25789188
        - name: access
          in: query
          description: Filter views by access. May be "personal", "shared", or "account"
          schema:
            type: string
        - name: active
          in: query
          description: Filter by active views if true or inactive views if false
          schema:
            type: boolean
        - name: group_id
          in: query
          description: Filter views by group
          schema:
            type: integer
        - name: sort_by
          in: query
          description: Possible values are "alphabetical", "created_at", "updated_at", and "position". If unspecified, the views are sorted by relevance
          schema:
            type: string
        - name: sort_order
          in: query
          description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
          schema:
            type: string
        - name: include
          in: query
          description: A sideload to include in the response. See [Sideloads](#sideloads-3)
          schema:
            type: string
          example: permissions
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsResponseExample'
  /api/v2/views/show_many:
    get:
      operationId: ListViewsById
      tags:
        - Views
      summary: List Views By ID
      description: |
        #### Allowed For

        * Agents

        #### Sideloads

        The following sideloads are supported:

        | Name             | Will sideload
        | ---------------- | -------------
        | app_installation | The app installation that requires each view, if present
        | permissions      | The permissions for each view
      parameters:
        - name: ids
          in: query
          description: List of view's ids separated by commas.
          required: true
          schema:
            type: string
          example: 1,2,3
        - name: active
          in: query
          description: Only active views if true, inactive views if false
          schema:
            type: boolean
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsResponseExample'
  /api/v2/views/update_many:
    put:
      operationId: UpdateManyViews
      tags:
        - Views
      summary: Update Many Views
      description: |
        #### Allowed For

        * Agents

        #### Request Parameters

        The PUT request expects a `views` object that lists the views to update.

        Each view may have the following properties:

        | Name     | Mandatory | Description
        | -------- | --------- | -----------
        | id       | yes       | The ID of the view to update
        | position | no        | The new position of the view
        | active   | no        | The active status of the view (true or false)

        #### Example Request Body

        ```js
        {
          "views": [
            {"id": 25, "position": 3},
            {"id": 23, "position": 5},
            {"id": 27, "position": 9},
            {"id": 22, "position": 7}
          ]
        }
        ```
      responses:
        "200":
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ViewsResponse'
              examples:
                default:
                  $ref: '#/components/examples/ViewsUpdateManyResponseExample'
  /api/v2/workspaces:
    get:
      operationId: ListWorkspaces
      tags:
        - Workspaces
      summary: List Workspaces
      description: |
        #### Allowed For

        * Admins, Agents
      responses:
        "200":
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkspaceResponse'
              examples:
                default:
                  value:
                    count: 1
                    next_page: null
                    previous_page: null
                    workspaces:
                      - activated: true
                        apps:
                          - expand: false
                            id: 360000080413
                            position: 1
                        conditions:
                          all:
                            - field: ticket_form_id
                              operator: is
                              value: "360000014173"
                          any: []
                        created_at: "2018-11-13T19:08:13Z"
                        description: Test rules
                        id: 3133
                        macro_ids:
                          - 360005374974
                        position: 1
                        prefer_workspace_app_order: true
                        selected_macros:
                          - actions:
                              - field: status
                                value: solved
                            active: true
                            created_at: "2018-02-08T23:45:30Z"
                            description: null
                            id: 360005374974
                            position: 9999
                            restriction:
                              id: 360002226093
                              ids:
                                - 360002226093
                              type: Group
                            title: Close and redirect to topics
                            updated_at: "2018-11-08T22:27:00Z"
                            url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974.json
                            usage_7d: 0
                        ticket_form_id: 360000014173
                        title: Test Workspace 1
                        updated_at: "2018-12-17T22:37:40Z"
                        url: https://{subdomain}.zendesk.com/api/v2/workspaces.json
    post:
      operationId: CreateWorkspace
      tags:
        - Workspaces
      summary: Create Workspace
      description: |
        #### Allowed For

        * Admins
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace:
                  $ref: '#/components/schemas/WorkspaceInput'
            examples:
              default:
                value:
                  workspace:
                    conditions:
                      all:
                        - field: ticket_form_id
                          operator: is
                          value: "360000014173"
                      any: []
                    description: Test rules
                    macros:
                      - 360005374974
                    ticket_form_id: 360000014173
                    title: Test Workspace 1
      responses:
        "201":
          description: Created workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    $ref: '#/components/schemas/WorkspaceObject'
              examples:
                default:
                  value:
                    workspace:
                      activated: true
                      apps: []
                      conditions:
                        all:
                          - field: ticket_form_id
                            operator: is
                            value: "360000014173"
                        any: []
                      created_at: "2018-11-13T19:08:13Z"
                      description: Test rules
                      id: 3133
                      macro_ids:
                        - 360005374974
                      position: 1
                      prefer_workspace_app_order: true
                      selected_macros:
                        - actions:
                            - field: status
                              value: solved
                          active: true
                          created_at: "2018-02-08T23:45:30Z"
                          description: null
                          id: 360005374974
                          position: 9999
                          restriction:
                            id: 360002226093
                            ids:
                              - 360002226093
                            type: Group
                          title: Close and redirect to topics
                          updated_at: "2018-11-08T22:27:00Z"
                          url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974.json
                          usage_7d: 0
                      ticket_form_id: 360000014173
                      title: Test Workspace 1
                      updated_at: "2018-12-17T22:37:40Z"
                      url: https://{subdomain}.zendesk.com/api/v2/workspaces.json
  /api/v2/workspaces/{workspace_id}:
    parameters:
      - $ref: '#/components/parameters/WorkspaceId'
    get:
      operationId: ShowWorkspace
      tags:
        - Workspaces
      summary: Show Workspace
      description: |
        #### Allowed For
        * Admins
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    $ref: '#/components/schemas/WorkspaceObject'
              examples:
                default:
                  value:
                    workspace:
                      activated: true
                      apps: []
                      conditions:
                        all:
                          - field: ticket_form_id
                            operator: is
                            value: "360000014173"
                        any: []
                      created_at: "2018-11-13T19:08:13Z"
                      description: Test rules
                      id: 3133
                      macro_ids:
                        - 360005374974
                      position: 1
                      prefer_workspace_app_order: true
                      selected_macros:
                        - actions:
                            - field: status
                              value: solved
                          active: true
                          created_at: "2018-02-08T23:45:30Z"
                          description: null
                          id: 360005374974
                          position: 9999
                          restriction:
                            id: 360002226093
                            ids:
                              - 360002226093
                            type: Group
                          title: Close and redirect to topics
                          updated_at: "2018-11-08T22:27:00Z"
                          url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974.json
                          usage_7d: 0
                      ticket_form_id: 360000014173
                      title: Test Workspace 1
                      updated_at: "2018-12-17T22:37:40Z"
                      url: https://{subdomain}.zendesk.com/api/v2/workspaces.json
    put:
      operationId: UpdateWorkspace
      tags:
        - Workspaces
      summary: Update Workspace
      description: |-
        #### Allowed For
        * Admins
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace:
                  $ref: '#/components/schemas/WorkspaceInput'
            examples:
              default:
                value:
                  workspace:
                    conditions:
                      all:
                        - field: ticket_form_id
                          operator: is
                          value: "360000014173"
                      any: []
                    description: Test rules
                    macros:
                      - 360005374974
                    ticket_form_id: 360000014173
                    title: Test Workspace 1
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspace:
                    $ref: '#/components/schemas/WorkspaceObject'
              examples:
                default:
                  value:
                    workspace:
                      activated: true
                      apps: []
                      conditions:
                        all:
                          - field: ticket_form_id
                            operator: is
                            value: "360000014173"
                        any: []
                      created_at: "2018-11-13T19:08:13Z"
                      description: Test rules
                      id: 3133
                      macro_ids:
                        - 360005374974
                      position: 1
                      prefer_workspace_app_order: true
                      selected_macros:
                        - actions:
                            - field: status
                              value: solved
                          active: true
                          created_at: "2018-02-08T23:45:30Z"
                          description: null
                          id: 360005374974
                          position: 9999
                          restriction:
                            id: 360002226093
                            ids:
                              - 360002226093
                            type: Group
                          title: Close and redirect to topics
                          updated_at: "2018-11-08T22:27:00Z"
                          url: https://{subdomain}.zendesk.com/api/v2/macros/360005374974.json
                          usage_7d: 0
                      ticket_form_id: 360000014173
                      title: Test Workspace 1
                      updated_at: "2018-12-17T22:37:40Z"
                      url: https://{subdomain}.zendesk.com/api/v2/workspaces.json
    delete:
      operationId: DeleteWorkspace
      tags:
        - Workspaces
      summary: Delete Workspace
      description: |
        #### Allowed For
        * Admins
      responses:
        "204":
          description: No Content
  /api/v2/workspaces/destroy_many:
    delete:
      operationId: DestroyManyWorkspaces
      tags:
        - Workspaces
      summary: Bulk Delete Workspaces
      description: |
        #### Allowed For
        * Admins
      parameters:
        - name: ids
          in: query
          description: The ids of the workspaces to delete
          required: true
          schema:
            type: array
            items:
              type: integer
          example:
            - 1
            - 2
            - 3
      responses:
        "200":
          description: Succesful response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
  /api/v2/workspaces/reorder:
    put:
      operationId: ReorderWorkspaces
      tags:
        - Workspaces
      summary: Reorder Workspaces
      description: |
        #### Allowed For
        * Admins
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: number
            examples:
              default:
                value:
                  ids:
                    - 12
                    - 32
                    - 48
                    - 60
      responses:
        "200":
          description: Succesful response
          content:
            application/json:
              schema:
                type: string
                description: Empty response
                example: ""
              example: ""
components:
  schemas:
    AccountSettingsActiveFeaturesObject:
      type: object
      description: The active features for an account. See [Active Features](#active-features)
      properties:
        agent_forwarding:
          type: boolean
        allow_ccs:
          type: boolean
        allow_email_template_customization:
          type: boolean
        automatic_answers:
          type: boolean
        bcc_archiving:
          type: boolean
        benchmark_opt_out:
          type: boolean
        business_hours:
          type: boolean
        chat:
          type: boolean
        chat_about_my_ticket:
          type: boolean
        csat_reason_code:
          type: boolean
        custom_dkim_domain:
          type: boolean
        customer_context_as_default:
          type: boolean
        customer_satisfaction:
          type: boolean
        dynamic_contents:
          type: boolean
        explore:
          type: boolean
        explore_on_support_ent_plan:
          type: boolean
        explore_on_support_pro_plan:
          type: boolean
        facebook:
          type: boolean
        facebook_login:
          type: boolean
        fallback_composer:
          type: boolean
        forum_analytics:
          type: boolean
        good_data_and_explore:
          type: boolean
        google_login:
          type: boolean
        is_abusive:
          type: boolean
        light_agents:
          type: boolean
        markdown:
          type: boolean
        on_hold_status:
          type: boolean
        organization_access_enabled:
          type: boolean
        rich_content_in_emails:
          type: boolean
        sandbox:
          type: boolean
        satisfaction_prediction:
          type: boolean
        suspended_ticket_notification:
          type: boolean
        ticket_forms:
          type: boolean
        ticket_tagging:
          type: boolean
        topic_suggestion:
          type: boolean
        twitter:
          type: boolean
        twitter_login:
          type: boolean
        user_org_fields:
          type: boolean
        user_tagging:
          type: boolean
        voice:
          type: boolean
    AccountSettingsAgentObject:
      type: object
      description: Configuration for the agent workspace. See [Agents](#agents)
      properties:
        agent_home:
          type: boolean
        agent_workspace:
          type: boolean
        aw_self_serve_migration_enabled:
          type: boolean
        focus_mode:
          type: boolean
        idle_timeout_enabled:
          type: boolean
        unified_agent_statuses:
          type: boolean
    AccountSettingsApiObject:
      type: object
      description: API configuration options. See [API](#api)
      properties:
        accepted_api_agreement:
          type: boolean
        api_password_access:
          type: string
        api_token_access:
          type: string
    AccountSettingsAppsObject:
      type: object
      description: Apps configuration options. See [Apps](#apps)
      properties:
        create_private:
          type: boolean
        create_public:
          type: boolean
        use:
          type: boolean
    AccountSettingsBillingObject:
      type: object
      description: Billing configuration options. See [Billing](#billing)
      properties:
        backend:
          type: string
    AccountSettingsBrandingObject:
      type: object
      description: Branding settings. See [Branding](#branding)
      properties:
        favicon_url:
          type: string
          nullable: true
        header_color:
          type: string
        header_logo_url:
          type: string
          nullable: true
        page_background_color:
          type: string
        tab_background_color:
          type: string
        text_color:
          type: string
    AccountSettingsBrandsObject:
      type: object
      description: Brand settings. See [Brands](#brands)
      properties:
        default_brand_id:
          type: integer
        require_brand_on_new_tickets:
          type: boolean
    AccountSettingsCdnObject:
      type: object
      description: CDN settings
      properties:
        cdn_provider:
          type: string
        fallback_cdn_provider:
          type: string
        hosts:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              url:
                type: string
    AccountSettingsChatObject:
      type: object
      description: Zendesk Chat settings. See [Chat](#chat)
      properties:
        available:
          type: boolean
        enabled:
          type: boolean
        integrated:
          type: boolean
        maximum_request_count:
          type: integer
        welcome_message:
          type: string
    AccountSettingsCrossSellObject:
      type: object
      description: Cross Sell settings
      properties:
        show_chat_tooltip:
          type: boolean
        xsell_source:
          type: string
          nullable: true
    AccountSettingsEmailObject:
      type: object
      description: Email settings
      properties:
        accept_wildcard_emails:
          type: boolean
        custom_dkim_domain:
          type: boolean
        email_sender_authentication:
          type: boolean
          description: Whether incoming email is subjected to sender authentication checks (SPF, DKIM)
        email_sender_authentication_profile:
          type: string
          description: The sender authentication profile in use.
          enum:
            - default
            - enhanced
        email_template_photos:
          type: boolean
        email_template_section:
          type: boolean
        gmail_actions:
          type: boolean
        modern_email_template:
          type: boolean
        no_mail_delimiter:
          type: boolean
        personalized_replies:
          type: boolean
        send_gmail_messages_via_gmail:
          type: boolean
    AccountSettingsGoogleAppsObject:
      type: object
      description: Google Apps configuration. See [G Suite](#g-suite)
      properties:
        has_google_apps:
          type: boolean
        has_google_apps_admin:
          type: boolean
    AccountSettingsGroupObject:
      type: object
      description: Group configuration
      properties:
        check_group_name_uniqueness:
          type: boolean
    AccountSettingsLimitsObject:
      type: object
      description: Account limits configuration. See [Limits](#limits)
      properties:
        attachment_size:
          type: integer
    AccountSettingsLocalizationObject:
      type: object
      description: Internationalization configuration settings. See [Localization](#localization)
      properties:
        locale_ids:
          type: array
          items:
            type: integer
    AccountSettingsLotusObject:
      type: object
      description: Support UI settings. See [Lotus](#lotus)
      properties:
        pod_id:
          type: integer
        prefer_lotus:
          type: boolean
        reporting:
          type: boolean
    AccountSettingsMetricsObject:
      type: object
      description: Account metrics settings. See [Metrics](#metrics)
      properties:
        account_size:
          type: string
    AccountSettingsObject:
      type: object
      properties:
        active_features:
          $ref: '#/components/schemas/AccountSettingsActiveFeaturesObject'
        agents:
          $ref: '#/components/schemas/AccountSettingsAgentObject'
        api:
          $ref: '#/components/schemas/AccountSettingsApiObject'
        apps:
          $ref: '#/components/schemas/AccountSettingsAppsObject'
        billing:
          $ref: '#/components/schemas/AccountSettingsBillingObject'
        branding:
          $ref: '#/components/schemas/AccountSettingsBrandingObject'
        brands:
          $ref: '#/components/schemas/AccountSettingsBrandsObject'
        cdn:
          $ref: '#/components/schemas/AccountSettingsCdnObject'
        chat:
          $ref: '#/components/schemas/AccountSettingsChatObject'
        cross_sell:
          $ref: '#/components/schemas/AccountSettingsCrossSellObject'
        email:
          $ref: '#/components/schemas/AccountSettingsEmailObject'
        google_apps:
          $ref: '#/components/schemas/AccountSettingsGoogleAppsObject'
        groups:
          $ref: '#/components/schemas/AccountSettingsGroupObject'
        limits:
          $ref: '#/components/schemas/AccountSettingsLimitsObject'
        localization:
          $ref: '#/components/schemas/AccountSettingsLocalizationObject'
        lotus:
          $ref: '#/components/schemas/AccountSettingsLotusObject'
        metrics:
          $ref: '#/components/schemas/AccountSettingsMetricsObject'
        onboarding:
          $ref: '#/components/schemas/AccountSettingsOnboardingObject'
        routing:
          $ref: '#/components/schemas/AccountSettingsRoutingObject'
        rule:
          $ref: '#/components/schemas/AccountSettingsRuleObject'
        side_conversations:
          $ref: '#/components/schemas/AccountSettingsSideConversationsObject'
        statistics:
          $ref: '#/components/schemas/AccountSettingsStatisticsObject'
        ticket_form:
          $ref: '#/components/schemas/AccountSettingsTicketFormObject'
        tickets:
          $ref: '#/components/schemas/AccountSettingsTicketObject'
        twitter:
          $ref: '#/components/schemas/AccountSettingsTwitterObject'
        user:
          $ref: '#/components/schemas/AccountSettingsUserObject'
        voice:
          $ref: '#/components/schemas/AccountSettingsVoiceObject'
      example:
        active_features:
          agent_forwarding: false
          allow_ccs: true
          allow_email_template_customization: true
          automatic_answers: false
          bcc_archiving: false
          benchmark_opt_out: false
          business_hours: false
          chat: false
          chat_about_my_ticket: false
          csat_reason_code: false
          custom_dkim_domain: true
          customer_context_as_default: false
          customer_satisfaction: false
          dynamic_contents: false
          explore: true
          explore_on_support_ent_plan: false
          explore_on_support_pro_plan: false
          facebook: false
          facebook_login: false
          fallback_composer: false
          forum_analytics: true
          good_data_and_explore: false
          google_login: false
          is_abusive: false
          light_agents: false
          markdown: false
          on_hold_status: false
          organization_access_enabled: true
          rich_content_in_emails: true
          sandbox: false
          satisfaction_prediction: false
          suspended_ticket_notification: false
          ticket_forms: true
          ticket_tagging: true
          topic_suggestion: false
          twitter: true
          twitter_login: false
          user_org_fields: true
          user_tagging: true
          voice: true
        agents:
          agent_home: false
          agent_workspace: false
          aw_self_serve_migration_enabled: true
          focus_mode: false
          idle_timeout_enabled: false
          unified_agent_statuses: false
        api:
          accepted_api_agreement: true
          api_password_access: "true"
          api_token_access: "true"
        apps:
          create_private: true
          create_public: false
          use: true
        billing:
          backend: zuora
        branding:
          favicon_url: null
          header_color: 78A300
          header_logo_url: null
          page_background_color: "333333"
          tab_background_color: 7FA239
          text_color: FFFFFF
        brands:
          default_brand_id: 1873
          require_brand_on_new_tickets: false
        cdn:
          cdn_provider: default
          fallback_cdn_provider: cloudfront
          hosts:
            - name: default
              url: https://p18.zdassets.com
            - name: cloudfront
              url: https://d2y9oszrd3dhjh.cloudfront.net
        chat:
          available: true
          enabled: false
          integrated: true
          maximum_request_count: 1
          welcome_message: Hi there. How can I help today?
        cross_sell:
          show_chat_tooltip: true
          xsell_source: null
        google_apps:
          has_google_apps: false
          has_google_apps_admin: false
        groups:
          check_group_name_uniqueness: true
        limits:
          attachment_size: 52428800
        localization:
          locale_ids:
            - 1042
        lotus:
          pod_id: 999
          prefer_lotus: true
          reporting: true
        metrics:
          account_size: 100-399
        onboarding:
          checklist_onboarding_version: 2
          onboarding_segments: null
          product_sign_up: null
        routing:
          autorouting_tag: ""
          enabled: false
          max_email_capacity: 0
          max_messaging_capacity: 0
          reassignment_messaging_enabled: true
          reassignment_messaging_timeout: 30
          reassignment_talk_timeout: 30
        rule:
          macro_most_used: true
          macro_order: alphabetical
          skill_based_filtered_views: []
          using_skill_based_routing: false
        side_conversations:
          email_channel: false
          msteams_channel: false
          show_in_context_panel: false
          slack_channel: false
          tickets_channel: false
        statistics:
          forum: true
          rule_usage: true
          search: true
        ticket_form:
          raw_ticket_forms_instructions: Please choose your issue below
          ticket_forms_instructions: Please choose your issue below
        tickets:
          accepted_new_collaboration_tos: false
          agent_collision: true
          agent_invitation_enabled: true
          agent_ticket_deletion: false
          allow_group_reset: true
          assign_default_organization: true
          assign_tickets_upon_solve: true
          auto_translation_enabled: false
          auto_updated_ccs_followers_rules: false
          chat_sla_enablement: false
          collaboration: true
          comments_public_by_default: true
          default_solved_ticket_reassignment_strategy: legacy
          email_attachments: false
          emoji_autocompletion: true
          follower_and_email_cc_collaborations: false
          has_color_text: true
          is_first_comment_private_enabled: true
          light_agent_email_ccs_allowed: false
          list_empty_views: true
          list_newest_comments_first: true
          markdown_ticket_comments: false
          maximum_personal_views_to_list: 8
          modern_ticket_reassignment: false
          private_attachments: false
          rich_text_comments: true
          show_modern_ticket_reassignment: false
          status_hold: false
          tagging: true
          using_skill_based_routing: false
        twitter:
          shorten_url: optional
        user:
          agent_created_welcome_emails: true
          end_user_phone_number_validation: false
          have_gravatars_enabled: true
          language_selection: true
          multiple_organizations: false
          tagging: true
          time_zone_selection: true
        voice:
          agent_confirmation_when_forwarding: true
          agent_wrap_up_after_calls: true
          enabled: true
          logging: true
          maximum_queue_size: 5
          maximum_queue_wait_time: 1
          only_during_business_hours: false
          outbound_enabled: true
          recordings_public: true
          uk_mobile_forwarding: true
    AccountSettingsOnboardingObject:
      type: object
      description: Onboarding settings
      properties:
        checklist_onboarding_version:
          type: integer
        onboarding_segments:
          type: string
          nullable: true
        product_sign_up:
          type: string
          nullable: true
    AccountSettingsResponse:
      type: object
      properties:
        settings:
          $ref: '#/components/schemas/AccountSettingsObject'
      example:
        settings:
          active_features:
            agent_forwarding: false
            allow_ccs: true
            allow_email_template_customization: true
            automatic_answers: false
            bcc_archiving: false
            benchmark_opt_out: false
            business_hours: false
            chat: false
            chat_about_my_ticket: false
            csat_reason_code: false
            custom_dkim_domain: true
            customer_context_as_default: false
            customer_satisfaction: false
            dynamic_contents: false
            explore: true
            explore_on_support_ent_plan: false
            explore_on_support_pro_plan: false
            facebook: false
            facebook_login: false
            fallback_composer: false
            forum_analytics: true
            good_data_and_explore: false
            google_login: false
            is_abusive: false
            light_agents: false
            markdown: false
            on_hold_status: false
            organization_access_enabled: true
            rich_content_in_emails: true
            sandbox: false
            satisfaction_prediction: false
            suspended_ticket_notification: false
            ticket_forms: true
            ticket_tagging: true
            topic_suggestion: false
            twitter: true
            twitter_login: false
            user_org_fields: true
            user_tagging: true
            voice: true
          agents:
            agent_home: false
            agent_workspace: false
            aw_self_serve_migration_enabled: true
            focus_mode: false
            idle_timeout_enabled: false
            unified_agent_statuses: false
          api:
            accepted_api_agreement: true
            api_password_access: "true"
            api_token_access: "true"
          apps:
            create_private: true
            create_public: false
            use: true
          billing:
            backend: zuora
          branding:
            favicon_url: null
            header_color: 78A300
            header_logo_url: null
            page_background_color: "333333"
            tab_background_color: 7FA239
            text_color: FFFFFF
          brands:
            default_brand_id: 1873
            require_brand_on_new_tickets: false
          cdn:
            cdn_provider: default
            fallback_cdn_provider: cloudfront
            hosts:
              - name: default
                url: https://p18.zdassets.com
              - name: cloudfront
                url: https://d2y9oszrd3dhjh.cloudfront.net
          chat:
            available: true
            enabled: false
            integrated: true
            maximum_request_count: 1
            welcome_message: Hi there. How can I help today?
          cross_sell:
            show_chat_tooltip: true
            xsell_source: null
          google_apps:
            has_google_apps: false
            has_google_apps_admin: false
          groups:
            check_group_name_uniqueness: true
          limits:
            attachment_size: 52428800
          localization:
            locale_ids:
              - 1042
          lotus:
            pod_id: 999
            prefer_lotus: true
            reporting: true
          metrics:
            account_size: 100-399
          onboarding:
            checklist_onboarding_version: 2
            onboarding_segments: null
            product_sign_up: null
          routing:
            autorouting_tag: ""
            enabled: false
            max_email_capacity: 0
            max_messaging_capacity: 0
          rule:
            macro_most_used: true
            macro_order: alphabetical
            skill_based_filtered_views: []
            using_skill_based_routing: false
          side_conversations:
            email_channel: false
            msteams_channel: false
            show_in_context_panel: false
            slack_channel: false
            tickets_channel: false
          statistics:
            forum: true
            rule_usage: true
            search: true
          ticket_form:
            raw_ticket_forms_instructions: Please choose your issue below
            ticket_forms_instructions: Please choose your issue below
          tickets:
            accepted_new_collaboration_tos: false
            agent_collision: true
            agent_invitation_enabled: true
            agent_ticket_deletion: false
            allow_group_reset: true
            assign_default_organization: true
            assign_tickets_upon_solve: true
            auto_translation_enabled: false
            auto_updated_ccs_followers_rules: false
            chat_sla_enablement: false
            collaboration: true
            comments_public_by_default: true
            default_solved_ticket_reassignment_strategy: legacy
            email_attachments: false
            emoji_autocompletion: true
            follower_and_email_cc_collaborations: false
            has_color_text: true
            is_first_comment_private_enabled: true
            light_agent_email_ccs_allowed: false
            list_empty_views: true
            list_newest_comments_first: true
            markdown_ticket_comments: false
            maximum_personal_views_to_list: 8
            modern_ticket_reassignment: false
            private_attachments: false
            rich_text_comments: true
            show_modern_ticket_reassignment: false
            status_hold: false
            tagging: true
            using_skill_based_routing: false
          twitter:
            shorten_url: optional
          user:
            agent_created_welcome_emails: true
            end_user_phone_number_validation: false
            have_gravatars_enabled: true
            language_selection: true
            multiple_organizations: false
            tagging: true
            time_zone_selection: true
          voice:
            agent_confirmation_when_forwarding: true
            agent_wrap_up_after_calls: true
            enabled: true
            logging: true
            maximum_queue_size: 5
            maximum_queue_wait_time: 1
            only_during_business_hours: false
            outbound_enabled: true
            recordings_public: true
            uk_mobile_forwarding: true
    AccountSettingsRoutingObject:
      type: object
      description: Configuration for routing. See [Routing](#routing)
      properties:
        autorouting_tag:
          type: string
        enabled:
          type: boolean
        max_email_capacity:
          type: integer
        max_messaging_capacity:
          type: integer
        reassignment_messaging_enabled:
          type: boolean
        reassignment_messaging_timeout:
          type: integer
        reassignment_talk_timeout:
          type: integer
    AccountSettingsRuleObject:
      type: object
      description: Rules settings for triggers, macros, views, and automations. See [Rules](#rules)
      properties:
        macro_most_used:
          type: boolean
        macro_order:
          type: string
        skill_based_filtered_views:
          type: array
          items:
            type: object
            additionalProperties: true
        using_skill_based_routing:
          type: boolean
    AccountSettingsSideConversationsObject:
      type: object
      description: Side conversations settings
      properties:
        email_channel:
          type: boolean
        msteams_channel:
          type: boolean
        show_in_context_panel:
          type: boolean
        slack_channel:
          type: boolean
        tickets_channel:
          type: boolean
    AccountSettingsStatisticsObject:
      type: object
      description: Account statistics settings. See [Statistics](#statistics)
      properties:
        forum:
          type: boolean
        rule_usage:
          type: boolean
        search:
          type: boolean
    AccountSettingsTicketFormObject:
      type: object
      description: Ticket form settings. See [Ticket Form](#ticket-form)
      properties:
        raw_ticket_forms_instructions:
          type: string
        ticket_forms_instructions:
          type: string
    AccountSettingsTicketObject:
      type: object
      description: Ticket settings. See [Tickets](#tickets)
      properties:
        accepted_new_collaboration_tos:
          type: boolean
        agent_collision:
          type: boolean
        agent_invitation_enabled:
          type: boolean
        agent_ticket_deletion:
          type: boolean
        allow_group_reset:
          type: boolean
        assign_default_organization:
          type: boolean
        assign_tickets_upon_solve:
          type: boolean
        auto_translation_enabled:
          type: boolean
        auto_updated_ccs_followers_rules:
          type: boolean
        chat_sla_enablement:
          type: boolean
        collaboration:
          type: boolean
        comments_public_by_default:
          type: boolean
        default_solved_ticket_reassignment_strategy:
          type: string
        email_attachments:
          type: boolean
        emoji_autocompletion:
          type: boolean
        follower_and_email_cc_collaborations:
          type: boolean
        has_color_text:
          type: boolean
        is_first_comment_private_enabled:
          type: boolean
        light_agent_email_ccs_allowed:
          type: boolean
        list_empty_views:
          type: boolean
        list_newest_comments_first:
          type: boolean
        markdown_ticket_comments:
          type: boolean
        maximum_personal_views_to_list:
          type: integer
        modern_ticket_reassignment:
          type: boolean
        private_attachments:
          type: boolean
        rich_text_comments:
          type: boolean
        show_modern_ticket_reassignment:
          type: boolean
        status_hold:
          type: boolean
        tagging:
          type: boolean
        using_skill_based_routing:
          type: boolean
    AccountSettingsTwitterObject:
      type: object
      description: X (formerly Twitter) settings. See [X](#x-formerly-twitter)
      properties:
        shorten_url:
          type: string
    AccountSettingsUserObject:
      type: object
      description: User settings. See [Users](#users)
      properties:
        agent_created_welcome_emails:
          type: boolean
        end_user_phone_number_validation:
          type: boolean
        have_gravatars_enabled:
          type: boolean
        language_selection:
          type: boolean
        multiple_organizations:
          type: boolean
        tagging:
          type: boolean
        time_zone_selection:
          type: boolean
    AccountSettingsVoiceObject:
      type: object
      description: Zendesk Talk settings. See [Voice](#voice)
      properties:
        agent_confirmation_when_forwarding:
          type: boolean
        agent_wrap_up_after_calls:
          type: boolean
        enabled:
          type: boolean
        logging:
          type: boolean
        maximum_queue_size:
          type: integer
        maximum_queue_wait_time:
          type: integer
        only_during_business_hours:
          type: boolean
        outbound_enabled:
          type: boolean
        recordings_public:
          type: boolean
        uk_mobile_forwarding:
          type: boolean
    ActionObject:
      type: object
      properties:
        field:
          type: string
          description: The name of a ticket field to modify
        value:
          type: string
          description: The new value of the field
    ActionsObject:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ActionObject'
    ActivitiesCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    ActivitiesResponse:
      type: object
      properties:
        activities:
          type: array
          items:
            $ref: '#/components/schemas/ActivityObject'
          readOnly: true
        actors:
          type: array
          items:
            type: object
            additionalProperties: true
          readOnly: true
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
        users:
          type: array
          items:
            type: object
            additionalProperties: true
          readOnly: true
      example:
        activities:
          - actor:
              active: true
              alias: ""
              created_at: "2020-11-17T00:32:12Z"
              custom_role_id: null
              default_group_id: 1873
              details: ""
              email: cgoddard+ted@zendesk.com
              external_id: null
              iana_time_zone: America/Juneau
              id: 158488612
              last_login_at: "2020-11-17T00:33:44Z"
              locale: en-gb
              locale_id: 5
              moderator: true
              name: Tedd
              notes: ""
              only_private_comments: false
              organization_id: null
              phone: null
              photo: null
              report_csv: true
              restricted_agent: false
              role: admin
              role_type: null
              shared: false
              shared_agent: false
              shared_phone_number: null
              signature: ""
              suspended: false
              tags: []
              ticket_restriction: null
              time_zone: Alaska
              two_factor_auth_enabled: null
              updated_at: "2020-11-17T00:34:38Z"
              url: https://example.zendesk.com/api/v2/users/158488612.json
              user_fields:
                its_remember_september: null
                skittles: null
                user_field_1: null
              verified: true
            actor_id: 158488612
            created_at: "2020-11-17T00:34:40Z"
            id: 29183462
            object:
              ticket:
                id: 1521
                subject: test
            target:
              ticket:
                id: 1521
                subject: test
            title: 'Tedd assigned ticket #1521 to you.'
            updated_at: "2020-11-17T00:34:40Z"
            url: https://example.zendesk.com/api/v2/activities/29183462.json
            user:
              active: true
              alias: test
              created_at: "2017-08-14T20:13:53Z"
              custom_role_id: null
              default_group_id: 1873
              details: ""
              email: user@zendesk.com
              external_id: oev7jj
              iana_time_zone: Pacific/Pago_Pago
              id: 3343
              last_login_at: "2020-11-16T22:57:45Z"
              locale: en-gb
              locale_id: 5
              moderator: true
              name: Samwise Gamgee
              notes: test
              only_private_comments: false
              organization_id: 1873
              phone: null
              photo:
                content_type: image/gif
                content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
                deleted: false
                file_name: 1f84950b8d7949b3.gif
                height: 80
                id: 8730791
                inline: false
                mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
                size: 4566
                thumbnails:
                  - content_type: image/gif
                    content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                    deleted: false
                    file_name: 1f84950b8d7949b3_thumb.gif
                    height: 32
                    id: 8730801
                    inline: false
                    mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                    size: 1517
                    url: https://example.zendesk.com/api/v2/attachments/8730801.json
                    width: 32
                url: https://example.zendesk.com/api/v2/attachments/8730791.json
                width: 80
              report_csv: true
              restricted_agent: false
              role: admin
              role_type: null
              shared: false
              shared_agent: false
              shared_phone_number: null
              signature: test
              suspended: false
              tags:
                - "101"
              ticket_restriction: null
              time_zone: American Samoa
              two_factor_auth_enabled: null
              updated_at: "2020-11-17T00:33:55Z"
              url: https://example.zendesk.com/api/v2/users/3343.json
              user_fields:
                its_remember_september: null
                skittles: "2018-09-14T00:00:00+00:00"
                user_field_1: "101"
              verified: true
            user_id: 3343
            verb: tickets.assignment
        actors:
          - active: true
            alias: ""
            created_at: "2020-11-17T00:32:12Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: cgoddard+ted@zendesk.com
            external_id: null
            iana_time_zone: America/Juneau
            id: 158488612
            last_login_at: "2020-11-17T00:33:44Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Tedd
            notes: ""
            only_private_comments: false
            organization_id: null
            phone: null
            photo: null
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: ""
            suspended: false
            tags: []
            ticket_restriction: null
            time_zone: Alaska
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:34:38Z"
            url: https://example.zendesk.com/api/v2/users/158488612.json
            user_fields:
              its_remember_september: null
              skittles: null
              user_field_1: null
            verified: true
        count: 1
        next_page: null
        previous_page: null
        users:
          - active: true
            alias: test
            created_at: "2017-08-14T20:13:53Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: user@zendesk.com
            external_id: oev7jj
            iana_time_zone: Pacific/Pago_Pago
            id: 3343
            last_login_at: "2020-11-16T22:57:45Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Samwise Gamgee
            notes: test
            only_private_comments: false
            organization_id: 1873
            phone: null
            photo:
              content_type: image/gif
              content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              deleted: false
              file_name: 1f84950b8d7949b3.gif
              height: 80
              id: 8730791
              inline: false
              mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              size: 4566
              thumbnails:
                - content_type: image/gif
                  content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  deleted: false
                  file_name: 1f84950b8d7949b3_thumb.gif
                  height: 32
                  id: 8730801
                  inline: false
                  mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  size: 1517
                  url: https://example.zendesk.com/api/v2/attachments/8730801.json
                  width: 32
              url: https://example.zendesk.com/api/v2/attachments/8730791.json
              width: 80
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: test
            suspended: false
            tags:
              - "101"
            ticket_restriction: null
            time_zone: American Samoa
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:33:55Z"
            url: https://example.zendesk.com/api/v2/users/3343.json
            user_fields:
              its_remember_september: null
              skittles: "2018-09-14T00:00:00+00:00"
              user_field_1: "101"
            verified: true
    ActivityObject:
      title: Ticket Activities
      type: object
      properties:
        actor:
          type: object
          description: The full user record of the user responsible for the ticket activity. See [Users](/api-reference/ticketing/users/users/)
          allOf:
            - $ref: '#/components/schemas/UserObject'
          readOnly: true
        actor_id:
          type: integer
          description: The id of the user responsible for the ticket activity. An `actor_id` of "-1" is a Zendesk system user, such as an automations action.
          readOnly: true
        created_at:
          type: string
          description: When the record was created
          readOnly: true
        id:
          type: integer
          description: Automatically assigned on creation
          readOnly: true
        object:
          type: object
          description: The content of the activity. Can be a ticket, comment, or change.
          additionalProperties: true
          readOnly: true
        target:
          type: object
          description: The target of the activity, a ticket.
          additionalProperties: true
          readOnly: true
        title:
          type: string
          description: Description of the activity
          readOnly: true
        updated_at:
          type: string
          description: When the record was last updated
          readOnly: true
        url:
          type: string
          description: The API url of the activity
          readOnly: true
        user:
          type: object
          description: The full user record of the agent making the request. See [Users](/api-reference/ticketing/users/users/)
          allOf:
            - $ref: '#/components/schemas/UserObject'
          readOnly: true
        user_id:
          type: integer
          description: The id of the agent making the request
          readOnly: true
        verb:
          type: string
          description: The type of activity. Can be "tickets.assignment", "tickets.comment", or "tickets.priority_increase"
          readOnly: true
      example:
        actor:
          id: 8678530
          name: James A. Rosen
        actor_id: 23546
        created_at: "2019-03-05T10:38:52Z"
        id: 35
        object: {}
        target: {}
        title: 'John Hopeful assigned ticket #123 to you'
        updated_at: "2019-03-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/activities/35.json
        user:
          id: 223443
          name: Johnny Agent
        user_id: 29451
        verb: tickets.assignment
    ActivityResponse:
      type: object
      properties:
        activity:
          $ref: '#/components/schemas/ActivityObject'
      example:
        activity:
          actor:
            active: true
            alias: ""
            created_at: "2020-11-17T00:32:12Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: cgoddard+ted@zendesk.com
            external_id: null
            iana_time_zone: America/Juneau
            id: 158488612
            last_login_at: "2020-11-17T00:33:44Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Tedd
            notes: ""
            only_private_comments: false
            organization_id: null
            phone: null
            photo: null
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: ""
            suspended: false
            tags: []
            ticket_restriction: null
            time_zone: Alaska
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:34:38Z"
            url: https://example.zendesk.com/api/v2/users/158488612.json
            user_fields:
              its_remember_september: null
              skittles: null
              user_field_1: null
            verified: true
          actor_id: 158488612
          created_at: "2020-11-17T00:34:40Z"
          id: 29183462
          object:
            ticket:
              id: 1521
              subject: test
          target:
            ticket:
              id: 1521
              subject: test
          title: 'Tedd assigned ticket #1521 to you.'
          updated_at: "2020-11-17T00:34:40Z"
          url: https://example.zendesk.com/api/v2/activities/29183462.json
          user:
            active: true
            alias: test
            created_at: "2017-08-14T20:13:53Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: user@zendesk.com
            external_id: oev7jj
            iana_time_zone: Pacific/Pago_Pago
            id: 3343
            last_login_at: "2020-11-16T22:57:45Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Samwise Gamgee
            notes: test
            only_private_comments: false
            organization_id: 1873
            phone: null
            photo:
              content_type: image/gif
              content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              deleted: false
              file_name: 1f84950b8d7949b3.gif
              height: 80
              id: 8730791
              inline: false
              mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              size: 4566
              thumbnails:
                - content_type: image/gif
                  content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  deleted: false
                  file_name: 1f84950b8d7949b3_thumb.gif
                  height: 32
                  id: 8730801
                  inline: false
                  mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  size: 1517
                  url: https://example.zendesk.com/api/v2/attachments/8730801.json
                  width: 32
              url: https://example.zendesk.com/api/v2/attachments/8730791.json
              width: 80
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: test
            suspended: false
            tags:
              - "101"
            ticket_restriction: null
            time_zone: American Samoa
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:33:55Z"
            url: https://example.zendesk.com/api/v2/users/3343.json
            user_fields:
              its_remember_september: null
              skittles: "2018-09-14T00:00:00+00:00"
              user_field_1: "101"
            verified: true
          user_id: 3343
          verb: tickets.assignment
    AssigneeFieldAssignableAgentObject:
      title: AssigneeFieldAssignableAgents
      type: object
      properties:
        avatar_url:
          type: string
          description: URL of Agent's avatar
          nullable: true
        id:
          type: integer
          description: Agent Support ID
        name:
          type: string
          description: Name of the agent
      example:
        avatar_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
        id: 6473829100
        name: Joe Smith
    AssigneeFieldAssignableGroupAgentsResponse:
      type: object
      properties:
        agents:
          type: array
          items:
            $ref: '#/components/schemas/AssigneeFieldAssignableAgentObject'
        count:
          type: integer
          description: Number of agents listed in `agents` property.
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
      example:
        agents:
          - avatar_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
            id: 6473829100
            name: Joe Smith
          - avatar_url: https://z3n-example.zendesk.com/system/photos/412005192023/my_profile.png
            id: 9182736400
            name: Jane Doe
          - avatar_url: https://z3n-example.zendesk.com/system/photos/887005192023/my_profile.png
            id: 1928373460
            name: Cookie Monster
        count: 3
        next_page: null
        previous_page: null
    AssigneeFieldAssignableGroupObject:
      title: AssigneeFieldAssignableGroups
      type: object
      properties:
        description:
          type: string
          description: Description of the group
          readOnly: true
        id:
          type: integer
          description: Group ID
          readOnly: true
        name:
          type: string
          description: Name of the group
          readOnly: true
      example:
        description: Engineering team for bugs
        id: 9182736455
        name: Engineering
    AssigneeFieldAssignableGroupsAndAgentsSearchResponse:
      type: object
      properties:
        agents:
          type: array
          items:
            $ref: '#/components/schemas/AssigneeFieldAssignableSearchAgentObject'
        count:
          type: integer
          description: Number of agents + groups listed from search result.
        groups:
          type: array
          items:
            $ref: '#/components/schemas/AssigneeFieldAssignableSearchGroupObject'
      example:
        agents:
          - group: Tech
            group_id: 6574839201
            id: 8392017465
            name: Sam Technologist
            photo_url: https://z3n-example.zendesk.com/system/photos/410305192023/my_profile.png
        count: 2
        groups:
          - id: 6574839201
            name: Tech
    AssigneeFieldAssignableGroupsResponse:
      type: object
      properties:
        count:
          type: integer
          description: Number of groups listed in `groups` property.
        groups:
          type: array
          items:
            $ref: '#/components/schemas/AssigneeFieldAssignableGroupObject'
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
      example:
        count: 3
        groups:
          - description: Engineering
            id: 9182736455
            name: Group for Bugs for Engineering
          - description: Product
            id: 1928374655
            name: Group for feature requests
          - description: Customer Support
            id: 5519283746
            name: Group for customer inquiries
        next_page: null
        previous_page: null
    AssigneeFieldAssignableSearchAgentObject:
      type: object
      properties:
        group:
          type: string
          description: Name of the agent's group
        group_id:
          type: integer
          description: Agent's Group ID
        id:
          type: integer
          description: Agent ID
        name:
          type: string
          description: Name of the agent
        photo_url:
          type: string
          description: URL of Avatar
          nullable: true
      example:
        group: Engineering
        group_id: 9182736455
        id: 6473829100
        name: Joe Smith
        photo_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
    AssigneeFieldAssignableSearchGroupObject:
      type: object
      properties:
        id:
          type: integer
          description: Group ID
        name:
          type: string
          description: Name of the group
      example:
        id: 9182736455
        name: Engineering
    AttachmentBaseObject:
      type: object
      properties:
        content_type:
          type: string
          description: 'The content type of the image. Example value: "image/png"'
          readOnly: true
        content_url:
          type: string
          description: A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See [Working with url properties](/documentation/ticketing/managing-tickets/working-with-url-properties)
          readOnly: true
        deleted:
          type: boolean
          description: If true, the attachment has been deleted
          readOnly: true
        file_name:
          type: string
          description: The name of the image file
          readOnly: true
        height:
          type: string
          description: The height of the image file in pixels. If height is unknown, returns null
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        inline:
          type: boolean
          description: |
            If true, the attachment is excluded from the attachment list and the attachment's URL
            can be referenced within the comment of a ticket. Default is false
          readOnly: true
        malware_access_override:
          type: boolean
          description: If true, you can download an attachment flagged as malware. If false, you can't download such an attachment.
          readOnly: true
        malware_scan_result:
          type: string
          description: 'The result of the malware scan. There is a delay between the time the attachment is uploaded and when the malware scan is completed. Usually the scan is done within a few seconds, but high load conditions can delay the scan results. Possible values: "malware_found", "malware_not_found", "failed_to_scan", "not_scanned"'
          readOnly: true
        mapped_content_url:
          type: string
          description: The URL the attachment image file has been mapped to
          readOnly: true
        size:
          type: integer
          description: The size of the image file in bytes
          readOnly: true
        url:
          type: string
          description: A URL to access the attachment details
          readOnly: true
        width:
          type: string
          description: The width of the image file in pixels. If width is unknown, returns null
          readOnly: true
    AttachmentObject:
      type: object
      description: A file represented as an [Attachment](/api-reference/ticketing/tickets/ticket-attachments/) object
      allOf:
        - $ref: '#/components/schemas/AttachmentBaseObject'
        - $ref: '#/components/schemas/AttachmentThumbnails'
      example:
        content_type: image/png
        content_url: https://company.zendesk.com/attachments/my_funny_profile_pic.png
        file_name: my_funny_profile_pic.png
        id: 928374
        size: 166144
        thumbnails:
          - content_type: image/png
            content_url: https://company.zendesk.com/attachments/my_funny_profile_pic_thumb.png
            file_name: my_funny_profile_pic_thumb.png
            id: 928375
            size: 58298
    AttachmentResponse:
      type: object
      properties:
        attachment:
          $ref: '#/components/schemas/AttachmentObject'
    AttachmentThumbnails:
      type: object
      properties:
        thumbnails:
          type: array
          description: An array of attachment objects. Note that photo thumbnails do not have thumbnails
          items:
            $ref: '#/components/schemas/AttachmentBaseObject'
          readOnly: true
    AttachmentUpdateInput:
      type: object
      properties:
        malware_access_override:
          type: boolean
          description: If true, allows access to attachments with detected malware.
    AttachmentUpdateRequest:
      type: object
      properties:
        attachment:
          $ref: '#/components/schemas/AttachmentUpdateInput'
    AttachmentUploadResponse:
      type: object
      properties:
        upload:
          type: object
          properties:
            attachment:
              $ref: '#/components/schemas/AttachmentObject'
            attachments:
              type: array
              items:
                $ref: '#/components/schemas/AttachmentObject'
            token:
              type: string
              description: Token for subsequent request
              readOnly: true
    AuditLogObject:
      type: object
      properties:
        action:
          type: string
          description: |
            Type of change made. Possible values are "create", "destroy", "exported", "login", and "update"
          readOnly: true
        action_label:
          type: string
          description: Localized string of action field
          readOnly: true
        actor_id:
          type: integer
          description: id of the user or system that initiated the change
          readOnly: true
        actor_name:
          type: string
          description: Name of the user or system that initiated the change
          readOnly: true
        change_description:
          type: string
          description: The description of the change that occurred
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: The time the audit got created
          readOnly: true
        id:
          type: integer
          description: The id automatically assigned upon creation
          readOnly: true
        ip_address:
          type: string
          description: The IP address of the user doing the audit
          readOnly: true
        source_id:
          type: integer
          description: The id of the item being audited
          readOnly: true
        source_label:
          type: string
          description: The name of the item being audited
          readOnly: true
        source_type:
          type: string
          description: |
            Item type being audited. Typically describes the system where the change
            was initiated. Possible values vary based on your account's Zendesk
            products and activity. Common values include "apitoken", "rule", "ticket",
            "user", and "zendesk/app_market/app". The "rule" value is used for
            [automations](https://support.zendesk.com/hc/en-us/articles/4408832701850),
            [macros](https://support.zendesk.com/hc/en-us/articles/4408844187034),
            [triggers](https://support.zendesk.com/hc/en-us/articles/4408822236058),
            [views](https://support.zendesk.com/hc/en-us/articles/4408888828570),
            and other automated business rules
          readOnly: true
        url:
          type: string
          description: The URL to access the audit log
          readOnly: true
      example:
        action: update
        action_label: Updated
        actor_id: 1234
        actor_name: Sameer Patel
        change_description: Role changed from Administrator to End User
        created_at: "2012-03-05T11:32:44Z"
        id: 498483
        ip_address: 209.119.38.228
        source_id: 3456
        source_label: John Doe
        source_type: user
        url: https://company.zendesk.com/api/v2/audit_logs/498483.json
    AuditLogResponse:
      type: object
      properties:
        audit_log:
          $ref: '#/components/schemas/AuditLogObject'
    AuditLogsResponse:
      type: object
      properties:
        audit_logs:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogObject'
    AuditObject:
      type: object
      properties:
        author_id:
          type: integer
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        events:
          type: array
          items:
            type: object
            properties:
              body:
                type: string
                readOnly: true
              field_name:
                type: string
                readOnly: true
              id:
                type: integer
                readOnly: true
              type:
                type: string
                readOnly: true
              value:
                oneOf:
                  - type: string
                  - type: integer
          readOnly: true
        id:
          type: integer
          readOnly: true
        metadata:
          type: object
          readOnly: true
        ticket_id:
          type: integer
          readOnly: true
        via:
          $ref: '#/components/schemas/ViaObject'
    AuthorObject:
      type: object
      properties:
        email:
          type: string
          description: The author email
          readOnly: true
        id:
          type: integer
          description: The author id
          readOnly: true
        name:
          type: string
          description: The author name
          readOnly: true
    AutomationObject:
      type: object
      properties:
        actions:
          type: array
          description: An object describing what the automation will do. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
          items:
            $ref: '#/components/schemas/ActionObject'
        active:
          type: boolean
          description: Whether the automation is active
        conditions:
          $ref: '#/components/schemas/ConditionsObject'
        created_at:
          type: string
          format: date-time
          description: The time the automation was created
          readOnly: true
        default:
          type: boolean
          description: If true, the automation is a default automation
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        position:
          type: integer
          description: The position of the automation which specifies the order it will be executed
        raw_title:
          type: string
          description: The raw title of the automation
          readOnly: true
        title:
          type: string
          description: The title of the automation
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the automation
          readOnly: true
      example:
        actions:
          - field: priority
            value: high
        active: true
        conditions:
          all:
            - field: status
              operator: is
              value: open
            - field: priority
              operator: less_than
              value: high
          any: []
        default: false
        id: 9873843
        position: 8
        raw_title: Roger Wilco
        title: Roger Wilco
    AutomationResponse:
      type: object
      properties:
        automation:
          $ref: '#/components/schemas/AutomationObject'
    AutomationsResponse:
      type: object
      properties:
        automations:
          type: array
          items:
            $ref: '#/components/schemas/AutomationObject'
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
    BatchErrorItem:
      type: object
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            trigger_id:
              type: string
    BatchJobRequest:
      type: object
      properties:
        job:
          type: object
          properties:
            action:
              type: string
              enum:
                - patch
            items:
              type: object
              properties:
                trigger_categories:
                  type: array
                  items:
                    $ref: '#/components/schemas/TriggerCategoryBatchRequest'
                triggers:
                  type: array
                  items:
                    $ref: '#/components/schemas/TriggerBatchRequest'
    BatchJobResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/BatchErrorItem'
        results:
          type: object
          properties:
            trigger_categories:
              type: array
              items:
                $ref: '#/components/schemas/TriggerCategory'
            triggers:
              type: array
              items:
                $ref: '#/components/schemas/TriggerObject'
        status:
          type: string
          enum:
            - complete
            - failed
    BookmarkCreateRequest:
      type: object
      properties:
        bookmark:
          $ref: '#/components/schemas/BookmarkInput'
    BookmarkInput:
      type: object
      properties:
        ticket_id:
          type: integer
          description: The id of the ticket the bookmark is for.
    BookmarkObject:
      title: Bookmarks
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the bookmark was created
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when the bookmark is created
          readOnly: true
        ticket:
          type: object
          allOf:
            - $ref: '#/components/schemas/TicketObject'
          readOnly: true
        url:
          type: string
          description: The API url of this bookmark
          readOnly: true
      example:
        created_at: "2014-11-20T22:55:29Z"
        id: 35436
        ticket:
          description: The fire is very colorful.
          id: 60
          priority: high
          requester_id: 156
          subject: Help, my printer is on fire!
        url: https://{subdomain}.zendesk.com/api/v2/bookmarks/35436.json
    BookmarkResponse:
      type: object
      properties:
        bookmark:
          $ref: '#/components/schemas/BookmarkObject'
    BookmarksResponse:
      title: Bookmarks
      type: object
      allOf:
        - $ref: '#/components/schemas/OffsetPaginationObject'
        - type: object
          properties:
            bookmarks:
              type: array
              items:
                $ref: '#/components/schemas/BookmarkObject'
    BrandCreateRequest:
      type: object
      properties:
        brand:
          $ref: '#/components/schemas/BrandObject'
    BrandObject:
      title: Brands
      type: object
      properties:
        active:
          type: boolean
          description: If the brand is set as active
        brand_url:
          type: string
          description: The url of the brand
        created_at:
          type: string
          format: date-time
          description: The time the brand was created
          readOnly: true
        default:
          type: boolean
          description: Is the brand the default brand for this account
        has_help_center:
          type: boolean
          description: If the brand has a Help Center
        help_center_state:
          type: string
          description: The state of the Help Center
          enum:
            - enabled
            - disabled
            - restricted
          readOnly: true
        host_mapping:
          type: string
          description: The hostmapping to this brand, if any. Only admins view this property.
        id:
          type: integer
          description: The ID automatically assigned when the brand is created
          readOnly: true
        is_deleted:
          type: boolean
          description: If the brand object is deleted or not
        logo:
          $ref: '#/components/schemas/AttachmentObject'
        name:
          type: string
          description: The name of the brand
        signature_template:
          type: string
          description: The signature template for a brand
        subdomain:
          type: string
          description: The subdomain of the brand
        ticket_form_ids:
          type: array
          description: The ids of ticket forms that are available for use by a brand
          items:
            type: integer
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the brand
          readOnly: true
        url:
          type: string
          description: The API url of this brand
          readOnly: true
      example:
        active: true
        brand_url: https://brand1.com
        created_at: "2012-04-02T22:55:29Z"
        default: true
        has_help_center: true
        help_center_state: enabled
        host_mapping: brand1.com
        id: 47
        logo:
          content_type: image/png
          content_url: https://company.zendesk.com/logos/brand1_logo.png
          file_name: brand1_logo.png
          id: 928374
          size: 166144
          thumbnails:
            - content_type: image/png
              content_url: https://company.zendesk.com/photos/brand1_logo_thumb.png
              file_name: brand1_logo_thumb.png
              id: 928375
              mapped_content_url: https://company.com/photos/brand1_logo_thumb.png
              size: 58298
              url: https://company.zendesk.com/api/v2/attachments/928375.json
            - content_type: image/png
              content_url: https://company.zendesk.com/photos/brand1_logo_small.png
              file_name: brand1_logo_small.png
              id: 928376
              mapped_content_url: https://company.com/photos/brand1_logo_small.png
              size: 58298
              url: https://company.zendesk.com/api/v2/attachments/928376.json
          url: https://company.zendesk.com/api/v2/attachments/928374.json
        name: Brand 1
        signature_template: '{{agent.signature}}'
        subdomain: brand1
        ticket_form_ids:
          - 47
          - 33
          - 22
        updated_at: "2012-04-02T22:55:29Z"
        url: https://company.zendesk.com/api/v2/brands/47.json
      required:
        - name
        - subdomain
    BrandResponse:
      type: object
      properties:
        brand:
          $ref: '#/components/schemas/BrandObject'
    BrandUpdateRequest:
      type: object
      properties:
        brand:
          $ref: '#/components/schemas/BrandObject'
    BrandsResponse:
      title: Brands
      type: object
      allOf:
        - $ref: '#/components/schemas/OffsetPaginationObject'
        - type: object
          properties:
            brands:
              type: array
              description: Array of brands
              items:
                $ref: '#/components/schemas/BrandObject'
    BulkUpdateDefaultCustomStatusRequest:
      type: object
      properties:
        ids:
          type: string
          description: The comma-separated list of custom ticket status ids to be set as default for their status categories
    BulkUpdateDefaultCustomStatusResponse:
      type: object
    ChannelFrameworkPushResultsResponse:
      type: object
      properties:
        results:
          type: array
          description: An array of [result objects](#result-object)
          items:
            $ref: '#/components/schemas/ChannelFrameworkResultObject'
    ChannelFrameworkResultObject:
      type: object
      properties:
        external_resource_id:
          type: string
          description: The external ID of the resource, as passed in
          readOnly: true
        status:
          $ref: '#/components/schemas/ChannelFrameworkResultStatusObject'
    ChannelFrameworkResultStatusObject:
      type: object
      description: The status of the import for the indicated resource
      properties:
        code:
          type: string
          description: A code indicating the status of the import of the resource, as described in [status codes](#status-codes)
          readOnly: true
        description:
          type: string
          description: In the case of an exception, a description of the exception. Otherwise, not present.
          readOnly: true
    CollaboratorObject:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
      example:
        email: someone@example.com
        name: Someone Special
    ComplianceDeletionStatusObject:
      type: object
      properties:
        account_subdomain:
          type: string
        action:
          type: string
        application:
          type: string
        created_at:
          type: string
        executer_id:
          type: integer
          nullable: true
        user_id:
          type: integer
      required:
        - action
        - application
        - account_subdomain
        - executer_id
        - user_id
        - created_at
    ComplianceDeletionStatusesResponse:
      type: object
      properties:
        compliance_deletion_statuses:
          type: array
          items:
            $ref: '#/components/schemas/ComplianceDeletionStatusObject'
    ConditionObject:
      type: object
      properties:
        field:
          type: string
          description: The name of a ticket field
        operator:
          type: string
          description: A comparison operator
        value:
          type: string
          description: The value of a ticket field
    ConditionsObject:
      type: object
      description: An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      properties:
        all:
          type: array
          description: Logical AND. Tickets must fulfill all of the conditions to be considered matching
          items:
            $ref: '#/components/schemas/ConditionObject'
        any:
          type: array
          description: Logical OR. Tickets may satisfy any of the conditions to be considered matching
          items:
            $ref: '#/components/schemas/ConditionObject'
    CountOrganizationObject:
      type: object
      properties:
        refreshed_at:
          type: string
          readOnly: true
        value:
          type: integer
          readOnly: true
    CountOrganizationResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/CountOrganizationObject'
    CountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: datetime
            value:
              type: integer
    CreateOrganizationRequest:
      type: object
      properties:
        organization:
          $ref: '#/components/schemas/OrganizationObject'
      required:
        - organization
    CreateResourceResult:
      type: object
      properties:
        id:
          type: integer
          description: the id of the new resource
        index:
          type: integer
          description: the index number of the resul
      required:
        - id
        - index
    CurrentUserResponse:
      type: object
      properties:
        user:
          allOf:
            - $ref: '#/components/schemas/UserObject'
            - type: object
              properties:
                authenticity_token:
                  type: string
                  description: CSRF token required by some Zendesk APIs.
                  readOnly: true
    CursorBasedExportIncrementalTicketsResponse:
      type: object
      description: |
        See [Tickets](/api-reference/ticketing/tickets/tickets/) for a detailed example.
      properties:
        after_cursor:
          type: string
          nullable: true
        after_url:
          type: string
          nullable: true
        before_cursor:
          type: string
          nullable: true
        before_url:
          type: string
          nullable: true
        end_of_stream:
          type: boolean
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketObject'
      example:
        after_cursor: MTU3NjYxMzUzOS4wfHw0Njd8
        after_url: https://{subdomain}.zendesk.com/api/v2/incremental/tickets/cursor.json?cursor=MTU3NjYxMzUzOS4wfHw0Njd8
        before_cursor: null
        before_url: null
        end_of_stream: true
        tickets:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 35436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    CursorBasedExportIncrementalUsersResponse:
      type: object
      properties:
        after_cursor:
          type: string
          nullable: true
        after_url:
          type: string
          nullable: true
        before_cursor:
          type: string
          nullable: true
        before_url:
          type: string
          nullable: true
        end_of_stream:
          type: boolean
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserObject'
      example:
        after_cursor: MTU3NjYxMzUzOS4wfHw0Njd8
        after_url: https://example.zendesk.com/api/v2/incremental/users/cursor.json?cursor=MTU3NjYxMzUzOS4wfHw0Njd8
        before_cursor: null
        before_url: null
        end_of_stream: true
        users:
          - active: true
            alias: Mr. Johnny
            created_at: "2009-07-20T22:55:29Z"
            custom_role_id: 9373643
            details: ""
            email: johnny@example.com
            external_id: sai989sur98w9
            id: 35436
            last_login_at: "2011-05-05T10:38:52Z"
            locale: en-US
            locale_id: 1
            moderator: true
            name: Johnny Agent
            notes: Johnny is a nice guy!
            only_private_comments: false
            organization_id: 57542
            phone: "+15551234567"
            photo:
              content_type: image/png
              content_url: https://company.zendesk.com/photos/my_funny_profile_pic.png
              id: 928374
              name: my_funny_profile_pic.png
              size: 166144
              thumbnails:
                - content_type: image/png
                  content_url: https://company.zendesk.com/photos/my_funny_profile_pic_thumb.png
                  id: 928375
                  name: my_funny_profile_pic_thumb.png
                  size: 58298
            restricted_agent: true
            role: agent
            role_type: 0
            shared: false
            shared_agent: false
            signature: Have a nice day, Johnny
            suspended: true
            tags:
              - enterprise
              - other_tag
            ticket_restriction: assigned
            time_zone: Copenhagen
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/users/35436.json
            user_fields:
              user_date: "2012-07-23T00:00:00Z"
              user_decimal: 5.1
              user_dropdown: option_1
            verified: true
    CustomFieldObject:
      type: object
      properties:
        active:
          type: boolean
          description: If true, this field is available for use
        created_at:
          type: string
          format: date-time
          description: The time of the last update of the ticket field
          readOnly: true
        custom_field_options:
          type: array
          description: Required and presented for a custom field of type "dropdown". Each option is represented by an object with a `name` and `value` property
          items:
            $ref: '#/components/schemas/CustomFieldOptionObject'
        description:
          type: string
          description: User-defined description of this field's purpose
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        key:
          type: string
          description: A unique key that identifies this custom field. This is used for updating the field and referencing in placeholders. The key must consist of only letters, numbers, and underscores. It can't be only numbers
        position:
          type: integer
          description: Ordering of the field relative to other fields
        raw_description:
          type: string
          description: The dynamic content placeholder, if present, or the `description` value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        raw_title:
          type: string
          description: The dynamic content placeholder, if present, or the `title` value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        regexp_for_validation:
          type: string
          description: Regular expression field only. The validation pattern for a field value to be deemed valid
          nullable: true
        relationship_filter:
          type: object
          description: A filter definition that allows your autocomplete to filter down results
        relationship_target_type:
          type: string
          description: A representation of what type of object the field references. Options are "zen:user", "zen:organization", "zen:ticket", and "zen:custom_object:{key}" where key is a custom object key. For example "zen:custom_object:apartment".
        system:
          type: boolean
          description: If true, only active and position values of this field can be changed
          readOnly: true
        tag:
          type: string
          description: Optional for custom field of type "checkbox"; not presented otherwise.
        title:
          type: string
          description: The title of the custom field
        type:
          type: string
          description: 'The custom field type: "checkbox", "date", "decimal", "dropdown", "integer", ["lookup"](/api-reference/ticketing/lookup_relationships/lookup_relationships/), "multiselect", "regexp", "text", or "textarea"'
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the ticket field
          readOnly: true
        url:
          type: string
          description: The URL for this resource
          readOnly: true
      required:
        - key
        - type
        - title
    CustomFieldOptionObject:
      type: object
      properties:
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        name:
          type: string
          description: Name of the dropdown option
        position:
          type: integer
          description: Position of the dropdown option
        raw_name:
          type: string
          description: Raw name of the dropdown option
          readOnly: true
        url:
          type: string
          description: URL of the dropdown option
          readOnly: true
        value:
          type: string
          description: Value of the dropdown option
      required:
        - name
        - value
    CustomFieldOptionResponse:
      type: object
      properties:
        custom_field_option:
          $ref: '#/components/schemas/CustomFieldOptionObject'
    CustomFieldOptionsResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total count of records retrieved
          readOnly: true
        custom_field_options:
          type: array
          items:
            $ref: '#/components/schemas/CustomFieldOptionObject'
        next_page:
          type: string
          description: URL of the next page
          nullable: true
          readOnly: true
        previous_page:
          type: string
          description: URL of the previous page
          nullable: true
          readOnly: true
    CustomObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the object type was created
          readOnly: true
        created_by_user_id:
          type: string
          description: Id of a user who created the object
          readOnly: true
        description:
          type: string
          description: User-defined description of the object
        include_in_list_view:
          type: boolean
          description: A flag setting the visibility of the object in the agent's list view. If true, all agents and admins have viewing access to the object in the Custom objects record page in the Agent Workspace. If false, only admins have viewing access
        key:
          type: string
          description: A user-defined unique identifier. Writable on create only
          readOnly: true
        raw_description:
          type: string
          description: The dynamic content placeholder, if present, or the "raw_description" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        raw_title:
          type: string
          description: The dynamic content placeholder, if present, or the "title" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        raw_title_pluralized:
          type: string
          description: The dynamic content placeholder, if present, or the "raw_title_pluralized" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        title:
          type: string
          description: User-defined display name for the object
        title_pluralized:
          type: string
          description: User-defined pluralized version of the object's title
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the object
          readOnly: true
        updated_by_user_id:
          type: string
          description: Id of the last user who updated the object
          readOnly: true
        url:
          type: string
          description: Direct link to the specific custom object
          readOnly: true
      required:
        - key
        - title
        - title_pluralized
        - include_in_list_view
    CustomObjectCreateInput:
      type: object
      properties:
        key:
          type: string
          description: Unique identifier. Writable on create only
        title:
          type: string
          description: Display name for the object
        title_pluralized:
          type: string
          description: Pluralized version of the object's title
    CustomObjectField:
      type: object
      allOf:
        - $ref: '#/components/schemas/CustomFieldObject'
      properties:
        properties:
          $ref: '#/components/schemas/CustomObjectFieldPropertiesObject'
      example:
        active: true
        created_at: "2022-09-07T23:21:59Z"
        description: Make
        id: 4398096842879
        key: make
        position: 0
        properties:
          autoincrement_enabled: true
          autoincrement_next_sequence: 1
          autoincrement_padding: 5
          autoincrement_prefix: 'Order # '
          is_unique: false
        raw_description: Make
        raw_title: Make
        regexp_for_validation: null
        system: false
        title: Make
        type: text
        updated_at: "2022-09-07T23:22:00Z"
        url: https://company.zendesk.com/api/v2/custom_objects/car/fields/4398096842879.json
    CustomObjectFieldPropertiesObject:
      type: object
      description: A set of properties which describe the standard::name field's autonumbering and uniqueness behavior. Autonumbering and uniqueness can't be used together
      properties:
        autoincrement_enabled:
          type: boolean
          description: Turns autonumbering on or off
        autoincrement_next_sequence:
          type: integer
          description: The next number in the autonumbering sequence. It can't be negative or less than the current autonumbering value
        autoincrement_padding:
          type: integer
          description: Sets the number of digits for autogenerated numbers. Valid values are 0-9
        autoincrement_prefix:
          type: string
          description: A prefix to autogenerated numbers that can't exceed 30 characters
        is_unique:
          type: boolean
          description: Turns uniqueness on or off
      example:
        autoincrement_enabled: true
        autoincrement_next_sequence: 1
        autoincrement_padding: 5
        autoincrement_prefix: 'Order # '
        is_unique: false
    CustomObjectFieldResponse:
      type: object
      properties:
        custom_object_field:
          $ref: '#/components/schemas/CustomObjectField'
    CustomObjectFieldsCreateRequest:
      type: object
      properties:
        custom_object_field:
          $ref: '#/components/schemas/CustomObjectField'
    CustomObjectFieldsResponse:
      type: object
      properties:
        custom_object_fields:
          type: array
          items:
            $ref: '#/components/schemas/CustomObjectField'
    CustomObjectLimitsResponse:
      type: object
      properties:
        count:
          type: integer
          description: The current numnber of the requested resource
          readOnly: true
        limit:
          type: integer
          description: The maximum allowed number for the requested resource
          readOnly: true
    CustomObjectRecord:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the object was created
          readOnly: true
        created_by_user_id:
          type: string
          description: Id of a user who created the object
          readOnly: true
        custom_object_fields:
          type: object
          additionalProperties: true
        custom_object_key:
          type: string
          description: A user-defined unique identifier
          readOnly: true
        external_id:
          type: string
          description: An id you can use to link custom object records to external data
          nullable: true
        id:
          type: string
          description: Automatically assigned upon creation
          readOnly: true
        name:
          type: string
          description: User-defined display name for the object. If autonumbering is selected for the custom object's name field, the name isn't allowed because it's automatically generated. If uniqueness is enabled, the name must be unique.
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the object
          readOnly: true
        updated_by_user_id:
          type: string
          description: Id of the last user who updated the object
          readOnly: true
        url:
          type: string
          description: Direct link to the specific custom object
          readOnly: true
      required:
        - name
    CustomObjectRecordFilteredSearchCondition:
      type: object
      properties:
        field_key:
          type: object
          properties:
            operator:
              type: string
            value:
              oneOf:
                - type: string
                - type: integer
                - type: array
                  items:
                    oneOf:
                      - type: string
                      - type: integer
          example:
            operator: value
          nullable: true
      additionalProperties: true
    CustomObjectRecordResponse:
      type: object
      properties:
        custom_object_record:
          $ref: '#/components/schemas/CustomObjectRecord'
    CustomObjectRecordsBulkCreateRequest:
      type: object
      properties:
        job:
          type: object
          properties:
            action:
              type: string
            items:
              type: array
              description: An array of record objects for job actions that create, update, or set. An array of strings for job actions that delete.
              items:
                $ref: '#/components/schemas/CustomObjectRecord'
    CustomObjectRecordsCreateRequest:
      type: object
      properties:
        custom_object_record:
          $ref: '#/components/schemas/CustomObjectRecord'
    CustomObjectRecordsFilteredSearchRequestBasic:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/CustomObjectRecordFilteredSearchCondition'
    CustomObjectRecordsFilteredSearchRequestComplex:
      type: object
      properties:
        filter:
          type: object
          properties:
            $and:
              type: array
              items:
                $ref: '#/components/schemas/CustomObjectRecordFilteredSearchCondition'
            $or:
              type: array
              items:
                $ref: '#/components/schemas/CustomObjectRecordFilteredSearchCondition'
    CustomObjectRecordsJobsResponse:
      type: object
      properties:
        job_status:
          type: object
          properties:
            id:
              type: string
            message:
              type: string
              nullable: true
            progress:
              type: integer
              nullable: true
            results:
              type: array
              items:
                $ref: '#/components/schemas/CustomObjectRecord'
              nullable: true
            status:
              type: string
            total:
              type: integer
            url:
              type: string
    CustomObjectRecordsResponse:
      type: object
      properties:
        count:
          type: integer
          description: The number of results returned for the current request
          readOnly: true
        custom_object_records:
          type: array
          items:
            $ref: '#/components/schemas/CustomObjectRecord'
        links:
          type: object
          properties:
            next:
              type: string
              nullable: true
            prev:
              type: string
              nullable: true
          required:
            - prev
            - next
        meta:
          type: object
          properties:
            after_cursor:
              type: string
              nullable: true
            before_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
          required:
            - has_more
            - after_cursor
            - before_cursor
    CustomObjectRecordsUpsertRequest:
      type: object
      properties:
        custom_object_record:
          $ref: '#/components/schemas/CustomObjectRecord'
    CustomObjectResponse:
      type: object
      properties:
        custom_object:
          $ref: '#/components/schemas/CustomObject'
    CustomObjectsCreateRequest:
      type: object
      properties:
        custom_object:
          $ref: '#/components/schemas/CustomObjectCreateInput'
    CustomObjectsResponse:
      type: object
      properties:
        custom_objects:
          type: array
          items:
            $ref: '#/components/schemas/CustomObject'
    CustomRoleConfigurationObject:
      type: object
      description: Configuration settings for the role. See [Configuration](#configuration)
      properties:
        assign_tickets_to_any_group:
          type: boolean
          description: Whether or not the agent can assign tickets to any group
          readOnly: true
        chat_access:
          type: boolean
          description: Whether or not the agent has access to Chat
          readOnly: true
        end_user_list_access:
          type: string
          description: 'Whether or not the agent can view lists of user profiles. Allowed values: "full", "none"'
        end_user_profile_access:
          type: string
          description: 'What the agent can do with end-user profiles. Allowed values: "edit", "edit-within-org", "full", "readonly"'
        explore_access:
          type: string
          description: 'Allowed values: "edit", "full", "none", "readonly"'
        forum_access:
          type: string
          description: 'The kind of access the agent has to Guide. Allowed values: "edit-topics", "full", "readonly"'
        forum_access_restricted_content:
          type: boolean
        group_access:
          type: boolean
          description: Whether or not the agent can add or modify groups
          readOnly: true
        light_agent:
          type: boolean
          readOnly: true
        macro_access:
          type: string
          description: 'What the agent can do with macros. Allowed values: "full", "manage-group", "manage-personal", "readonly"'
        manage_business_rules:
          type: boolean
          description: Whether or not the agent can manage business rules
        manage_contextual_workspaces:
          type: boolean
          description: Whether or not the agent can view, add, and edit contextual workspaces
        manage_dynamic_content:
          type: boolean
          description: Whether or not the agent can access dynamic content
        manage_extensions_and_channels:
          type: boolean
          description: Whether or not the agent can manage channels and extensions
        manage_facebook:
          type: boolean
          description: Whether or not the agent can manage Facebook pages
        manage_organization_fields:
          type: boolean
          description: Whether or not the agent can create and manage organization fields
        manage_ticket_fields:
          type: boolean
          description: Whether or not the agent can create and manage ticket fields
        manage_ticket_forms:
          type: boolean
          description: Whether or not the agent can create and manage ticket forms
        manage_user_fields:
          type: boolean
          description: Whether or not the agent can create and manage user fields
        moderate_forums:
          type: boolean
          readOnly: true
        organization_editing:
          type: boolean
          description: Whether or not the agent can add or modify organizations
        organization_notes_editing:
          type: boolean
          description: Whether or not the agent can add or modify organization notes
          readOnly: true
        report_access:
          type: string
          description: 'What the agent can do with reports. Allowed values: "full", "none", "readonly"'
        side_conversation_create:
          type: boolean
          description: Whether or not the agent can contribute to side conversations
        ticket_access:
          type: string
          description: 'What kind of tickets the agent can access. Allowed values: "all", "assigned-only", "within-groups", "within-groups-and-public-groups", "within-organization"'
        ticket_comment_access:
          type: string
          description: 'What type of comments the agent can make. Allowed values: "public", "none"'
        ticket_deletion:
          type: boolean
          description: Whether or not the agent can delete tickets
        ticket_editing:
          type: boolean
          description: Whether or not the agent can edit ticket properties
        ticket_merge:
          type: boolean
          description: Whether or not the agent can merge tickets
        ticket_tag_editing:
          type: boolean
          description: Whether or not the agent can edit ticket tags
        twitter_search_access:
          type: boolean
        user_view_access:
          type: string
          description: 'What the agent can do with customer lists. Allowed values: "full", "manage-group", "manage-personal", "none", "readonly"'
        view_access:
          type: string
          description: 'What the agent can do with views. Allowed values: "full", "manage-group", "manage-personal", "playonly", "readonly"'
        view_deleted_tickets:
          type: boolean
          description: Whether or not the agent can view deleted tickets
        voice_access:
          type: boolean
          description: Whether or not the agent can answer and place calls to end users
        voice_dashboard_access:
          type: boolean
          description: Whether or not the agent can view details about calls on the Talk dashboard
    CustomRoleObject:
      title: Custom Agent Roles
      type: object
      properties:
        configuration:
          $ref: '#/components/schemas/CustomRoleConfigurationObject'
        created_at:
          type: string
          format: date-time
          description: The time the record was created
          readOnly: true
        description:
          type: string
          description: A description of the role
        id:
          type: integer
          description: Automatically assigned on creation
          readOnly: true
        name:
          type: string
          description: Name of the custom role
        role_type:
          type: integer
          description: The user's role. 0 stands for a custom agent, 1 for a light agent, 2 for a chat agent, 3 for a contributor, 4 for an admin and 5 for a billing admin. See [Understanding standard agent roles in Zendesk Support](https://support.zendesk.com/hc/en-us/articles/4409155971354-Understanding-standard-agent-roles-in-Zendesk-Support) in Zendesk help
          readOnly: true
        team_member_count:
          type: integer
          description: The number of team members assigned to this role
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time the record was last updated
          readOnly: true
      required:
        - name
        - role_type
    CustomRoleResponse:
      type: object
      properties:
        custom_role:
          $ref: '#/components/schemas/CustomRoleObject'
    CustomRolesResponse:
      type: object
      properties:
        custom_roles:
          type: array
          items:
            $ref: '#/components/schemas/CustomRoleObject'
    CustomStatusCreateInput:
      type: object
      allOf:
        - $ref: '#/components/schemas/CustomStatusUpdateInput'
        - type: object
          properties:
            status_category:
              type: string
              description: The status category the custom ticket status belongs to
              enum:
                - new
                - open
                - pending
                - hold
                - solved
    CustomStatusCreateRequest:
      type: object
      properties:
        custom_status:
          $ref: '#/components/schemas/CustomStatusCreateInput'
    CustomStatusObject:
      type: object
      properties:
        active:
          type: boolean
          description: If true, the custom status is set to active, If false, the custom status is set to inactive
        agent_label:
          type: string
          description: The label displayed to agents. Maximum length is 48 characters
        created_at:
          type: string
          format: date-time
          description: The date and time the custom ticket status was created
          readOnly: true
        default:
          type: boolean
          description: If true, the custom status is set to default. If false, the custom status is set to non-default
        description:
          type: string
          description: The description of when the user should select this custom ticket status
        end_user_description:
          type: string
          description: The description displayed to end users
        end_user_label:
          type: string
          description: The label displayed to end users. Maximum length is 48 characters
        id:
          type: integer
          description: Automatically assigned when the custom ticket status is created
          readOnly: true
        raw_agent_label:
          type: string
          description: The dynamic content placeholder. If the dynamic content placeholder is not available, this is the "agent_label" value. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
          readOnly: true
        raw_description:
          type: string
          description: The dynamic content placeholder. If the dynamic content placeholder is not available, this is the "description" value. [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
          readOnly: true
        raw_end_user_description:
          type: string
          description: The dynamic content placeholder. If the dynamic content placeholder is not available, this is the "end_user_description" value. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
          readOnly: true
        raw_end_user_label:
          type: string
          description: The dynamic content placeholder. If the dynamic content placeholder is not available, this is the "end_user_label" value. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
          readOnly: true
        status_category:
          type: string
          description: The status category the custom ticket status belongs to
          enum:
            - new
            - open
            - pending
            - hold
            - solved
        updated_at:
          type: string
          format: date-time
          description: The date and time the custom ticket status was last updated
          readOnly: true
      required:
        - status_category
        - agent_label
    CustomStatusResponse:
      type: object
      properties:
        custom_status:
          $ref: '#/components/schemas/CustomStatusObject'
    CustomStatusUpdateInput:
      type: object
      properties:
        active:
          type: boolean
          description: True if the custom status is set as active; inactive if false
        agent_label:
          type: string
          description: The dynamic content placeholder, if present, or the "agent_label" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        description:
          type: string
          description: The dynamic content placeholder, if present, or the "description" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        end_user_description:
          type: string
          description: The dynamic content placeholder, if present, or the "end_user_description" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        end_user_label:
          type: string
          description: The dynamic content placeholder, if present, or the "end_user_label" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
    CustomStatusUpdateRequest:
      type: object
      properties:
        custom_status:
          $ref: '#/components/schemas/CustomStatusUpdateInput'
    CustomStatusesResponse:
      type: object
      properties:
        custom_statuses:
          type: array
          items:
            $ref: '#/components/schemas/CustomStatusObject'
    DefinitionsResponse:
      type: object
      properties:
        definitions:
          type: object
          properties:
            conditions_all:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                  nullable:
                    type: boolean
                  operators:
                    type: array
                    items:
                      type: object
                      properties:
                        terminal:
                          type: boolean
                        title:
                          type: string
                        value:
                          type: string
                  repeatable:
                    type: boolean
                  subject:
                    type: string
                  title:
                    type: string
                  type:
                    type: string
                  values:
                    type: array
                    items:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                        title:
                          type: string
                        value:
                          type: string
            conditions_any:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                  nullable:
                    type: boolean
                  operators:
                    type: array
                    items:
                      type: object
                      properties:
                        terminal:
                          type: boolean
                        title:
                          type: string
                        value:
                          type: string
                  repeatable:
                    type: boolean
                  subject:
                    type: string
                  title:
                    type: string
                  type:
                    type: string
                  values:
                    type: array
                    items:
                      type: object
                      properties:
                        enabled:
                          type: boolean
                        title:
                          type: string
                        value:
                          type: string
    DeletedUserObject:
      type: object
      properties:
        active:
          type: boolean
        created_at:
          type: string
        email:
          type: string
        id:
          type: integer
        locale:
          type: string
        locale_id:
          type: integer
        name:
          type: string
        organization_id:
          type: integer
        phone:
          type: string
          nullable: true
        photo:
          type: object
          nullable: true
        role:
          type: string
        shared_phone_number:
          type: string
          nullable: true
        time_zone:
          type: string
        updated_at:
          type: string
        url:
          type: string
      required:
        - id
        - url
        - name
        - email
        - created_at
        - updated_at
        - time_zone
        - phone
        - shared_phone_number
        - photo
        - locale_id
        - locale
        - organization_id
        - role
        - active
    DeletedUserResponse:
      type: object
      properties:
        deleted_user:
          $ref: '#/components/schemas/DeletedUserObject'
    DeletedUsersResponse:
      type: object
      properties:
        deleted_users:
          type: array
          items:
            $ref: '#/components/schemas/DeletedUserObject'
    DeletionSchedule:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the deletion schedule is active
        conditions:
          $ref: '#/components/schemas/ConditionsObject'
        created_at:
          type: string
          format: date-time
          description: The time the deletion schedule was created
          readOnly: true
        default:
          type: boolean
          description: Whether the deletion schedule is the default
          readOnly: true
        description:
          type: string
          description: The description of the deletion schedule
        id:
          type: integer
          description: The id of the deletion schedule
          readOnly: true
        title:
          type: string
          description: The title of the deletion schedule
        updated_at:
          type: string
          format: date-time
          description: The time the deletion schedule was last updated
          readOnly: true
        url:
          type: string
          description: Url for obtaining the deletion schedule JSON
          readOnly: true
    DynamicContentObject:
      title: Dynamic Content Items
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: When this record was created
          readOnly: true
        default_locale_id:
          type: integer
          description: The default locale for the item. Must be one of the [locales the account has active](/api-reference/ticketing/account-configuration/locales/#list-locales).
        id:
          type: integer
          description: Automatically assigned when creating items
          readOnly: true
        name:
          type: string
          description: The unique name of the item
        outdated:
          type: boolean
          description: Indicates the item has outdated variants within it
          readOnly: true
        placeholder:
          type: string
          description: Automatically generated placeholder for the item, derived from name
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When this record was last updated
          readOnly: true
        url:
          type: string
          description: The API url of this item
          readOnly: true
        variants:
          type: array
          description: All variants within this item. See [Dynamic Content Item Variants](/api-reference/ticketing/ticket-management/dynamic_content_item_variants/)
          items:
            $ref: '#/components/schemas/DynamicContentVariantObject'
      required:
        - name
        - default_locale_id
        - variants
    DynamicContentResponse:
      type: object
      properties:
        item:
          $ref: '#/components/schemas/DynamicContentObject'
    DynamicContentVariantObject:
      type: object
      properties:
        active:
          type: boolean
          description: If the variant is active and useable
        content:
          type: string
          description: The content of the variant
        created_at:
          type: string
          format: date-time
          description: When the variant was created
          readOnly: true
        default:
          type: boolean
          description: If the variant is the default for the item it belongs to
        id:
          type: integer
          description: Automatically assigned when the variant is created
          readOnly: true
        locale_id:
          type: integer
          description: An active locale
        outdated:
          type: boolean
          description: If the variant is outdated
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When the variant was last updated
          readOnly: true
        url:
          type: string
          description: The API url of the variant
          readOnly: true
      example:
        active: true
        content: This is my dynamic content in English
        created_at: "2014-04-09T19:53:23Z"
        default: true
        id: 23
        locale_id: 125
        outdated: false
        updated_at: "2014-04-09T19:53:23Z"
        url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/23.json
      required:
        - content
        - locale_id
    DynamicContentVariantResponse:
      type: object
      properties:
        variant:
          $ref: '#/components/schemas/DynamicContentVariantObject'
    DynamicContentVariantsResponse:
      type: object
      properties:
        variants:
          type: array
          items:
            $ref: '#/components/schemas/DynamicContentVariantObject'
    DynamicContentsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/DynamicContentObject'
    EmailCCObject:
      type: object
      allOf:
        - $ref: '#/components/schemas/FollowerObject'
        - type: object
          properties:
            action:
              type: string
              enum:
                - put
                - delete
            user_email:
              type: string
            user_id:
              type: string
            user_name:
              type: string
    EmailNotificationObject:
      type: object
      properties:
        comment_id:
          type: integer
          description: The comment ID associated to this email notification
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When this email notification was created
          readOnly: true
        email_id:
          type: string
          description: The email ID of this email notification
          readOnly: true
        message_id:
          type: string
          description: The value of the Message-Id header of the email
          readOnly: true
        notification_id:
          type: integer
          description: The notification id of this email notification
          readOnly: true
        recipients:
          type: array
          description: The list of recipients associated to this email notification
          items:
            $ref: '#/components/schemas/RecipientObject'
          readOnly: true
        ticket_id:
          type: integer
          description: The ticket ID associated to this email notification
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When this email notification was last updated
          readOnly: true
        url:
          type: string
          description: The API url of this email notification
          readOnly: true
      example:
        comment_id: 7824075373565
        created_at: "2024-02-21T23:13:07Z"
        email_id: 01HQ6Z3DE28F34XBFCYH0SRM95
        message_id: <56Z97D7G67G_65d68382aa493_4639581606f3@example.com>
        notification_id: 7824075373693
        recipients:
          - delivery_status:
              code: 530 5.7.0
              id: 24
              message: 'Email failed to deliver. Status code: 530'
              name: authentication_required
            email_address: recipient@example.com
            user_id: 7612709251581
        ticket_id: 623
        updated_at: "2024-02-21T23:13:07Z"
        url: https://example.zendesk.com/api/v2/email_notifications/7824075373693.json
    EmailNotificationResponse:
      type: object
      properties:
        email_notification:
          $ref: '#/components/schemas/EmailNotificationObject'
    EmailNotificationsResponse:
      type: object
      properties:
        email_notifications:
          type: array
          items:
            $ref: '#/components/schemas/EmailNotificationObject'
    Error:
      type: object
      properties:
        code:
          type: string
        detail:
          type: string
        id:
          type: string
        links:
          type: object
        source:
          type: object
        status:
          type: string
        title:
          type: string
      required:
        - code
        - title
    Errors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    EssentialsCardObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: Date and time the essentials card were created
          readOnly: true
        default:
          type: boolean
          description: If true, the system has used the first twenty fields for the custom object type as the essentials card.
          readOnly: true
        fields:
          type: array
          description: Fields that are displayed in the essentials card details. The order is defined by the order of the fields in the array
          items:
            type: object
            additionalProperties: true
        id:
          type: string
          description: |
            id of the essentials card
          nullable: true
          readOnly: true
        key:
          type: string
          description: |
            Object type. Example: `zen:user` refers to `User` type
          readOnly: true
        layout:
          type: string
          description: |
            layout type
          readOnly: true
        max_count:
          type: integer
          description: Maximum number of fields allowed in the essentials card
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: Date and time the essentials card were last updated
          readOnly: true
      example:
        created_at: "2012-04-02T22:55:29Z"
        default: true
        fields:
          - id: null
            zrn: zen:user:identity:email
          - id: null
            zrn: zen:user:field:standard:external_id
          - id: null
            zrn: zen:user:field:standard:iana_time_zone
          - id: null
            zrn: zen:user:field:standard:locale
          - id: null
            zrn: zen:user:field:standard:organization_id
        id: "123"
        key: zen:custom_object:boat
        layout: essentials_card
        max_count: 20
        updated_at: "2012-04-02T22:55:29Z"
      required:
        - fields
    EssentialsCardResponse:
      type: object
      properties:
        object_layout:
          $ref: '#/components/schemas/EssentialsCardObject'
    EssentialsCardsResponse:
      type: object
      properties:
        object_layouts:
          type: array
          items:
            $ref: '#/components/schemas/EssentialsCardObject'
    ExportIncrementalOrganizationsResponse:
      type: object
      properties:
        count:
          type: integer
        end_of_stream:
          type: boolean
        end_time:
          type: integer
        next_page:
          type: string
          nullable: true
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationObject'
      example:
        count: 1
        end_of_stream: true
        end_time: 1601357503
        next_page: https://example.zendesk.com/api/v2/incremental/ticket_events.json?start_time=1601357503
        organizations:
          - created_at: "2018-11-14T00:14:52Z"
            details: caterpillar =)
            domain_names:
              - remain.com
            external_id: ABC198
            group_id: 1835962
            id: 4112492
            name: Groablet Enterprises
            notes: donkey
            organization_fields:
              datepudding: "2018-11-04T00:00:00+00:00"
              org_field_1: happy happy
              org_field_2: teapot_kettle
            shared_comments: false
            shared_tickets: false
            tags:
              - smiley
              - teapot_kettle
            updated_at: "2018-11-14T00:54:22Z"
            url: https://example.zendesk.com/api/v2/organizations/4112492.json
    ExportIncrementalTicketEventsResponse:
      type: object
      properties:
        count:
          type: integer
        end_of_stream:
          type: boolean
        end_time:
          type: integer
        next_page:
          type: string
          nullable: true
        ticket_events:
          type: array
          items:
            $ref: '#/components/schemas/TicketMetricEventBaseObject'
      example:
        count: 1
        end_of_stream: true
        end_time: 1601357503
        next_page: https://example.zendesk.com/api/v2/incremental/ticket_events.json?start_time=1601357503
        ticket_events:
          - id: 926256957613
            instance_id: 1
            metric: agent_work_time
            ticket_id: 155
            time: "2020-10-26T12:53:12Z"
            type: measure
    FollowerObject:
      type: object
      properties:
        action:
          type: string
          enum:
            - put
            - delete
        user_email:
          type: string
          format: email
        user_id:
          type: string
    GroupMembershipObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the group was created
          readOnly: true
        default:
          type: boolean
          description: If true, tickets assigned directly to the agent will assume this membership's group
        group_id:
          type: integer
          description: The id of a group
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the group
          readOnly: true
        url:
          type: string
          description: The API url of this record
          readOnly: true
        user_id:
          type: integer
          description: The id of an agent
      required:
        - user_id
        - group_id
    GroupMembershipResponse:
      type: object
      properties:
        group_membership:
          $ref: '#/components/schemas/GroupMembershipObject'
    GroupMembershipsResponse:
      type: object
      properties:
        group_memberships:
          type: array
          items:
            $ref: '#/components/schemas/GroupMembershipObject'
    GroupObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the group was created
          readOnly: true
        default:
          type: boolean
          description: If the group is the default one for the account
          readOnly: true
        deleted:
          type: boolean
          description: Deleted groups get marked as such
          readOnly: true
        description:
          type: string
          description: The description of the group
        id:
          type: integer
          description: Automatically assigned when creating groups
          readOnly: true
        is_public:
          type: boolean
          description: |
            If true, the group is public.
            If false, the group is private.
            You can't change a private group to a public group
        name:
          type: string
          description: The name of the group
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the group
          readOnly: true
        url:
          type: string
          description: The API url of the group
          readOnly: true
      example:
        created_at: "2009-07-20T22:55:29Z"
        default: true
        deleted: false
        description: Some clever description here
        id: 3432
        is_public: true
        name: First Level Support
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/groups/3432.json
      required:
        - name
    GroupResponse:
      type: object
      properties:
        group:
          $ref: '#/components/schemas/GroupObject'
    GroupSLAPoliciesResponse:
      type: object
      properties:
        count:
          type: integer
          readOnly: true
        group_sla_policies:
          type: array
          items:
            $ref: '#/components/schemas/GroupSLAPolicyObject'
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
    GroupSLAPolicyFilterConditionObject:
      type: object
      properties:
        field:
          type: string
          description: The name of a ticket field
        operator:
          type: string
          description: A comparison operator
        value:
          type: array
          description: The value of a ticket field
          items:
            oneOf:
              - type: string
              - type: integer
    GroupSLAPolicyFilterDefinitionResponse:
      type: object
      properties:
        definitions:
          type: object
          properties:
            all:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                  operators:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        value:
                          type: string
                  title:
                    type: string
                  value:
                    type: string
                  values:
                    type: object
                    properties:
                      list:
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                            value:
                              type: integer
                              nullable: true
                      type:
                        type: string
    GroupSLAPolicyFilterObject:
      type: object
      description: An object that describes the conditions a ticket must match for a Group SLA policy to be applied to the ticket. See [Filter](#filter).
      properties:
        all:
          type: array
          items:
            $ref: '#/components/schemas/GroupSLAPolicyFilterConditionObject'
    GroupSLAPolicyMetricObject:
      type: object
      properties:
        business_hours:
          type: boolean
          description: Whether the metric targets are being measured in business hours or calendar hours
        metric:
          type: string
          description: The definition of the time that is being measured
        priority:
          type: string
          description: Priority that a ticket must match
        target:
          type: integer
          description: The time within which the end-state for a metric should be met
    GroupSLAPolicyObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the Group SLA policy was created
          readOnly: true
        description:
          type: string
          description: The description of the Group SLA policy
        filter:
          $ref: '#/components/schemas/GroupSLAPolicyFilterObject'
        id:
          type: string
          description: Automatically assigned when created
          readOnly: true
        policy_metrics:
          type: array
          description: Array of [policy metric](#policy-metric) objects
          items:
            $ref: '#/components/schemas/GroupSLAPolicyMetricObject'
        position:
          type: integer
          description: Position of the Group SLA policy. This position determines the order in which policies are matched to tickets. If not specified, the Group SLA policy is added at the last position
        title:
          type: string
          description: The title of the Group SLA policy
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the Group SLA policy
          readOnly: true
        url:
          type: string
          description: URL of the Group SLA policy record
          readOnly: true
      example:
        created_at: "2023-03-17T22:50:26Z"
        description: 'Group: Tier 1'
        filter:
          all: []
        id: 01H078CBDY28BZG7P6BONY09DN
        policy_metrics:
          - business_hours: false
            metric: group_ownership_time
            priority: low
            target: 3600
        position: 3
        title: Tier 1
        updated_at: "2023-03-17T22:50:26Z"
        url: https://company.zendesk.com/api/v2/group_slas/policies/01H078CBDY28BZG7P6BONY09DN.json
      required:
        - title
        - filter
    GroupSLAPolicyResponse:
      type: object
      properties:
        group_sla_policy:
          $ref: '#/components/schemas/GroupSLAPolicyObject'
    GroupsCountObject:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
              description: Timestamp that indicates when the count was last updated
              readOnly: true
            value:
              type: integer
              description: Approximate count of groups
              readOnly: true
    GroupsResponse:
      type: object
      properties:
        groups:
          type: array
          items:
            $ref: '#/components/schemas/GroupObject'
    HostMappingObject:
      title: Host Mapping
      type: object
      properties:
        cname:
          type: string
          description: The canonical name record for a host mapping
        expected_cnames:
          type: array
          description: Array of expected CNAME records for host mapping(s) of a given brand
          items:
            type: string
        is_valid:
          type: boolean
          description: Whether a host mapping is valid or not for a given brand
        reason:
          type: string
          description: Reason why a host mapping is valid or not
      example:
        cname: google.com
        expected_cnames:
          - bar.zendesk.coom
        is_valid: false
        reason: wrong_cname
    IncrementalSkillBasedRouting:
      title: Incremental Skill-based Routing
      type: object
      properties:
        attribute_values:
          type: array
          description: Routing attribute values
          items:
            $ref: '#/components/schemas/IncrementalSkillBasedRoutingAttributeValue'
        attributes:
          type: array
          description: Routing attributes
          items:
            $ref: '#/components/schemas/IncrementalSkillBasedRoutingAttribute'
        count:
          type: integer
          description: The number of results returned for the current request
          readOnly: true
        end_time:
          type: integer
          description: The most recent resource creation time present in this result set in Unix epoch time
          readOnly: true
        instance_values:
          type: array
          description: Routing instance values
          items:
            $ref: '#/components/schemas/IncrementalSkillBasedRoutingInstanceValue'
        next_page:
          type: string
          description: The URL that should be called to get the next set of results
          readOnly: true
    IncrementalSkillBasedRoutingAttribute:
      type: object
      properties:
        id:
          type: string
          description: Automatically assigned when an attribute is created
          readOnly: true
        name:
          type: string
          description: The name of the attribute
          readOnly: true
        time:
          type: string
          format: date-time
          description: The time the attribute was created, updated, or deleted
          readOnly: true
        type:
          type: string
          description: One of "create", "update", or "delete"
          readOnly: true
    IncrementalSkillBasedRoutingAttributeValue:
      type: object
      properties:
        attribute_id:
          type: string
          description: Id of the associated attribute
          readOnly: true
        id:
          type: string
          description: Automatically assigned when an attribute value is created
          readOnly: true
        name:
          type: string
          description: The name of the attribute value
          readOnly: true
        time:
          type: string
          format: date-time
          description: The time the attribute value was created, updated, or deleted
          readOnly: true
        type:
          type: string
          description: One of "create", "update", or "delete"
          readOnly: true
    IncrementalSkillBasedRoutingInstanceValue:
      type: object
      properties:
        attribute_value_id:
          type: string
          description: Id of the associated attribute value
          readOnly: true
        id:
          type: string
          description: Automatically assigned when an instance value is created
          readOnly: true
        instance_id:
          type: string
          description: Id of the associated agent or ticket
          readOnly: true
        time:
          type: string
          format: date-time
          description: The time the instance value was created or deleted
          readOnly: true
        type:
          type: string
          description: One of "associate_agent", "unassociate_agent", "associate_ticket", or "unassociate_ticket"
          readOnly: true
    JobStatusObject:
      type: object
      properties:
        id:
          type: string
          description: Automatically assigned when the job is queued
          readOnly: true
        job_type:
          type: string
          description: The type of the job
          readOnly: true
        message:
          type: string
          description: Message from the job worker, if any
          nullable: true
          readOnly: true
        progress:
          type: integer
          description: Number of tasks that have already been completed
          nullable: true
          readOnly: true
        results:
          description: Result data from processed tasks. See [Results](#results) below
          oneOf:
            - type: array
              items:
                $ref: '#/components/schemas/JobStatusResultObject'
              nullable: true
            - type: object
              properties:
                success:
                  type: boolean
                  description: Whether the action was successful or not
                  readOnly: true
              required:
                - success
          readOnly: true
        status:
          type: string
          description: 'The current status. One of the following: "queued", "working", "failed", "completed"'
          readOnly: true
        total:
          type: integer
          description: The total number of tasks this job is batching through
          nullable: true
          readOnly: true
        url:
          type: string
          description: The URL to poll for status updates
          readOnly: true
      example:
        id: 82de0b044094f0c67893ac9fe64f1a99
        message: Completed at 2018-03-08 10:07:04 +0000
        progress: 2
        results:
          - action: update
            id: 244
            status: Updated
            success: true
          - action: update
            id: 245
            status: Updated
            success: true
        status: completed
        total: 2
        url: https://example.zendesk.com/api/v2/job_statuses/82de0b0467893ac9fe64f1a99.json
    JobStatusResponse:
      type: object
      properties:
        job_status:
          $ref: '#/components/schemas/JobStatusObject'
    JobStatusResultObject:
      oneOf:
        - $ref: '#/components/schemas/CreateResourceResult'
        - $ref: '#/components/schemas/UpdateResourceResult'
      additionalProperties: true
    JobStatusesResponse:
      type: object
      properties:
        job_statuses:
          type: array
          items:
            $ref: '#/components/schemas/JobStatusObject'
      required:
        - job_statuses
    ListDeletedTicketsResponse:
      type: object
      allOf:
        - type: object
          properties:
            deleted_tickets:
              type: array
              items:
                type: object
                properties:
                  actor:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                  deleted_at:
                    type: string
                  id:
                    type: integer
                  previous_state:
                    type: string
                  subject:
                    type: string
        - $ref: '#/components/schemas/OffsetPaginationObject'
    ListTicketCollaboratorsResponse:
      type: object
      additionalProperties: true
    ListTicketEmailCCsResponse:
      type: object
      additionalProperties: true
    ListTicketFollowersResponse:
      type: object
      additionalProperties: true
    ListTicketIncidentsResponse:
      type: object
      additionalProperties: true
    ListTicketProblemsResponse:
      type: object
      additionalProperties: true
    LocaleObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The ISO 8601 formatted date-time the locale was created
          readOnly: true
        id:
          type: integer
          description: The unique ID of the locale
          readOnly: true
        locale:
          type: string
          description: The name of the locale
          readOnly: true
        name:
          type: string
          description: The name of the language
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The ISO 8601 formatted date-time when the locale was last updated
          readOnly: true
        url:
          type: string
          description: The URL of the locale record
          readOnly: true
      example:
        created_at: "2009-07-20T22:55:29Z"
        id: 1
        locale: en-US
        name: English
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/locales/en-US.json
    LocaleResponse:
      type: object
      properties:
        locale:
          $ref: '#/components/schemas/LocaleObject'
    LocalesResponse:
      type: object
      properties:
        locales:
          type: array
          items:
            $ref: '#/components/schemas/LocaleObject'
    MacroApplyTicketResponse:
      type: object
      properties:
        result:
          type: object
          properties:
            ticket:
              type: object
              properties:
                assignee_id:
                  type: integer
                comment:
                  type: object
                  properties:
                    body:
                      type: string
                    public:
                      type: boolean
                    scoped_body:
                      type: array
                      items:
                        type: array
                        items:
                          type: string
                fields:
                  type: object
                  properties:
                    id:
                      type: integer
                    value:
                      type: string
                group_id:
                  type: integer
                id:
                  type: integer
                url:
                  type: string
    MacroAttachmentObject:
      type: object
      properties:
        content_type:
          type: string
          description: 'The content type of the image. Example value: "image/png"'
          readOnly: true
        content_url:
          type: string
          description: A full URL where the attachment image file can be downloaded
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: The time when this attachment was created
        filename:
          type: string
          description: The name of the image file
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        size:
          type: integer
          description: The size of the image file in bytes
          readOnly: true
    MacroAttachmentResponse:
      type: object
      properties:
        macro_attachment:
          $ref: '#/components/schemas/MacroAttachmentObject'
    MacroAttachmentsResponse:
      type: object
      properties:
        macro_attachments:
          type: array
          items:
            $ref: '#/components/schemas/MacroAttachmentObject'
    MacroCategoriesResponse:
      type: object
      properties:
        categories:
          type: array
          items:
            type: string
    MacroCommonObject:
      type: object
      properties:
        actions:
          type: array
          description: Each action describes what the macro will do. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
          items:
            $ref: '#/components/schemas/ActionObject'
        active:
          type: boolean
          description: Useful for determining if the macro should be displayed
        created_at:
          type: string
          format: date-time
          description: The time the macro was created
        default:
          type: boolean
          description: If true, the macro is a default macro
          readOnly: true
        description:
          type: string
          description: The description of the macro
          nullable: true
        id:
          type: integer
          description: The ID automatically assigned when a macro is created
        position:
          type: integer
          description: The position of the macro
        restriction:
          type: object
          description: Access to this macro. A null value allows unrestricted access for all users in the account
          additionalProperties: true
          nullable: true
        title:
          type: string
          description: The title of the macro
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the macro
        url:
          type: string
          description: A URL to access the macro's details
      example:
        actions:
          - field: status
            value: solved
          - field: priority
            value: normal
          - field: type
            value: incident
          - field: assignee_id
            value: current_user
          - field: group_id
            value: current_groups
          - field: comment_value
            value: 'Thanks for your request. This issue you reported is a known issue. For more information, please visit our forums. '
        active: true
        created_at: "2019-09-16T02:17:38Z"
        default: false
        description: null
        id: 360111062754
        position: 9999
        restriction: null
        title: Close and redirect to topics
        updated_at: "2019-09-16T02:17:38Z"
        url: https://subdomain.zendesk.com/api/v2/macros/360111062754.json
      required:
        - actions
        - title
    MacroInput:
      type: object
      properties:
        actions:
          type: array
          description: Each action describes what the macro will do
          items:
            $ref: '#/components/schemas/ActionObject'
        active:
          type: boolean
          description: Useful for determining if the macro should be displayed
        description:
          type: string
          description: The description of the macro
          nullable: true
        restriction:
          type: object
          description: Who may access this macro. Will be null when everyone in the account can access it
          properties:
            id:
              type: integer
              description: The numeric ID of the group or user
            ids:
              type: array
              description: The numeric IDs of the groups
              items:
                type: integer
            type:
              type: string
              description: Allowed values are Group or User
          additionalProperties: true
        title:
          type: string
          description: The title of the macro
      required:
        - title
        - actions
    MacroObject:
      type: object
      allOf:
        - $ref: '#/components/schemas/MacroCommonObject'
        - type: object
          properties:
            app_installation:
              type: string
              description: The app installation that requires each macro, if present
              nullable: true
            categories:
              type: string
              description: The macro categories
              nullable: true
            permissions:
              type: string
              description: Permissions for each macro
              nullable: true
            usage_1h:
              type: integer
              description: The number of times each macro has been used in the past hour
            usage_7d:
              type: integer
              description: The number of times each macro has been used in the past week
            usage_24h:
              type: integer
              description: The number of times each macro has been used in the past day
            usage_30d:
              type: integer
              description: The number of times each macro has been used in the past thirty days
      example:
        actions: []
        active: true
        description: Sets the ticket status to `solved`
        id: 25
        position: 42
        restriction:
          id: 4
          type: User
        title: Close and Save
    MacroResponse:
      type: object
      properties:
        macro:
          $ref: '#/components/schemas/MacroObject'
    MacroUpdateManyInput:
      type: object
      properties:
        macros:
          type: array
          items:
            type: object
            properties:
              active:
                type: boolean
                description: The active status of the macro (true or false)
              id:
                type: integer
                description: The ID of the macro to update
              position:
                type: integer
                description: The new position of the macro
            required:
              - id
    MacrosResponse:
      type: object
      allOf:
        - type: object
          properties:
            macros:
              type: array
              items:
                $ref: '#/components/schemas/MacroObject'
        - $ref: '#/components/schemas/OffsetPaginationObject'
    ObjectTriggerActionDefinitionObject:
      type: object
      properties:
        group:
          type: string
        nullable:
          type: boolean
        repeatable:
          type: boolean
        subject:
          type: string
        title:
          type: string
        type:
          type: string
        values:
          type: array
          items:
            type: object
            properties:
              enabled:
                type: boolean
              format:
                type: string
              title:
                type: string
              value:
                type: string
    ObjectTriggerBulkUpdateItem:
      type: object
      properties:
        active:
          type: boolean
          description: Whether an object trigger is active
        id:
          type: integer
          description: The id of the object trigger to update
        position:
          type: integer
          description: The new position of the object trigger
      example:
        active: true
        id: 25
        position: 8
      required:
        - id
    ObjectTriggerBulkUpdateRequest:
      type: object
      properties:
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/ObjectTriggerBulkUpdateItem'
    ObjectTriggerConditionDefinitionObjectAll:
      type: object
      properties:
        group:
          type: string
        nullable:
          type: boolean
        operators:
          type: array
          items:
            type: object
            properties:
              format:
                type: string
              terminal:
                type: boolean
              title:
                type: string
              value:
                type: string
        repeatable:
          type: boolean
        subject:
          type: string
        title:
          type: string
        type:
          type: string
        values:
          type: array
          items:
            type: object
            properties:
              enabled:
                type: boolean
              title:
                type: string
              value:
                type: string
    ObjectTriggerConditionDefinitionObjectAny:
      type: object
      properties:
        group:
          type: string
        nullable:
          type: boolean
        operators:
          type: array
          items:
            type: object
            properties:
              format:
                type: string
              terminal:
                type: boolean
              title:
                type: string
              value:
                type: string
        repeatable:
          type: boolean
        subject:
          type: string
        title:
          type: string
        type:
          type: string
        values:
          type: array
          items:
            type: object
            properties:
              enabled:
                type: boolean
              title:
                type: string
              value:
                type: string
    ObjectTriggerDefinitionObject:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/ObjectTriggerActionDefinitionObject'
        conditions_all:
          type: array
          items:
            $ref: '#/components/schemas/ObjectTriggerConditionDefinitionObjectAll'
        conditions_any:
          type: array
          items:
            $ref: '#/components/schemas/ObjectTriggerConditionDefinitionObjectAny'
    ObjectTriggerDefinitionResponse:
      type: object
      properties:
        definitions:
          $ref: '#/components/schemas/ObjectTriggerDefinitionObject'
    ObjectTriggerObject:
      type: object
      properties:
        actions:
          type: array
          description: An array of actions the trigger does when its conditions are met. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
          items:
            $ref: '#/components/schemas/TriggerActionObject'
        active:
          type: boolean
          description: Whether the trigger is active
        conditions:
          $ref: '#/components/schemas/TriggerConditionsObject'
        created_at:
          type: string
          description: The time the trigger was created
          readOnly: true
        default:
          type: boolean
          description: Always false for object triggers
          readOnly: true
        description:
          type: string
          description: The description of the trigger
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        position:
          type: integer
          description: Position of the trigger, determines the order they will execute in
        raw_title:
          type: string
          description: The raw format of the title of the trigger
        title:
          type: string
          description: The title of the trigger
        updated_at:
          type: string
          description: The time of the last update of the trigger
          readOnly: true
        url:
          type: string
          description: The url of the trigger
          readOnly: true
      example:
        actions:
          - {}
        active: true
        conditions: {}
        created_at: "2024-07-08T20:44:32Z"
        default: false
        description: Sets mile count when heat not present on order custom object
        id: 25
        position: 8
        raw_title: CO trigger with tagger field condition
        title: CO trigger with tagger field condition
        updated_at: "2024-07-08T20:44:32Z"
        url: http://{subdomain}.zendesk.com/api/v2/custom_objects/order/triggers/25.json
      required:
        - conditions
        - actions
        - title
    ObjectTriggerRequest:
      type: object
      properties:
        trigger:
          allOf:
            - $ref: '#/components/schemas/ObjectTriggerObject'
    ObjectTriggerResponse:
      type: object
      properties:
        trigger:
          $ref: '#/components/schemas/ObjectTriggerObject'
    ObjectTriggersResponse:
      type: object
      properties:
        count:
          type: integer
        next_page:
          type: string
          nullable: true
        previous_page:
          type: string
          nullable: true
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/ObjectTriggerObject'
    OffsetPaginationObject:
      type: object
      properties:
        count:
          type: integer
          description: the total record count
        next_page:
          type: string
          format: url
          description: the URL of the next page
          nullable: true
        previous_page:
          type: string
          format: url
          description: the URL of the previous page
          nullable: true
    OrganizationFieldObject:
      type: object
      allOf:
        - $ref: '#/components/schemas/CustomFieldObject'
      example:
        active: true
        created_at: "2012-10-16T16:04:06Z"
        description: Description of Custom Field
        id: 7
        key: custom_field_1
        position: 9999
        raw_description: '{{dc.my_description}}'
        raw_title: Custom Field 1
        regexp_for_validation: null
        title: Custom Field 1
        type: text
        updated_at: "2012-10-16T16:04:06Z"
        url: https://company.zendesk.com/api/v2/organization_fields/7.json
    OrganizationFieldResponse:
      type: object
      properties:
        organization_field:
          $ref: '#/components/schemas/OrganizationFieldObject'
    OrganizationFieldsResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total count of records retrieved
          readOnly: true
        next_page:
          type: string
          description: URL of the next page
          nullable: true
          readOnly: true
        organization_fields:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationFieldObject'
        previous_page:
          type: string
          description: URL of the previous page
          nullable: true
          readOnly: true
    OrganizationMembershipObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: When this record was created
          readOnly: true
        default:
          type: boolean
          description: Denotes whether this is the default organization membership for the user. If false, returns `null`
          nullable: true
        id:
          type: integer
          description: Automatically assigned when the membership is created
          readOnly: true
        organization_id:
          type: integer
          description: The ID of the organization associated with this user, in this membership
          readOnly: true
        organization_name:
          type: string
          description: The name of the organization associated with this user, in this membership
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When this record last got updated
          readOnly: true
        url:
          type: string
          description: The API url of this membership
          readOnly: true
        user_id:
          type: integer
          description: The ID of the user for whom this memberships belongs
          readOnly: true
        view_tickets:
          type: boolean
          description: Denotes whether the user can or cannot have access to all organization's tickets.
          readOnly: true
      example:
        created_at: "2009-05-13T00:07:08Z"
        default: true
        id: 4
        organization_id: 12
        organization_name: first organization
        updated_at: "2011-07-22T00:11:12Z"
        url: https://example.zendesk.com/api/v2/organization_memberships/4.json
        user_id: 29
        view_tickets: true
      required:
        - user_id
        - organization_id
        - default
    OrganizationMembershipResponse:
      type: object
      properties:
        organization_membership:
          $ref: '#/components/schemas/OrganizationMembershipObject'
    OrganizationMembershipsResponse:
      type: object
      properties:
        organization_memberships:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationMembershipObject'
    OrganizationMergeListResponse:
      type: object
      properties:
        organization_merges:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: string
              loser_id:
                type: integer
              status:
                type: string
                enum:
                  - new
                  - in_progress
                  - error
                  - complete
              url:
                type: string
                format: string
              winner_id:
                type: integer
          required:
            - id
            - url
            - loser_id
            - winner_id
            - status
    OrganizationMergeRequest:
      type: object
      properties:
        organization_merge:
          type: object
          properties:
            winner_id:
              type: integer
              description: The id of the winning organization.
              required:
                - winner_id
    OrganizationMergeResponse:
      type: object
      properties:
        organization_merge:
          type: object
          properties:
            id:
              type: string
              format: string
            loser_id:
              type: integer
            status:
              type: string
              enum:
                - new
                - in_progress
                - error
                - complete
            url:
              type: string
              format: string
            winner_id:
              type: integer
          required:
            - id
            - url
            - loser_id
            - winner_id
            - status
    OrganizationMetadataObject:
      type: object
      properties:
        tickets_count:
          type: integer
          description: The number of tickets for the organization
        users_count:
          type: integer
          description: The number of users for the organization
    OrganizationObject:
      type: object
      properties:
        created_at:
          type: string
          description: The time the organization was created
          readOnly: true
        details:
          type: string
          description: Any details obout the organization, such as the address
          nullable: true
        domain_names:
          type: array
          description: An array of domain names associated with this organization
          items:
            type: string
        external_id:
          type: string
          description: A unique external id to associate organizations to an external record. The id is case-insensitive. For example, "company1" and "Company1" are considered the same
          nullable: true
        group_id:
          type: integer
          description: New tickets from users in this organization are automatically put in this group
          nullable: true
        id:
          type: integer
          description: Automatically assigned when the organization is created
        name:
          type: string
          description: A unique name for the organization
        notes:
          type: string
          description: Any notes you have about the organization
          nullable: true
        organization_fields:
          type: object
          description: Custom fields for this organization. See [Custom organization fields](/api-reference/ticketing/organizations/organizations/#custom-organization-fields)
          additionalProperties:
            oneOf:
              - type: string
              - type: number
          nullable: true
        shared_comments:
          type: boolean
          description: End users in this organization are able to comment on each other's tickets
        shared_tickets:
          type: boolean
          description: End users in this organization are able to see each other's tickets
        tags:
          type: array
          description: The tags of the organization
          items:
            type: string
        updated_at:
          type: string
          description: The time of the last update of the organization
          readOnly: true
        url:
          type: string
          description: The API url of this organization
          readOnly: true
      example:
        created_at: "2009-07-20T22:55:29Z"
        details: This is a kind of organization
        domain_names:
          - example.com
          - test.com
        external_id: ABC123
        group_id: null
        id: 35436
        name: One Organization
        notes: ""
        organization_fields:
          org_decimal: 5.2
          org_dropdown: option_1
        shared_comments: true
        shared_tickets: true
        tags:
          - enterprise
          - other_tag
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/organizations/35436.json
      required:
        - name
    OrganizationResponse:
      type: object
      properties:
        organization:
          $ref: '#/components/schemas/OrganizationObject'
    OrganizationSubscriptionCreateRequest:
      type: object
      properties:
        organization_subscription:
          $ref: '#/components/schemas/OrganizationSubscriptionInput'
    OrganizationSubscriptionInput:
      type: object
      properties:
        organization_id:
          type: integer
          description: The ID of the organization
        user_id:
          type: integer
          description: The ID of the user
    OrganizationSubscriptionObject:
      title: Organization Subscriptions
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The date the organization subscription was created
        id:
          type: integer
          description: The ID of the organization subscription
        organization_id:
          type: integer
          description: The ID of the organization
        user_id:
          type: integer
          description: The ID of the user
      example:
        created_at: "2009-07-20T22:55:29Z"
        id: 1234
        organization_id: 32
        user_id: 482
    OrganizationSubscriptionResponse:
      type: object
      properties:
        organization_subscription:
          $ref: '#/components/schemas/OrganizationSubscriptionObject'
    OrganizationSubscriptionsResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/OffsetPaginationObject'
        - type: object
          properties:
            organization_subscriptions:
              type: array
              description: An array of organization subscriptions
              items:
                $ref: '#/components/schemas/OrganizationSubscriptionObject'
    OrganizationsRelatedResponse:
      type: object
      properties:
        organization_related:
          $ref: '#/components/schemas/OrganizationMetadataObject'
    OrganizationsResponse:
      type: object
      properties:
        count:
          type: integer
        next_page:
          type: string
          nullable: true
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationObject'
        previous_page:
          type: string
          nullable: true
    Pagination:
      type: object
      properties:
        links:
          type: object
          properties:
            next:
              type: string
            prev:
              type: string
        meta:
          type: object
          properties:
            after_cursor:
              type: string
            before_cursor:
              type: string
            has_more:
              type: boolean
    PushNotificationDevicesInput:
      type: array
      items:
        type: string
        description: Mobile device token
    PushNotificationDevicesRequest:
      type: object
      properties:
        push_notification_devices:
          $ref: '#/components/schemas/PushNotificationDevicesInput'
    QueueObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the queue was created
          readOnly: true
        definition:
          type: object
          description: Conditions when queue could be applied
          properties:
            all:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  operator:
                    type: string
                  value:
                    type: string
            any:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  operator:
                    type: string
                  value:
                    type: string
        description:
          type: string
          description: The description of the queue
        id:
          type: string
          description: Automatically assigned when creating queue
          readOnly: true
        name:
          type: string
          description: The name of the queue
        order:
          type: integer
          description: The queue-applied order
        primary_groups:
          type: object
          description: Primary group ids linked to the queue
          properties:
            count:
              type: integer
            groups:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
        priority:
          type: integer
          description: The queue-applied priority
        secondary_groups:
          type: object
          description: Secondary group ids linked to the queue
          properties:
            count:
              type: integer
            groups:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
        updated_at:
          type: string
          format: date-time
          description: The time of the queue's last update
          readOnly: true
        url:
          type: string
          description: The API URL of the queue
          readOnly: true
      example:
        created_at: "2023-11-27T09:03:59Z"
        definition:
          all:
            - field: priority
              operator: is
              value: urgent
          any: []
        description: Queue description
        id: 01HG80ATNNZK1N7XRFVKX48XD6
        name: New queue with valid definition
        order: 1
        primary_groups:
          count: 2
          groups:
            - id: 6784729637757
              name: EWR
            - id: 5399674286077
              name: test
        priority: 1
        secondary_groups:
          count: 0
          groups: []
        updated_at: "2023-11-27T09:03:59Z"
        url: https://company.zendesk.com/api/v2/queues/01HG80ATNNZK1N7XRFVKX48XD6.json
    QueueResponse:
      type: object
      properties:
        queue:
          $ref: '#/components/schemas/QueueObject'
    QueuesResponse:
      type: object
      properties:
        queues:
          type: array
          items:
            $ref: '#/components/schemas/QueueObject'
    RecipientObject:
      type: object
      properties:
        delivery_status:
          type: object
          description: Details about the delivery status
          properties:
            code:
              type: string
              description: The delivery status code (SMTP code and DSN code)
              readOnly: true
            id:
              type: integer
              description: The delivery status id
              readOnly: true
            message:
              type: string
              description: The delivery status description
              readOnly: true
            name:
              type: string
              description: The delivery status type (key)
              readOnly: true
        email_address:
          type: string
          description: The recipient's email address
          readOnly: true
        user_id:
          type: integer
          description: The recipient's user id
          readOnly: true
    RecoverSuspendedTicketResponse:
      type: object
      properties:
        ticket:
          type: array
          items:
            $ref: '#/components/schemas/TicketObject'
    RecoverSuspendedTicketUnprocessableContentResponse:
      type: object
      properties:
        ticket:
          type: array
          items:
            $ref: '#/components/schemas/SuspendedTicketObject'
    RecoverSuspendedTicketsResponse:
      type: object
      properties:
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketObject'
    RelationshipFilterDefinition:
      type: object
      properties:
        conditions_all:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionDefinitionObjectAll'
        conditions_any:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionDefinitionObjectAny'
    RelationshipFilterDefinitionResponse:
      type: object
      properties:
        definitions:
          $ref: '#/components/schemas/RelationshipFilterDefinition'
    RenewSessionResponse:
      type: object
      properties:
        authenticity_token:
          type: string
          description: A token of authenticity for the request
    RequestObject:
      type: object
      properties:
        assignee_id:
          type: integer
          description: The id of the assignee if the field is visible to end users
          readOnly: true
        can_be_solved_by_me:
          type: boolean
          description: If true, an end user can mark the request as solved. See [Update Request](/api-reference/ticketing/tickets/ticket-requests/#update-request)
          readOnly: true
        collaborator_ids:
          type: array
          description: The ids of users currently CC'ed on the ticket
          items:
            type: integer
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When this record was created
          readOnly: true
        custom_fields:
          type: array
          description: Custom fields for the request. See [Setting custom field values](/api-reference/ticketing/tickets/tickets/#setting-custom-field-values) in the Tickets doc
          items:
            type: object
            properties:
              id:
                type: integer
              value:
                type: string
        custom_status_id:
          type: integer
          description: The custom ticket status id of the ticket
        description:
          type: string
          description: Read-only first comment on the request. When [creating a request](#create-request), use `comment` to set the description
          readOnly: true
        due_at:
          type: string
          format: date-time
          description: When the task is due (only applies if the request is of type "task")
        email_cc_ids:
          type: array
          description: The ids of users who are currently email CCs on the ticket. See [CCs and followers resources](https://support.zendesk.com/hc/en-us/articles/360020585233) in the Support Help Center
          items:
            type: integer
          readOnly: true
        followup_source_id:
          type: integer
          description: The id of the original ticket if this request is a follow-up ticket. See [Create Request](#create-request)
          readOnly: true
        group_id:
          type: integer
          description: The id of the assigned group if the field is visible to end users
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when creating requests
          readOnly: true
        is_public:
          type: boolean
          description: Is true if any comments are public, false otherwise
          readOnly: true
        organization_id:
          type: integer
          description: The organization of the requester
          readOnly: true
        priority:
          type: string
          description: The priority of the request, "low", "normal", "high", "urgent"
        recipient:
          type: string
          description: The original recipient e-mail address of the request
        requester_id:
          type: integer
          description: The id of the requester
          readOnly: true
        solved:
          type: boolean
          description: Whether or not request is solved (an end user can set this if "can_be_solved_by_me", above, is true for that user)
        status:
          type: string
          description: The state of the request, "new", "open", "pending", "hold", "solved", "closed"
        subject:
          type: string
          description: The value of the subject field for this request if the subject field is visible to end users; a truncated version of the description otherwise
        ticket_form_id:
          type: integer
          description: The numeric id of the ticket form associated with this request if the form is visible to end users - only applicable for enterprise accounts
        type:
          type: string
          description: The type of the request, "question", "incident", "problem", "task"
        updated_at:
          type: string
          format: date-time
          description: When this record last got updated
          readOnly: true
        url:
          type: string
          description: The API url of this request
          readOnly: true
        via:
          $ref: '#/components/schemas/TicketAuditViaObject'
      example:
        assignee_id: 72983
        can_be_solved_by_me: false
        collaborator_ids: []
        created_at: "2009-07-20T22:55:29Z"
        description: The fire is very colorful.
        due_at: "2011-05-24T12:00:00Z"
        group_id: 8665
        id: 35436
        organization_id: 509974
        priority: normal
        requester_id: 1462
        status: open
        subject: Help, my printer is on fire!
        ticket_form_id: 2
        type: problem
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/requests/35436.json
        via:
          channel: web
      required:
        - subject
    RequestResponse:
      type: object
      properties:
        request:
          $ref: '#/components/schemas/RequestObject'
    RequestsResponse:
      type: object
      properties:
        requests:
          type: array
          items:
            $ref: '#/components/schemas/RequestObject'
    ResourceCollectionObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: When the resource collection was created
          readOnly: true
        id:
          type: integer
          description: id for the resource collection. Automatically assigned upon creation
          readOnly: true
        resources:
          type: array
          description: Array of resource metadata objects. See [Resource objects](#resource-objects)
          items:
            type: object
            properties:
              deleted:
                type: boolean
              identifier:
                type: string
              resource_id:
                type: integer
              type:
                type: string
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: Last time the resource collection was updated
          readOnly: true
      example:
        created_at: "2011-07-20T22:55:29Z"
        id: 35436
        resources:
          - deleted: false
            identifier: email_on_ticket_solved
            resource_id: 10824486485524
            type: triggers
          - deleted: false
            identifier: support_description
            resource_id: 10824486482580
            type: ticket_fields
        updated_at: "2011-07-20T22:55:29Z"
    ResourceCollectionResponse:
      type: object
      properties:
        resource_collection:
          $ref: '#/components/schemas/ResourceCollectionObject'
    ResourceCollectionsResponse:
      type: object
      properties:
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
        resource_collections:
          type: array
          items:
            $ref: '#/components/schemas/ResourceCollectionObject'
    ReverseLookupResponse:
      type: object
      anyOf:
        - $ref: '#/components/schemas/UsersResponse'
    SLAPoliciesResponse:
      type: object
      properties:
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
        sla_policies:
          type: array
          items:
            $ref: '#/components/schemas/SLAPolicyObject'
    SLAPolicyFilterConditionObject:
      type: object
      properties:
        field:
          type: string
          description: The name of a ticket field
        operator:
          type: string
          description: A comparison operator
        value:
          description: The value of a ticket field
          oneOf:
            - type: string
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: integer
    SLAPolicyFilterDefinitionResponse:
      type: object
      properties:
        definitions:
          type: object
          properties:
            all:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                  operators:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        value:
                          type: string
                  target:
                    type: string
                    nullable: true
                  title:
                    type: string
                  value:
                    type: string
                  values:
                    type: object
                    properties:
                      list:
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                            value:
                              type: string
                              nullable: true
                      type:
                        type: string
            any:
              type: array
              items:
                type: object
                properties:
                  group:
                    type: string
                  operators:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                        value:
                          type: string
                  target:
                    type: string
                    nullable: true
                  title:
                    type: string
                  value:
                    type: string
                  values:
                    type: object
                    properties:
                      list:
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                            value:
                              type: string
                              nullable: true
                      type:
                        type: string
    SLAPolicyFilterObject:
      type: object
      description: An object that describes the conditions that a ticket must match in order for an SLA policy to be applied to that ticket. See [Filter](#filter).
      properties:
        all:
          type: array
          items:
            $ref: '#/components/schemas/SLAPolicyFilterConditionObject'
        any:
          type: array
          items:
            $ref: '#/components/schemas/SLAPolicyFilterConditionObject'
    SLAPolicyMetricObject:
      type: object
      properties:
        business_hours:
          type: boolean
          description: Whether the metric targets are being measured in business hours or calendar hours
        metric:
          type: string
          description: The definition of the time that is being measured
        priority:
          type: string
          description: Priority that a ticket must match
        target:
          type: integer
          description: The time within which the end-state for a metric should be met
    SLAPolicyObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the SLA policy was created
          readOnly: true
        description:
          type: string
          description: The description of the SLA policy
        filter:
          $ref: '#/components/schemas/SLAPolicyFilterObject'
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        policy_metrics:
          type: array
          description: Array of [Policy Metric](#policy-metric) objects
          items:
            $ref: '#/components/schemas/SLAPolicyMetricObject'
        position:
          type: integer
          description: Position of the SLA policy that determines the order they will be matched. If not specified, the SLA policy is added as the last position
        title:
          type: string
          description: The title of the SLA policy
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the SLA policy
          readOnly: true
        url:
          type: string
          description: URL of the SLA Policy reacord
          readOnly: true
      example:
        created_at: "2015-03-17T22:50:26Z"
        description: 'Organizations: Silver Plan'
        filter:
          all:
            - field: type
              operator: is
              value: incident
            - field: via_id
              operator: is
              value: "4"
            - field: custom_status_id
              operator: includes
              value:
                - "1"
                - "2"
          any: []
        id: 25
        policy_metrics:
          - business_hours: false
            metric: first_reply_time
            priority: low
            target: 60
        position: 3
        title: Silver Plan
        updated_at: "2015-03-17T22:50:26Z"
        url: https://company.zendesk.com/api/v2/slas/policies/25.json
      required:
        - title
        - filter
    SLAPolicyResponse:
      type: object
      properties:
        sla_policy:
          $ref: '#/components/schemas/SLAPolicyObject'
    SatisfactionRatingObject:
      type: object
      properties:
        assignee_id:
          type: integer
          description: The id of agent assigned to at the time of rating
          readOnly: true
        comment:
          type: string
          description: The comment received with this rating, if available
        created_at:
          type: string
          format: date-time
          description: The time the satisfaction rating got created
          readOnly: true
        group_id:
          type: integer
          description: The id of group assigned to at the time of rating
          readOnly: true
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        reason:
          type: string
          description: The reason for a bad rating given by the requester in a follow-up question. Satisfaction reasons must be [enabled](https://support.zendesk.com/hc/en-us/articles/223152967)
        reason_code:
          type: integer
          description: The default reasons the user can select from a list menu for giving a negative rating. See [Reason codes](/api-reference/ticketing/ticket-management/satisfaction_reasons/#reason-codes) in the Satisfaction Reasons API. Can only be set on ratings with a `score` of "bad". Responses don't include this property
        reason_id:
          type: integer
          description: id for the reason the user gave a negative rating. Can only be set on ratings with a `score` of "bad". To get a descriptive value for the id, use the [Show Reason for Satisfaction Rating](/api-reference/ticketing/ticket-management/satisfaction_reasons/#show-reason-for-satisfaction-rating) endpoint
        requester_id:
          type: integer
          description: The id of ticket requester submitting the rating
          readOnly: true
        score:
          type: string
          description: The rating "offered", "unoffered", "good" or "bad"
        ticket_id:
          type: integer
          description: The id of ticket being rated
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time the satisfaction rating got updated
          readOnly: true
        url:
          type: string
          description: The API url of this rating
          readOnly: true
      example:
        assignee_id: 135
        created_at: "2011-07-20T22:55:29Z"
        group_id: 44
        id: 35436
        requester_id: 7881
        score: good
        ticket_id: 208
        updated_at: "2011-07-20T22:55:29Z"
        url: https://company.zendesk.com/api/v2/satisfaction_ratings/62.json
      required:
        - assignee_id
        - group_id
        - requester_id
        - ticket_id
        - score
    SatisfactionRatingResponse:
      type: object
      properties:
        satisfaction_rating:
          type: array
          items:
            $ref: '#/components/schemas/SatisfactionRatingObject'
    SatisfactionRatingsCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    SatisfactionRatingsResponse:
      type: object
      properties:
        satisfaction_ratings:
          type: array
          items:
            $ref: '#/components/schemas/SatisfactionRatingObject'
    SatisfactionReasonObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the reason was created
          readOnly: true
        deleted_at:
          type: string
          format: date-time
          description: The time the reason was deleted
          readOnly: true
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        raw_value:
          type: string
          description: The dynamic content placeholder, if present, or the current "value", if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        reason_code:
          type: integer
          description: An account-level code for referencing the reason. Custom reasons are assigned an auto-incrementing integer (non-system reason codes begin at 1000). See [Reason codes](#reason-codes)
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time the reason was updated
          readOnly: true
        url:
          type: string
          description: API URL for the resource
          readOnly: true
        value:
          type: string
          description: Translated value of the reason in the account locale
      example:
        created_at: "2011-07-20T22:55:29Z"
        deleted_at: "2012-03-12T12:45:32Z"
        id: 35436
        raw_value: '{{dc.reason_code_1003}}'
        reason_code: 1003
        updated_at: "2011-07-20T22:55:29Z"
        url: https://example.zendesk.com/api/v2/satisfaction_reasons/35436.json
        value: Agent did not respond quickly
      required:
        - value
    SatisfactionReasonResponse:
      type: object
      properties:
        reason:
          type: array
          items:
            $ref: '#/components/schemas/SatisfactionReasonObject'
    SatisfactionReasonsResponse:
      type: object
      properties:
        reasons:
          type: array
          items:
            $ref: '#/components/schemas/SatisfactionReasonObject'
    SearchCountResponse:
      type: object
      properties:
        count:
          type: integer
    SearchExportResponse:
      type: object
      properties:
        facets:
          type: string
          description: The facets corresponding to the search query
          nullable: true
          readOnly: true
        links:
          type: object
          description: The links to the previous and next entries via the cursor ids in the metadata.
          properties:
            next:
              type: string
              description: The url to the next entry via the cursor.
              nullable: true
              readOnly: true
            prev:
              type: string
              description: The url to the previous entry via the cursor.
              nullable: true
              readOnly: true
        meta:
          type: object
          description: Metadata for the export query response.
          properties:
            after_cursor:
              type: string
              description: The cursor id for the next object.
              nullable: true
              readOnly: true
            before_cursor:
              type: string
              description: The cursor id for the previous object.
              nullable: true
              readOnly: true
            has_more:
              type: boolean
              description: Whether there are more items yet to be returned by the cursor.
              readOnly: true
        results:
          type: array
          description: May consist of tickets, users, groups, or organizations, as specified by the `result_type` property in each result object
          items:
            $ref: '#/components/schemas/SearchResultObject'
          readOnly: true
      example:
        facets: null
        links:
          next: https://example.zendesk.com/api/v2/search/export.json?filter%5Btype%5D=ticket&page%5Bafter%5D=eyJmaWVsZCI6ImNyZWF0ZWRfYXQiLCJkZXNjIjp0cnVlLCJ0aWVCcmVha0ZpZWxkIjoiaWQiLCJ0aWVCcmVha0Rlc2MiOmZhbHNlLCJzb3J0VmFsdWVzIjpudWxsLCJleHBvcnRlZFRodXNGYXIiOjAsInNlc3Npb25TdGFydCI6MTYwNzAzOTI1Mzk4NSwiY3JlYXRlZEF0IjoxNjA3MDM5MjUzOTg1LCJzYWx0ZWRSZXF1ZXN0SGFzaCI6LTQ5ODM0ODc3LCJzYWx0ZWRDdXJzb3JIYXNoIjotMjQwMzQ4MjgwfQ%3D%3D&page%5Bsize%5D=100&query=hello%26page%5Bsize%5D%3D100%26filter%5Btype%5D%3Dticket
          prev: null
        meta:
          after_cursor: eyJmaWVsZCI6ImNyZWF0ZWRfYXQiLCJkZXNjIjp0cnVlLCJ0aWVCcmVha0ZpZWxkIjoiaWQiLCJ0aWVCcmVha0Rlc2MiOmZhbHNlLCJzb3J0VmFsdWVzIjpudWxsLCJleHBvcnRlZFRodXNGYXIiOjAsInNlc3Npb25TdGFydCI6MTYwNzAzOTI1Mzk4NSwiY3JlYXRlZEF0IjoxNjA3MDM5MjUzOTg1LCJzYWx0ZWRSZXF1ZXN0SGFzaCI6LTQ5ODM0ODc3LCJzYWx0ZWRDdXJzb3JIYXNoIjotMjQwMzQ4MjgwfQ==
          before_cursor: null
          has_more: true
        results: []
    SearchResponse:
      type: object
      properties:
        count:
          type: integer
          description: The number of resources returned by the query corresponding to this page of results in the paginated response
          readOnly: true
        facets:
          type: string
          description: The facets corresponding to the search query
          nullable: true
          readOnly: true
        next_page:
          type: string
          description: URL to the next page of results
          nullable: true
          readOnly: true
        previous_page:
          type: string
          description: URL to the previous page of results
          nullable: true
          readOnly: true
        results:
          type: array
          description: May consist of tickets, users, groups, or organizations, as specified by the `result_type` property in each result object
          items:
            $ref: '#/components/schemas/SearchResultObject'
          readOnly: true
      example:
        count: 1
        facets: null
        next_page: null
        previous_page: null
        results:
          - created_at: "2018-04-06T03:17:05Z"
            default: false
            deleted: false
            description: ""
            id: 1835972
            name: Ragtail
            result_type: group
            updated_at: "2018-04-06T03:17:05Z"
            url: https://example.zendesk.com/api/v2/groups/1835972.json
    SearchResultObject:
      type: object
      properties:
        created_at:
          type: string
          description: When the resource was created
        default:
          type: boolean
          description: Flag to indicate whether this is the default resource
        deleted:
          type: boolean
          description: Flag to indicate whether or not resource has been deleted
        description:
          type: string
          description: The description of the resource
        id:
          type: integer
          description: The ID of the resource
        name:
          type: string
          description: The name of the resource
        result_type:
          type: string
          description: The type of the resource
        updated_at:
          type: string
          description: When the resource was last updated
        url:
          type: string
          description: The url of the resource
    SessionObject:
      type: object
      properties:
        authenticated_at:
          type: string
          description: When the session was created
          nullable: true
        id:
          type: integer
          description: Automatically assigned when the session is created
        last_seen_at:
          type: string
          description: The last approximate time this session was seen. This does not update on every request.
          nullable: true
        url:
          type: string
          description: The API URL of this session
          nullable: true
        user_id:
          type: integer
          description: The id of the user
          nullable: true
      example:
        authenticated_at: "2014-11-18T17:24:29Z"
        id: 3432
        last_seen_at: "2014-11-18T17:30:52Z"
        url: https://company.zendesk.com/api/v2/users/12345/sessions/3432.json
        user_id: 12345
      required:
        - id
    SessionResponse:
      type: object
      properties:
        session:
          type: array
          items:
            $ref: '#/components/schemas/SessionObject'
    SessionsResponse:
      type: object
      properties:
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/SessionObject'
    SharingAgreementObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the record was created
          readOnly: true
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        name:
          type: string
          description: Name of this sharing agreement
        partner_name:
          type: string
          description: 'Can be one of the following: "jira", null'
          nullable: true
        remote_subdomain:
          type: string
          description: Subdomain of the remote account or null if not associated with an account
        status:
          type: string
          description: 'Can be one of the following: "accepted", "declined", "pending", "inactive", "failed", "ssl_error", "configuration_error"'
        type:
          type: string
          description: 'Can be one of the following: "inbound", "outbound"'
        updated_at:
          type: string
          format: date-time
          description: The time the record was updated
          readOnly: true
        url:
          type: string
          description: URL of the sharing agreement record
          readOnly: true
      example:
        created_at: "2012-02-20T22:55:29Z"
        id: 88335
        name: Ticket Sharing
        partner_name: jira
        status: accepted
        type: inbound
        updated_at: "2013-02-20T22:55:29Z"
        url: https://company.zendesk.com/api/v2/agreements/88335.json
    SharingAgreementResponse:
      type: object
      properties:
        sharing_agreement:
          $ref: '#/components/schemas/SharingAgreementObject'
    SharingAgreementsResponse:
      type: object
      properties:
        sharing_agreements:
          type: array
          items:
            $ref: '#/components/schemas/SharingAgreementObject'
    SkillBasedRoutingAttributeDefinitions:
      type: object
      properties:
        definitions:
          type: object
          properties:
            conditions_all:
              type: array
              items:
                type: object
                properties:
                  subject:
                    type: string
                  title:
                    type: string
            conditions_any:
              type: array
              items:
                type: object
                properties:
                  subject:
                    type: string
                  title:
                    type: string
    SkillBasedRoutingAttributeObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: When this record was created
          readOnly: true
        id:
          type: string
          description: Automatically assigned when an attribute is created
          readOnly: true
        name:
          type: string
          description: The name of the attribute
        updated_at:
          type: string
          format: date-time
          description: When this record was last updated
          readOnly: true
        url:
          type: string
          description: URL of the attribute
          readOnly: true
      example:
        created_at: "2017-12-01T19:29:31Z"
        id: 15821cba-7326-11e8-b07e-950ba849aa27
        name: color
        updated_at: "2017-12-01T19:29:31Z"
        url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/15821cba-7326-11e8-b07e-950ba849aa27.json
      required:
        - name
    SkillBasedRoutingAttributeResponse:
      type: object
      properties:
        attribute:
          $ref: '#/components/schemas/SkillBasedRoutingAttributeObject'
    SkillBasedRoutingAttributeValueObject:
      type: object
      properties:
        attribute_id:
          type: string
          description: Id of the associated attribute
        created_at:
          type: string
          format: date-time
          description: When this record was created
          readOnly: true
        id:
          type: string
          description: Automatically assigned when an attribute value is created
          readOnly: true
        name:
          type: string
          description: The name of the attribute value
        updated_at:
          type: string
          format: date-time
          description: When this record was last updated
          readOnly: true
        url:
          type: string
          description: URL of the attribute value
          readOnly: true
    SkillBasedRoutingAttributeValueResponse:
      type: object
      properties:
        attribute_value:
          $ref: '#/components/schemas/SkillBasedRoutingAttributeValueObject'
    SkillBasedRoutingAttributeValuesResponse:
      type: object
      properties:
        attribute_values:
          type: array
          items:
            $ref: '#/components/schemas/SkillBasedRoutingAttributeValueObject'
    SkillBasedRoutingAttributesResponse:
      type: object
      properties:
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/SkillBasedRoutingAttributeObject'
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
    SkillBasedRoutingTicketFulfilledResponse:
      type: object
      properties:
        fulfilled_ticket_ids:
          type: array
          items:
            type: integer
    SupportAddressObject:
      type: object
      properties:
        brand_id:
          type: integer
          description: The ID of the [brand](/api-reference/ticketing/account-configuration/brands/)
        cname_status:
          type: string
          description: 'Whether all of the required CNAME records are set. Possible values: "unknown", "verified", "failed"'
          enum:
            - unknown
            - verified
            - failed
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When the address was created
          readOnly: true
        default:
          type: boolean
          description: Whether the address is the account's default support address
        dns_results:
          type: string
          description: 'Verification statuses for the domain and CNAME records. Possible types: "verified", "failed"'
          enum:
            - verified
            - failed
          readOnly: true
        domain_verification_code:
          type: string
          description: 'Verification string to be added as a TXT record to the domain. Possible types: string or null.'
          readOnly: true
        domain_verification_status:
          type: string
          description: 'Whether the domain verification record is valid. Possible values: "unknown", "verified", "failed"'
          enum:
            - unknown
            - verified
            - failed
          readOnly: true
        email:
          type: string
          description: The email address. You can't change the email address of an existing support address.
        forwarding_status:
          type: string
          description: 'Status of email forwarding. Possible values: "unknown", "waiting", "verified", or "failed"'
          enum:
            - unknown
            - waiting
            - verified
            - failed
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        name:
          type: string
          description: The name for the address
        spf_status:
          type: string
          description: 'Whether the SPF record is set up correctly. Possible values: "unknown", "verified", "failed"'
          enum:
            - unknown
            - verified
            - failed
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When the address was updated
          readOnly: true
      example:
        brand_id: 123
        cname_status: verified
        created_at: "2015-07-20T22:55:29Z"
        default: true
        domain_verification_status: verified
        email: support@example.zendesk.com
        forwarding_status: unknown
        id: 35436
        name: all
        spf_status: verified
        updated_at: "2016-09-21T20:15:20Z"
      required:
        - email
    SupportAddressResponse:
      type: object
      properties:
        recipient_address:
          $ref: '#/components/schemas/SupportAddressObject'
    SupportAddressesResponse:
      type: object
      properties:
        recipient_addresses:
          type: array
          items:
            $ref: '#/components/schemas/SupportAddressObject'
    SuspendedTicketObject:
      type: object
      properties:
        attachments:
          type: array
          description: The attachments, if any associated to this suspended ticket. See [Attachments](/api-reference/ticketing/tickets/ticket-attachments/)
          items:
            $ref: '#/components/schemas/AttachmentObject'
          nullable: true
          readOnly: true
        author:
          type: object
          description: The author id (if available), name and email
          allOf:
            - $ref: '#/components/schemas/AuthorObject'
          readOnly: true
        brand_id:
          type: integer
          description: The id of the brand this ticket is associated with. Only applicable for Enterprise accounts
          readOnly: true
        cause:
          type: string
          description: Why the ticket was suspended
          readOnly: true
        cause_id:
          type: integer
          description: The ID of the cause
          readOnly: true
        content:
          type: string
          description: The content that was flagged
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: The ticket ID this suspended email is associated with, if available
          readOnly: true
        error_messages:
          type: array
          description: The error messages if any associated to this suspended ticket
          items:
            type: object
          nullable: true
          readOnly: true
        id:
          type: integer
          description: Automatically assigned
          readOnly: true
        message_id:
          type: string
          description: The ID of the email, if available
          readOnly: true
        recipient:
          type: string
          description: The original recipient e-mail address of the ticket
          readOnly: true
        subject:
          type: string
          description: The value of the subject field for this ticket
          readOnly: true
        ticket_id:
          type: integer
          description: The ticket ID this suspended email is associated with, if available
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When the ticket was assigned
          readOnly: true
        url:
          type: string
          description: The API url of this ticket
          readOnly: true
        via:
          $ref: '#/components/schemas/ViaObject'
      example:
        attachments: []
        author:
          email: styx@example.com
          id: 1111
          name: Mr. Roboto
        brand_id: 123
        cause: Detected as spam
        cause_id: 0
        content: Out Of Office Reply
        created_at: "2009-07-20T22:55:29Z"
        error_messages: null
        id: 435
        message_id: Spambot@spam.co.evil
        recipient: john@example.com
        subject: Help, my printer is on fire!
        ticket_id: 67321
        updated_at: "2011-05-05T10:38:52Z"
        url: https://example.zendesk.com/api/v2/tickets/35436.json
        via:
          channel: email
          source:
            from:
              address: totallylegit@emailaddress.com
              name: TotallyLegit
            rel: null
            to:
              address: support@example.zendesk.com
              name: Example Account
    SuspendedTicketResponse:
      type: object
      properties:
        suspended_ticket:
          type: array
          items:
            $ref: '#/components/schemas/SuspendedTicketObject'
    SuspendedTicketsAttachmentsResponse:
      type: object
      properties:
        upload:
          type: object
          properties:
            attachments:
              type: array
              items:
                $ref: '#/components/schemas/AttachmentObject'
            token:
              type: string
              description: Token for subsequent request
              readOnly: true
    SuspendedTicketsExportResponse:
      type: object
      properties:
        export:
          type: object
          properties:
            status:
              type: string
              readOnly: true
            view_id:
              type: string
              readOnly: true
    SuspendedTicketsResponse:
      type: object
      properties:
        suspended_tickets:
          type: array
          items:
            $ref: '#/components/schemas/SuspendedTicketObject'
    SystemFieldOptionObject:
      type: object
      properties:
        name:
          type: string
          description: Name of the system field option
          readOnly: true
        value:
          type: string
          description: Value of the system field option
          readOnly: true
    TagCountObject:
      type: object
      properties:
        refreshed_at:
          type: string
          description: The time that the count value was last refreshed
          readOnly: true
        value:
          type: integer
          description: The count of tags created in the last 24 hours
          readOnly: true
    TagCountResponse:
      type: object
      properties:
        count:
          $ref: '#/components/schemas/TagCountObject'
    TagListTagObject:
      type: object
      properties:
        count:
          type: integer
          description: The number of tags
          readOnly: true
        name:
          type: string
          description: A name for the tag
    TagUrlObject:
      type: object
      properties:
        url:
          type: string
          description: The url associated to the api request
          readOnly: true
    TagsByObjectIdResponse:
      type: object
      properties:
        tags:
          type: array
          description: An array of strings
          items:
            type: string
      required:
        - tags
    TagsResponse:
      type: object
      properties:
        count:
          type: integer
          description: The number of pages
          readOnly: true
        next_page:
          type: string
          description: The url of the previous page
          nullable: true
          readOnly: true
        previous_page:
          type: string
          description: The url of the next page
          nullable: true
          readOnly: true
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagListTagObject'
    TargetBasecamp:
      type: object
      properties:
        message_id:
          type: string
          description: Can be filled if it is a "message" resource
        password:
          type: string
          description: The 37Signals password for the Basecamp account (only writable)
        project_id:
          type: string
          description: The ID of the project in Basecamp where updates should be pushed
        resource:
          type: string
          description: '"todo" or "message"'
        target_url:
          type: string
          description: The URL of your Basecamp account, including protocol and path
        todo_list_id:
          type: string
          description: Can be filled if it is a "todo" resource
        token:
          type: string
          description: Get the API token from My info > Show your tokens > Token for feed readers or the Basecamp API in your Basecamp account
        username:
          type: string
          description: The 37Signals username of the account you use to log in to Basecamp
      required:
        - target_url
        - token
        - project_id
        - resource
    TargetCampfire:
      type: object
      properties:
        preserve_format:
          type: boolean
        room:
          type: string
        ssl:
          type: boolean
        subdomain:
          type: string
        token:
          type: string
      required:
        - subdomain
        - room
        - token
    TargetClickatell:
      type: object
      properties:
        api_id:
          type: string
        attribute:
          type: string
          description: Read-only
        from:
          type: string
        method:
          type: string
          description: Read-only
        password:
          type: string
          description: only writable
        target_url:
          type: string
          description: Read-only
        to:
          type: string
        us_small_business_account:
          type: string
        username:
          type: string
      required:
        - username
        - password
        - api_id
        - to
    TargetCommonFields:
      type: object
      properties:
        active:
          type: boolean
          description: Whether or not the target is activated
        created_at:
          type: string
          format: date-time
          description: The time the target was created
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        title:
          type: string
          description: A name for the target
        type:
          type: string
          description: A pre-defined target, such as "basecamp_target". See the additional attributes for the type that follow
      required:
        - title
        - type
    TargetEmail:
      type: object
      properties:
        email:
          type: string
        subject:
          type: string
      required:
        - email
        - subject
    TargetFailureObject:
      type: object
      properties:
        consecutive_failure_count:
          type: integer
          description: Number of times the target failed consecutively
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: Time of the failure
          readOnly: true
        id:
          type: integer
          description: The ID of the target failure
          readOnly: true
        raw_request:
          type: string
          description: The raw message of the target request
          readOnly: true
        raw_response:
          type: string
          description: The raw response of the failure
          readOnly: true
        status_code:
          type: integer
          description: HTTP status code of the target failure
          readOnly: true
        target_name:
          type: string
          description: Name of the target failure
          readOnly: true
        url:
          type: string
          description: The API url of the failure record
          readOnly: true
      example:
        consecutive_failure_count: 1
        created_at: "2017-09-05T10:38:52Z"
        id: 6001326
        raw_request: "GET /api/v2/tickets.json HTTP/1.1\r\nUser-Agent: Zendesk Target\r\n ..."
        raw_response: "HTTP/1.1 401 Unauthorized\r\nServer: nginx\r\n ..."
        status_code: 401
        target_name: My URL Target
        url: https://example.zendesk.com/api/v2/target_failures/6001326.json
    TargetFailureResponse:
      type: object
      properties:
        target_failure:
          $ref: '#/components/schemas/TargetFailureObject'
    TargetFailuresResponse:
      type: object
      properties:
        target_failures:
          type: array
          items:
            $ref: '#/components/schemas/TargetFailureObject'
    TargetFlowdock:
      type: object
      properties:
        api_token:
          type: string
      required:
        - api_token
    TargetGetSatisfaction:
      type: object
      properties:
        account_name:
          type: string
        email:
          type: string
        password:
          type: string
          description: only writable
        target_url:
          type: string
      required:
        - email
        - password
        - account_name
    TargetHTTP:
      type: object
      properties:
        content_type:
          type: string
          description: '"application/json", "application/xml", or "application/x-www-form-urlencoded"'
        method:
          type: string
          description: '"get", "patch", "put", "post", or "delete"'
        password:
          type: string
          description: only writable
        target_url:
          type: string
        username:
          type: string
      required:
        - target_url
        - method
        - content_type
    TargetJira:
      type: object
      properties:
        password:
          type: string
          description: only writable
        target_url:
          type: string
        username:
          type: string
      required:
        - target_url
        - username
        - password
    TargetObject:
      type: object
      allOf:
        - $ref: '#/components/schemas/TargetCommonFields'
        - anyOf:
            - $ref: '#/components/schemas/TargetBasecamp'
            - $ref: '#/components/schemas/TargetCampfire'
            - $ref: '#/components/schemas/TargetClickatell'
            - $ref: '#/components/schemas/TargetEmail'
            - $ref: '#/components/schemas/TargetFlowdock'
            - $ref: '#/components/schemas/TargetGetSatisfaction'
            - $ref: '#/components/schemas/TargetJira'
            - $ref: '#/components/schemas/TargetPivotal'
            - $ref: '#/components/schemas/TargetTwitter'
            - $ref: '#/components/schemas/TargetURL'
            - $ref: '#/components/schemas/TargetHTTP'
            - $ref: '#/components/schemas/TargetYammer'
      additionalProperties: true
      example:
        active: false
        created_at: "2012-02-20T22:55:29Z"
        id: 88335
        title: basecamp target
        type: basecamp_target
        url: https://company.zendesk.com/api/v2/targets/88335.json
    TargetPivotal:
      type: object
      properties:
        owner_by:
          type: string
        project_id:
          type: string
        requested_by:
          type: string
        story_labels:
          type: string
        story_title:
          type: string
        story_type:
          type: string
        token:
          type: string
      required:
        - token
        - project_id
        - story_type
        - story_title
    TargetResponse:
      type: object
      properties:
        target:
          $ref: '#/components/schemas/TargetObject'
    TargetTwitter:
      type: object
      properties:
        secret:
          type: string
          description: only writable
        token:
          type: string
    TargetURL:
      type: object
      properties:
        attribute:
          type: string
        method:
          type: string
          description: '"get"'
        password:
          type: string
          description: only writable
        target_url:
          type: string
        username:
          type: string
      required:
        - target_url
        - attribute
    TargetYammer:
      type: object
      properties:
        group_id:
          type: string
        token:
          type: string
    TargetsResponse:
      type: object
      properties:
        targets:
          type: array
          items:
            $ref: '#/components/schemas/TargetObject'
    TicketAuditObject:
      type: object
      properties:
        author_id:
          type: integer
          description: The user who created the audit
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: The time the audit was created
          readOnly: true
        events:
          type: array
          description: An array of the events that happened in this audit. See the [Ticket Audit events reference](/documentation/ticketing/reference-guides/ticket-audit-events-reference)
          items:
            type: object
            additionalProperties: true
        id:
          type: integer
          description: Automatically assigned when creating audits
          readOnly: true
        metadata:
          type: object
          description: Metadata for the audit, custom and system data
          additionalProperties: true
          readOnly: true
        ticket_id:
          type: integer
          description: The ID of the associated ticket
          readOnly: true
        via:
          $ref: '#/components/schemas/TicketAuditViaObject'
      example:
        author_id: 35436
        created_at: "2009-07-20T22:55:29Z"
        events:
          - attachments: []
            body: Thanks for your help!
            id: 1564245
            public: true
            type: Comment
          - body: 'Ticket #47 has been updated'
            id: 1564246
            subject: Your ticket has been updated
            type: Notification
        id: 35436
        metadata:
          custom:
            time_spent: 3m22s
          system:
            ip_address: 184.106.40.75
        ticket_id: 47
        via:
          channel: web
    TicketAuditResponse:
      type: object
      properties:
        audit:
          $ref: '#/components/schemas/TicketAuditObject'
    TicketAuditViaObject:
      type: object
      description: Describes how the object was created. See the [Via object reference](/documentation/ticketing/reference-guides/via-object-reference)
      properties:
        channel:
          type: string
          description: 'This tells you how the ticket or event was created. Examples: "web", "mobile", "rule", "system"'
          readOnly: true
        source:
          type: object
          description: For some channels a source object gives more information about how or why the ticket or event was created
          additionalProperties: true
          readOnly: true
    TicketAuditsCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    TicketAuditsResponse:
      type: object
      properties:
        after_cursor:
          type: string
          readOnly: true
        after_url:
          type: string
          readOnly: true
        audits:
          type: array
          items:
            $ref: '#/components/schemas/TicketAuditObject'
        before_cursor:
          type: string
          readOnly: true
        before_url:
          type: string
          readOnly: true
    TicketAuditsResponseNoneCursor:
      type: object
      properties:
        audits:
          type: array
          items:
            $ref: '#/components/schemas/TicketAuditObject'
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
    TicketBulkImportRequest:
      type: object
      properties:
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketImportInput'
    TicketChatCommentRedactionResponse:
      type: object
      properties:
        chat_event:
          type: object
          description: Chat event object
          properties:
            id:
              type: integer
              description: Id assigned to the chat event object
              readOnly: true
            type:
              type: string
              description: Type of chat event
              readOnly: true
            value:
              type: object
              description: The value of the chat event object
              properties:
                chat_id:
                  type: string
                  description: Id of the chat session
                  readOnly: true
                history:
                  type: array
                  description: Chat events within the chat session
                  items:
                    type: object
                    additionalProperties: true
                visitor_id:
                  type: string
                  description: Id assigned to the visitor
                  readOnly: true
              readOnly: true
          readOnly: true
      example:
        chat_event:
          id: 1932802680168
          type: ChatStartedEvent
          value:
            chat_id: 2109.10502823.Sjuj2YrBpXwei
            history:
              - actor_id: 1900448983828
                actor_name: Visitor 36044085
                actor_type: end-user
                chat_index: 0
                timestamp: 1632470783218
                type: ChatJoin
            visitor_id: 10502823-16EkM3T6VNq7KMd
    TicketCommentObject:
      type: object
      properties:
        attachments:
          type: array
          description: Attachments, if any. See [Attachment](/api-reference/ticketing/tickets/ticket-attachments/)
          items:
            $ref: '#/components/schemas/AttachmentObject'
          readOnly: true
        audit_id:
          type: integer
          description: The id of the ticket audit record. See [Show Audit](/api-reference/ticketing/tickets/ticket_audits/#show-audit)
          readOnly: true
        author_id:
          type: integer
          description: The id of the comment author. See [Author id](#author-id)
        body:
          type: string
          description: The comment string. See [Bodies](#bodies)
        created_at:
          type: string
          format: date-time
          description: The time the comment was created
          readOnly: true
        html_body:
          type: string
          description: The comment formatted as HTML. See [Bodies](#bodies)
        id:
          type: integer
          description: Automatically assigned when the comment is created
          readOnly: true
        metadata:
          type: object
          description: System information (web client, IP address, etc.) and comment flags, if any. See [Comment flags](#comment-flags)
          additionalProperties: true
          readOnly: true
        plain_body:
          type: string
          description: The comment presented as plain text. See [Bodies](#bodies)
          readOnly: true
        public:
          type: boolean
          description: true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it
        type:
          type: string
          description: '`Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets)'
          readOnly: true
        uploads:
          type: array
          description: List of tokens received from [uploading files](/api-reference/ticketing/tickets/ticket-attachments/#upload-files) for comment attachments. The files are attached by creating or updating tickets with the tokens. See [Attaching files](/api-reference/ticketing/tickets/tickets/#attaching-files) in Tickets
          items:
            type: string
        via:
          $ref: '#/components/schemas/TicketAuditViaObject'
      example:
        attachments:
          - content_type: text/plain
            content_url: https://company.zendesk.com/attachments/crash.log
            file_name: crash.log
            id: 498483
            size: 2532
            thumbnails: []
        author_id: 123123
        body: Thanks for your help!
        created_at: "2009-07-20T22:55:29Z"
        id: 1274
        metadata:
          system:
            client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
            ip_address: 1.1.1.1
            latitude: -37.000000000001
            location: Melbourne, 07, Australia
            longitude: 144.0000000000002
          via:
            channel: web
            source:
              from: {}
              rel: web_widget
              to: {}
        public: true
        type: Comment
    TicketCommentResponse:
      type: object
      properties:
        comment:
          $ref: '#/components/schemas/TicketCommentObject'
    TicketCommentsCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    TicketCommentsResponse:
      type: object
      properties:
        comments:
          type: array
          items:
            $ref: '#/components/schemas/TicketCommentObject'
    TicketCreateInput:
      type: object
      allOf:
        - $ref: '#/components/schemas/TicketUpdateInput'
        - type: object
          properties:
            brand_id:
              type: integer
              description: Enterprise only. The id of the brand this ticket is associated with
            collaborators:
              type: array
              description: POST requests only. Users to add as cc's when creating a ticket. See [Setting Collaborators](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#setting-collaborators)
              items:
                $ref: '#/components/schemas/CollaboratorObject'
            email_cc_ids:
              type: array
              description: The ids of agents or end users currently CC'ed on the ticket. See [CCs and followers resources](https://support.zendesk.com/hc/en-us/articles/360020585233) in the Support Help Center
              items:
                type: integer
            follower_ids:
              type: array
              description: The ids of agents currently following the ticket. See [CCs and followers resources](https://support.zendesk.com/hc/en-us/articles/360020585233)
              items:
                type: integer
            macro_ids:
              type: array
              description: POST requests only. List of macro IDs to be recorded in the ticket audit
              items:
                type: integer
            raw_subject:
              type: string
              description: |
                The dynamic content placeholder, if present, or the "subject" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
            recipient:
              type: string
              description: The original recipient e-mail address of the ticket
            submitter_id:
              type: integer
              description: The user who submitted the ticket. The submitter always becomes the author of the first comment on the ticket
            ticket_form_id:
              type: integer
              description: Enterprise only. The id of the ticket form to render for the ticket
            via:
              $ref: '#/components/schemas/ViaObject'
            via_followup_source_id:
              type: integer
              description: POST requests only. The id of a closed ticket when creating a follow-up ticket. See [Creating a follow-up ticket](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#creating-a-follow-up-ticket)
          required:
            - comment
      example:
        comment:
          body: The smoke is very colorful.
        priority: urgent
        subject: My printer is on fire!
    TicketCreateRequest:
      type: object
      properties:
        ticket:
          $ref: '#/components/schemas/TicketCreateInput'
    TicketCreateVoicemailTicketInput:
      type: object
      properties:
        comment:
          $ref: '#/components/schemas/TicketCommentObject'
        priority:
          type: string
          description: The urgency with which the ticket should be addressed.
          enum:
            - urgent
            - high
            - normal
            - low
        via_id:
          type: integer
          description: Required for Create Ticket operation
          enum:
            - 44
            - 45
            - 46
        voice_comment:
          type: object
          description: Required if creating voicemail ticket
          allOf:
            - $ref: '#/components/schemas/TicketCreateVoicemailTicketVoiceCommentInput'
    TicketCreateVoicemailTicketRequest:
      type: object
      properties:
        display_to_agent:
          type: integer
          description: Optional value such as the ID of the agent that will see the newly created ticket.
        ticket:
          type: object
          description: Ticket object that lists the values to set when the ticket is created
          allOf:
            - $ref: '#/components/schemas/TicketCreateVoicemailTicketInput'
    TicketCreateVoicemailTicketVoiceCommentInput:
      type: object
      properties:
        answered_by_id:
          type: integer
          description: The agent who answered the call
        call_duration:
          type: integer
          description: Duration in seconds of the call
        from:
          type: string
          description: Incoming phone number
        location:
          type: string
          description: Location of the caller (optional)
        recording_url:
          type: string
          description: Incoming phone number
        started_at:
          type: string
          format: date-time
          description: '[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the call starting time'
        to:
          type: string
          description: Dialed phone number
        transcription_text:
          type: string
          description: Transcription of the call (optional)
    TicketFieldCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    TicketFieldCustomStatusObject:
      type: object
      properties:
        active:
          type: boolean
          description: If true, if the custom status is set to active. If false, the custom status is set to inactive
        agent_label:
          type: string
          description: The label displayed to agents
        created_at:
          type: string
          format: date-time
          description: The date and time at which the custom ticket status was created
          readOnly: true
        default:
          type: boolean
          description: If true, the custom status is set to default. If false, the custom status is set to non-default
        description:
          type: string
          description: The description of when the user should select this custom ticket status
        end_user_description:
          type: string
          description: The description displayed to end users
        end_user_label:
          type: string
          description: The label displayed to end users
        id:
          type: integer
          description: Automatically assigned when the custom ticket status is created
          readOnly: true
        status_category:
          type: string
          description: The status category the custom ticket status belongs to
          enum:
            - new
            - open
            - pending
            - hold
            - solved
        updated_at:
          type: string
          format: date-time
          description: The date and time at which the custom ticket status was last updated
          readOnly: true
    TicketFieldObject:
      type: object
      properties:
        active:
          type: boolean
          description: Whether this field is available
        agent_description:
          type: string
          description: A description of the ticket field that only agents can see
        collapsed_for_agents:
          type: boolean
          description: If true, the field is shown to agents by default. If false, the field is hidden alongside infrequently used fields. Classic interface only
        created_at:
          type: string
          format: date-time
          description: The time the custom ticket field was created
          readOnly: true
        creator_app_name:
          type: string
          description: Name of the app that created the ticket field, or a null value if no app created the ticket field
        creator_user_id:
          type: integer
          description: The id of the user that created the ticket field, or a value of "-1" if an app created the ticket field
        custom_field_options:
          type: array
          description: Required and presented for a custom ticket field of type "multiselect" or "tagger"
          items:
            $ref: '#/components/schemas/CustomFieldOptionObject'
        custom_statuses:
          type: array
          description: List of customized ticket statuses. Only presented for a system ticket field of type "custom_status"
          items:
            $ref: '#/components/schemas/TicketFieldCustomStatusObject'
          readOnly: true
        description:
          type: string
          description: Describes the purpose of the ticket field to users
        editable_in_portal:
          type: boolean
          description: Whether this field is editable by end users in Help Center
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        position:
          type: integer
          description: The relative position of the ticket field on a ticket. Note that for accounts with ticket forms, positions are controlled by the different forms
        raw_description:
          type: string
          description: The dynamic content placeholder if present, or the `description` value if not. See [Dynamic Content](/api-reference/ticketing/ticket-management/dynamic_content/)
        raw_title:
          type: string
          description: The dynamic content placeholder if present, or the `title` value if not. See [Dynamic Content](/api-reference/ticketing/ticket-management/dynamic_content/)
        raw_title_in_portal:
          type: string
          description: The dynamic content placeholder if present, or the "title_in_portal" value if not. See [Dynamic Content](/api-reference/ticketing/ticket-management/dynamic_content/)
        regexp_for_validation:
          type: string
          description: For "regexp" fields only. The validation pattern for a field value to be deemed valid
          nullable: true
        relationship_filter:
          type: object
          description: A filter definition that allows your autocomplete to filter down results
        relationship_target_type:
          type: string
          description: A representation of what type of object the field references. Options are "zen:user", "zen:organization", "zen:ticket", or "zen:custom_object:{key}" where key is a custom object key. For example "zen:custom_object:apartment".
        removable:
          type: boolean
          description: If false, this field is a system field that must be present on all tickets
          readOnly: true
        required:
          type: boolean
          description: If true, agents must enter a value in the field to change the ticket status to solved
        required_in_portal:
          type: boolean
          description: If true, end users must enter a value in the field to create the request
        sub_type_id:
          type: integer
          description: For system ticket fields of type "priority" and "status". Defaults to 0. A "priority" sub type of 1 removes the "Low" and "Urgent" options. A "status" sub type of 1 adds the "On-Hold" option
        system_field_options:
          type: array
          description: Presented for a system ticket field of type "tickettype", "priority" or "status"
          items:
            $ref: '#/components/schemas/SystemFieldOptionObject'
          readOnly: true
        tag:
          type: string
          description: For "checkbox" fields only. A tag added to tickets when the checkbox field is selected
          nullable: true
        title:
          type: string
          description: The title of the ticket field
        title_in_portal:
          type: string
          description: The title of the ticket field for end users in Help Center
        type:
          type: string
          description: System or custom field type. Editable for custom field types and only on creation. See [Create Ticket Field](#create-ticket-field)
        updated_at:
          type: string
          format: date-time
          description: The time the custom ticket field was last updated
          readOnly: true
        url:
          type: string
          description: The URL for this resource
          readOnly: true
        visible_in_portal:
          type: boolean
          description: Whether this field is visible to end users in Help Center
      example:
        active: true
        agent_description: This is the agent only description for the subject field
        collapsed_for_agents: false
        created_at: "2009-07-20T22:55:29Z"
        description: This is the subject field of a ticket
        editable_in_portal: true
        id: 34
        position: 21
        raw_description: This is the subject field of a ticket
        raw_title: '{{dc.my_title}}'
        raw_title_in_portal: '{{dc.my_title_in_portal}}'
        regexp_for_validation: null
        removable: false
        required: true
        required_in_portal: true
        tag: null
        title: Subject
        title_in_portal: Subject
        type: subject
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/ticket_fields/34.json
        visible_in_portal: true
      required:
        - type
        - title
    TicketFieldResponse:
      type: object
      properties:
        ticket_field:
          $ref: '#/components/schemas/TicketFieldObject'
    TicketFieldsResponse:
      type: object
      properties:
        ticket_fields:
          type: array
          items:
            $ref: '#/components/schemas/TicketFieldObject'
    TicketFormObject:
      type: object
      properties:
        active:
          type: boolean
          description: If the form is set as active
        agent_conditions:
          type: array
          description: Array of condition sets for agent workspaces
          items:
            type: object
            additionalProperties: true
        created_at:
          type: string
          format: date-time
          description: The time the ticket form was created
          readOnly: true
        default:
          type: boolean
          description: Is the form the default form for this account
        display_name:
          type: string
          description: The name of the form that is displayed to an end user
        end_user_conditions:
          type: array
          description: Array of condition sets for end user products
          items:
            type: object
            additionalProperties: true
        end_user_visible:
          type: boolean
          description: Is the form visible to the end user
        id:
          type: integer
          description: Automatically assigned when creating ticket form
          readOnly: true
        in_all_brands:
          type: boolean
          description: Is the form available for use in all brands on this account
        name:
          type: string
          description: The name of the form
        position:
          type: integer
          description: The position of this form among other forms in the account, i.e. dropdown
        raw_display_name:
          type: string
          description: The dynamic content placeholder, if present, or the "display_name" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        raw_name:
          type: string
          description: The dynamic content placeholder, if present, or the "name" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        restricted_brand_ids:
          type: array
          description: ids of all brands that this ticket form is restricted to
          items:
            type: integer
          readOnly: true
        ticket_field_ids:
          type: array
          description: ids of all ticket fields which are in this ticket form. The products use the order of the ids to show the field values in the tickets
          items:
            type: integer
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the ticket form
          readOnly: true
        url:
          type: string
          description: URL of the ticket form
          readOnly: true
      example:
        active: true
        agent_conditions:
          - child_fields:
              - id: 101
                is_required: false
                required_on_statuses:
                  statuses:
                    - new
                    - open
                    - pending
                    - hold
                  type: SOME_STATUSES
              - id: 200
                is_required: true
                required_on_statuses:
                  statuses:
                    - solved
                  type: SOME_STATUSES
            parent_field_id: 100
            value: matching_value
          - child_fields:
              - id: 102
                is_required: true
                required_on_statuses:
                  type: ALL_STATUSES
              - id: 200
                is_required: false
                required_on_statuses:
                  type: NO_STATUSES
            parent_field_id: 101
            value: matching_value_2
        created_at: "2012-04-02T22:55:29Z"
        default: true
        display_name: Snowboard Damage
        end_user_conditions:
          - child_fields:
              - id: 101
                is_required: true
            parent_field_id: 100
            value: matching_value
          - child_fields:
              - id: 202
                is_required: false
            parent_field_id: 200
            value: matching_value
        end_user_visible: true
        id: 47
        in_all_brands: false
        name: Snowboard Problem
        position: 9999
        raw_display_name: '{{dc.my_display_name}}'
        raw_name: Snowboard Problem
        restricted_brand_ids:
          - 47
          - 33
          - 22
        ticket_field_ids:
          - 2
          - 4
          - 5
          - 10
          - 100
          - 101
          - 102
          - 200
        updated_at: "2012-04-02T22:55:29Z"
        url: https://company.zendesk.com/api/v2/ticket_forms/47.json
      required:
        - name
    TicketFormResponse:
      type: object
      properties:
        ticket_form:
          $ref: '#/components/schemas/TicketFormObject'
    TicketFormStatusObject:
      type: object
      properties:
        custom_status_id:
          type: integer
          description: The id of the associated custom status
        id:
          type: string
          description: Automatically assigned when creating a ticket form
          readOnly: true
        ticket_form_id:
          type: integer
          description: The id of the associated ticket form
      example:
        custom_status_id: 7485541848574
        id: 01HFD81Y01D65FJ7EPNNM58GPK
        ticket_form_id: 7485506877054
    TicketFormStatusesCreateParams:
      type: object
      properties:
        custom_status_id:
          type: integer
      example:
        custom_status_id: 12345
      required:
        - custom_status_id
    TicketFormStatusesParams:
      type: object
      properties:
        ticket_form_status:
          type: array
          items:
            $ref: '#/components/schemas/TicketFormStatusesCreateParams'
      required:
        - ticket_form_status
    TicketFormStatusesResponse:
      type: object
      properties:
        ticket_form_statuses:
          type: array
          items:
            $ref: '#/components/schemas/TicketFormStatusObject'
          maxItems: 1
    TicketFormStatusesUpdateParams:
      type: object
      properties:
        _destroy:
          type: string
          description: If set to a value of \"1\" and an id value is passed, the server will delete the record
        custom_status_id:
          type: integer
        id:
          type: string
      example:
        _destroy: "1"
        custom_status_id: 12345
        id: abcdef
    TicketFormsResponse:
      type: object
      properties:
        ticket_forms:
          type: array
          items:
            $ref: '#/components/schemas/TicketFormObject'
    TicketImportInput:
      type: object
      properties:
        assignee_id:
          type: integer
          description: The agent currently assigned to the ticket
        comments:
          type: array
          description: The conversation between requesters, collaborators, and agents
          items:
            allOf:
              - type: object
                properties:
                  value:
                    type: string
                    description: The comment string value
              - $ref: '#/components/schemas/TicketCommentObject'
          additionalProperties: true
        description:
          type: string
          description: Read-only first comment on the ticket. When [creating a ticket](#create-ticket), use `comment` to set the description. See [Description and first comment](#description-and-first-comment)
        requester_id:
          type: integer
          description: The user who requested this ticket
        subject:
          type: string
          description: The value of the subject field for this ticket
        tags:
          type: array
          description: The array of tags applied to this ticket
          items:
            type: string
    TicketImportRequest:
      type: object
      properties:
        ticket:
          $ref: '#/components/schemas/TicketImportInput'
    TicketMergeInput:
      type: object
      properties:
        ids:
          type: array
          description: Ids of tickets to merge into the target ticket
          items:
            type: integer
        source_comment:
          type: string
          description: Private comment to add to the source ticket
        source_comment_is_public:
          type: boolean
          description: Whether comment in source tickets are public or private
        target_comment:
          type: string
          description: Private comment to add to the target ticket
        target_comment_is_public:
          type: boolean
          description: Whether comment in target ticket is public or private
      required:
        - ids
    TicketMetricEventBaseObject:
      title: Ticket Metric Events
      type: object
      properties:
        id:
          type: integer
          description: Automatically assigned when the record is created
          readOnly: true
        instance_id:
          type: integer
          description: The instance of the metric associated with the event. See [instance_id](#instance_id)
          readOnly: true
        metric:
          type: string
          description: The metric being tracked
          enum:
            - agent_work_time
            - pausable_update_time
            - periodic_update_time
            - reply_time
            - requester_wait_time
            - resolution_time
            - group_ownership_time
          readOnly: true
        ticket_id:
          type: integer
          description: Id of the associated ticket
          readOnly: true
        time:
          type: string
          format: date-time
          description: The time the event occurred
          readOnly: true
        type:
          type: string
          description: The type of the metric event. See [Ticket metric event types reference](/documentation/ticketing/reference-guides/ticket-metric-event-types-reference)
          enum:
            - activate
            - pause
            - fulfill
            - apply_sla
            - apply_group_sla
            - breach
            - update_status
            - measure
          readOnly: true
      example:
        id: 926256957613
        instance_id: 1
        metric: agent_work_time
        ticket_id: 155
        time: "2020-10-26T12:53:12Z"
        type: measure
    TicketMetricEventBreachObject:
      title: Ticket Metric Event
      type: object
      allOf:
        - $ref: '#/components/schemas/TicketMetricEventBaseObject'
        - type: object
          properties:
            deleted:
              type: boolean
              description: Available if `type` is `breach`. In general, you can ignore any breach event when `deleted` is true. See [deleted](#deleted)
              readOnly: true
    TicketMetricEventGroupSLAObject:
      title: Ticket Metric Event
      type: object
      allOf:
        - $ref: '#/components/schemas/TicketMetricEventBaseObject'
        - type: object
          properties:
            group_sla:
              type: object
              description: Available if `type` is "apply_group_sla". The Group SLA policy and target being enforced on the ticket and metric in question, if any. See [group_sla](#group_sla)
              readOnly: true
    TicketMetricEventSLAObject:
      title: Ticket Metric Event
      type: object
      allOf:
        - $ref: '#/components/schemas/TicketMetricEventBaseObject'
        - type: object
          properties:
            sla:
              type: object
              description: Available if `type` is `apply_sla`. The SLA policy and target being enforced on the ticket and metric in question, if any. See [sla](#sla)
              readOnly: true
    TicketMetricEventUpdateStatusObject:
      title: Ticket Metric Event
      type: object
      allOf:
        - $ref: '#/components/schemas/TicketMetricEventBaseObject'
        - type: object
          properties:
            status:
              type: object
              description: Available if `type` is `update_status`. Minutes since the metric has been open. See [status](#status)
              readOnly: true
    TicketMetricEventsResponse:
      type: object
      allOf:
        - type: object
          properties:
            ticket_metric_events:
              type: array
              items:
                $ref: '#/components/schemas/TicketMetricEventBaseObject'
        - type: object
          properties:
            count:
              type: integer
            end_time:
              type: integer
            next_page:
              type: string
    TicketMetricObject:
      type: object
      properties:
        agent_wait_time_in_minutes:
          type: object
          description: Number of minutes the agent spent waiting during calendar and business hours
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        assigned_at:
          type: string
          format: date-time
          description: When the ticket was assigned
          readOnly: true
        assignee_stations:
          type: integer
          description: Number of assignees the ticket had
          readOnly: true
        assignee_updated_at:
          type: string
          format: date-time
          description: When the assignee last updated the ticket
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When the record was created
          readOnly: true
        custom_status_updated_at:
          type: string
          format: date-time
          description: The date and time the ticket's custom status was last updated
          readOnly: true
        first_resolution_time_in_minutes:
          type: object
          description: Number of minutes to the first resolution time during calendar and business hours
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        full_resolution_time_in_minutes:
          type: object
          description: Number of minutes to the full resolution during calendar and business hours
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        group_stations:
          type: integer
          description: Number of groups the ticket passed through
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when the client is created
          readOnly: true
        initially_assigned_at:
          type: string
          format: date-time
          description: When the ticket was initially assigned
          readOnly: true
        latest_comment_added_at:
          type: string
          format: date-time
          description: When the latest comment was added
          readOnly: true
        on_hold_time_in_minutes:
          type: object
          description: Number of minutes on hold
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        reopens:
          type: integer
          description: Total number of times the ticket was reopened
          readOnly: true
        replies:
          type: integer
          description: The number of public replies added to a ticket by an agent
          readOnly: true
        reply_time_in_minutes:
          type: object
          description: Number of minutes to the first reply during calendar and business hours
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        reply_time_in_seconds:
          type: object
          description: Number of seconds to the first reply during calendar hours, only available for Messaging tickets
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        requester_updated_at:
          type: string
          format: date-time
          description: When the requester last updated the ticket
          readOnly: true
        requester_wait_time_in_minutes:
          type: object
          description: Number of minutes the requester spent waiting during calendar and business hours
          allOf:
            - $ref: '#/components/schemas/TicketMetricTimeObject'
          readOnly: true
        solved_at:
          type: string
          format: date-time
          description: When the ticket was solved
          readOnly: true
        status_updated_at:
          type: string
          format: date-time
          description: When the status of the ticket was last updated
          readOnly: true
        ticket_id:
          type: integer
          description: Id of the associated ticket
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When the record was last updated
          readOnly: true
        url:
          type: string
          description: The API url of the ticket metric
          readOnly: true
      example:
        agent_wait_time_in_minutes:
          business: 737
          calendar: 2391
        assigned_at: "2011-05-05T10:38:52Z"
        assignee_stations: 1
        assignee_updated_at: "2011-05-06T10:38:52Z"
        created_at: "2009-07-20T22:55:29Z"
        custom_status_updated_at: "2011-05-09T10:38:52Z"
        first_resolution_time_in_minutes:
          business: 737
          calendar: 2391
        full_resolution_time_in_minutes:
          business: 737
          calendar: 2391
        group_stations: 7
        id: 33
        initially_assigned_at: "2011-05-03T10:38:52Z"
        latest_comment_added_at: "2011-05-09T10:38:52Z"
        on_hold_time_in_minutes:
          business: 637
          calendar: 2290
        reopens: 55
        replies: 322
        reply_time_in_minutes:
          business: 737
          calendar: 2391
        reply_time_in_seconds:
          calendar: 143460
        requester_updated_at: "2011-05-07T10:38:52Z"
        requester_wait_time_in_minutes:
          business: 737
          calendar: 2391
        solved_at: "2011-05-09T10:38:52Z"
        status_updated_at: "2011-05-04T10:38:52Z"
        ticket_id: 4343
        updated_at: "2011-05-05T10:38:52Z"
    TicketMetricTimeObject:
      type: object
      properties:
        business:
          type: integer
          description: Time in business hours
          readOnly: true
        calendar:
          type: integer
          description: Time in calendar hours
          readOnly: true
    TicketMetricsByTicketMetricIdResponse:
      type: object
      properties:
        ticket_metric:
          type: array
          items:
            $ref: '#/components/schemas/TicketMetricObject'
    TicketMetricsResponse:
      type: object
      properties:
        ticket_metrics:
          type: array
          items:
            $ref: '#/components/schemas/TicketMetricObject'
    TicketObject:
      type: object
      properties:
        allow_attachments:
          type: boolean
          description: Permission for agents to add add attachments to a comment. Defaults to true
          readOnly: true
        allow_channelback:
          type: boolean
          description: Is false if channelback is disabled, true otherwise. Only applicable for channels framework ticket
          readOnly: true
        assignee_email:
          type: string
          description: Write only. The email address of the agent to assign the ticket to
          writeOnly: true
        assignee_id:
          type: integer
          description: The agent currently assigned to the ticket
        attribute_value_ids:
          type: array
          description: Write only. An array of the IDs of attribute values to be associated with the ticket
          items:
            type: integer
          writeOnly: true
        brand_id:
          type: integer
          description: The id of the brand this ticket is associated with. See [Setting up multiple brands](https://support.zendesk.com/hc/en-us/articles/4408829476378)
        collaborator_ids:
          type: array
          description: The ids of users currently CC'ed on the ticket
          items:
            type: integer
        collaborators:
          type: array
          description: POST requests only. Users to add as cc's when creating a ticket. See [Setting Collaborators](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#setting-collaborators)
          items:
            $ref: '#/components/schemas/CollaboratorObject'
        comment:
          type: object
          description: Write only. An object that adds a comment to the ticket. See [Ticket comments](/api-reference/ticketing/tickets/ticket_comments/). To include an attachment with the comment, see [Attaching files](/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#attaching-files). A ticket can contain up to 5000 comments in total, including both public and private comments. Once this limit is reached, any additional attempts to add comments results in a 422 error. The ticket can still be updated in other ways, provided that no new comments are added.
          writeOnly: true
        created_at:
          type: string
          format: date-time
          description: When this record was created
          readOnly: true
        custom_fields:
          type: array
          description: Custom fields for the ticket. See [Setting custom field values](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#setting-custom-field-values)
          items:
            type: object
            properties:
              id:
                type: integer
                description: The id of the custom field
              value:
                type: string
                description: The value of the custom field
        custom_status_id:
          type: integer
          description: The custom ticket status id of the ticket. See [custom ticket statuses](#custom-ticket-statuses)
        description:
          type: string
          description: |
            Read-only first comment on the ticket. When [creating a ticket](#create-ticket), use `comment` to set the description. See [Description and first comment](#description-and-first-comment)
          readOnly: true
        due_at:
          type: string
          format: date-time
          description: If this is a ticket of type "task" it has a due date.  Due date format uses [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format
          nullable: true
        email_cc_ids:
          type: array
          description: The ids of agents or end users currently CC'ed on the ticket. See [CCs and followers resources](https://support.zendesk.com/hc/en-us/articles/360020585233) in the Support Help Center
          items:
            type: integer
        email_ccs:
          type: object
          description: Write only. An array of objects that represent agent or end users email CCs to add or delete from the ticket. See [Setting email CCs](/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-email-ccs)
          writeOnly: true
        external_id:
          type: string
          description: An id you can use to link Zendesk Support tickets to local records
        follower_ids:
          type: array
          description: The ids of agents currently following the ticket. See [CCs and followers resources](https://support.zendesk.com/hc/en-us/articles/360020585233)
          items:
            type: integer
        followers:
          type: object
          description: Write only. An array of objects that represent agent followers to add or delete from the ticket. See [Setting followers](/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-followers)
          writeOnly: true
        followup_ids:
          type: array
          description: The ids of the followups created from this ticket. Ids are only visible once the ticket is closed
          items:
            type: integer
          readOnly: true
        forum_topic_id:
          type: integer
          description: The topic in the Zendesk Web portal this ticket originated from, if any. The Web portal is deprecated
          readOnly: true
        from_messaging_channel:
          type: boolean
          description: If true, the ticket's [via type](/documentation/ticketing/reference-guides/via-object-reference/) is a messaging channel.
          readOnly: true
        generated_timestamp:
          type: integer
          description: A Unix timestamp that represents the most accurate reading of when this record was last updated. It is updated for all ticket updates, including system updates
          readOnly: true
        group_id:
          type: integer
          description: The group this ticket is assigned to
        has_incidents:
          type: boolean
          description: Is true if a ticket is a problem type and has one or more incidents linked to it. Otherwise, the value is false.
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when the ticket is created
          readOnly: true
        is_public:
          type: boolean
          description: Is true if any comments are public, false otherwise
          readOnly: true
        macro_id:
          type: integer
          description: Write only. A macro ID to be recorded in the ticket audit
          writeOnly: true
        macro_ids:
          type: array
          description: POST requests only. List of macro IDs to be recorded in the ticket audit
          items:
            type: integer
        metadata:
          type: object
          description: Write only. Metadata for the audit. In the `audit` object, the data is specified in the `custom` property of the `metadata` object. See [Setting Metadata](/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-metadata)
          writeOnly: true
        organization_id:
          type: integer
          description: The organization of the requester. You can only specify the ID of an organization associated with the requester. See [Organization Memberships](/api-reference/ticketing/organizations/organization_memberships/)
        priority:
          type: string
          description: The urgency with which the ticket should be addressed
          enum:
            - urgent
            - high
            - normal
            - low
        problem_id:
          type: integer
          description: For tickets of type "incident", the ID of the problem the incident is linked to
        raw_subject:
          type: string
          description: |
            The dynamic content placeholder, if present, or the "subject" value, if not. See [Dynamic Content Items](/api-reference/ticketing/ticket-management/dynamic_content/)
        recipient:
          type: string
          description: The original recipient e-mail address of the ticket. Notification emails for the ticket are sent from this address
        requester:
          type: object
          description: Write only. See [Creating a ticket with a new requester](/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#creating-a-ticket-with-a-new-requester)
          writeOnly: true
        requester_id:
          type: integer
          description: The user who requested this ticket
        safe_update:
          type: boolean
          description: Write only. Optional boolean. When true and an `update_stamp` date is included, protects against ticket update collisions and returns a message to let you know if one occurs. See [Protecting against ticket update collisions](/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#protecting-against-ticket-update-collisions). A value of false has the same effect as true. Omit the property to force the updates to not be safe
          writeOnly: true
        satisfaction_rating:
          type: object
          description: The satisfaction rating of the ticket, if it exists, or the state of satisfaction, "offered" or "unoffered". The value is null for plan types that don't support CSAT
          additionalProperties: true
          readOnly: true
        sharing_agreement_ids:
          type: array
          description: The ids of the sharing agreements used for this ticket
          items:
            type: integer
        status:
          type: string
          description: |
            The state of the ticket.

            If your account has activated custom ticket statuses, this is the ticket's
            status category. See [custom ticket statuses](#custom-ticket-statuses)
          enum:
            - new
            - open
            - pending
            - hold
            - solved
            - closed
        subject:
          type: string
          description: |
            The value of the subject field for this ticket. See [Subject](/api-reference/ticketing/tickets/tickets/#subject)
        submitter_id:
          type: integer
          description: The user who submitted the ticket. The submitter always becomes the author of the first comment on the ticket
        tags:
          type: array
          description: The array of tags applied to this ticket. Unless otherwise specified, the [set tag](/api-reference/ticketing/ticket-management/tags/#set-tags) behavior is used, which overwrites and replaces existing tags
          items:
            type: string
        ticket_form_id:
          type: integer
          description: Enterprise only. The id of the ticket form to render for the ticket
        type:
          type: string
          description: The type of this ticket
          enum:
            - problem
            - incident
            - question
            - task
        updated_at:
          type: string
          format: date-time
          description: When this record last got updated. It is updated only if the update generates a [ticket event](#incremental-ticket-event-export)
          readOnly: true
        updated_stamp:
          type: string
          description: Write only. Datetime of last update received from API. See the `safe_update` property
          writeOnly: true
        url:
          type: string
          description: The API url of this ticket
          readOnly: true
        via:
          type: object
          description: For more information, see the [Via object reference](/documentation/ticketing/reference-guides/via-object-reference)
          properties:
            channel:
              type: string
              description: |
                This tells you how the ticket or event was created. Examples: "web", "mobile", "rule", "system"
            source:
              type: object
              description: |
                For some channels a source object gives more information about how or why the ticket or event was created
              additionalProperties: true
        via_followup_source_id:
          type: integer
          description: POST requests only. The id of a closed ticket when creating a follow-up ticket. See [Creating a follow-up ticket](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#creating-a-follow-up-ticket)
        via_id:
          type: integer
          description: Write only. For more information, see the [Via object reference](/documentation/ticketing/reference-guides/via-object-reference/)
          writeOnly: true
        voice_comment:
          type: object
          description: Write only. See [Creating voicemail ticket](/api-reference/voice/talk-partner-edition-api/reference/#creating-voicemail-tickets)
          writeOnly: true
      example:
        assignee_id: 235323
        collaborator_ids:
          - 35334
          - 234
        created_at: "2009-07-20T22:55:29Z"
        custom_fields:
          - id: 27642
            value: "745"
          - id: 27648
            value: "yes"
        custom_status_id: 123
        description: The fire is very colorful.
        due_at: null
        external_id: ahg35h3jh
        follower_ids:
          - 35334
          - 234
        from_messaging_channel: false
        generated_timestamp: 1304553600
        group_id: 98738
        has_incidents: false
        id: 35436
        organization_id: 509974
        priority: high
        problem_id: 9873764
        raw_subject: '{{dc.printer_on_fire}}'
        recipient: support@company.com
        requester_id: 20978392
        satisfaction_rating:
          comment: Great support!
          id: 1234
          score: good
        sharing_agreement_ids:
          - 84432
        status: open
        subject: Help, my printer is on fire!
        submitter_id: 76872
        tags:
          - enterprise
          - other_tag
        type: incident
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/tickets/35436.json
        via:
          channel: web
      required:
        - requester_id
    TicketRelatedInformation:
      type: object
      properties:
        followup_source_ids:
          type: array
          items:
            type: string
            description: Sources to follow up
        from_archive:
          type: boolean
          description: Is true if the current ticket is archived
        incidents:
          type: integer
          description: A count of related incident occurrences
        jira_issue_ids:
          type: array
          items:
            type: string
            description: Associated jira issues
        topic_id:
          type: string
          description: Related topic in the Web portal (deprecated feature)
          nullable: true
    TicketResponse:
      type: object
      properties:
        ticket:
          $ref: '#/components/schemas/TicketObject'
    TicketSkipCreation:
      type: object
      properties:
        skip:
          $ref: '#/components/schemas/TicketSkipObject'
    TicketSkipObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: Time the skip was created
          readOnly: true
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        reason:
          type: string
          description: Reason for skipping the ticket
          readOnly: true
        ticket:
          type: object
          description: The skipped ticket. See the [Ticket object reference](/api-reference/ticketing/tickets/tickets/#json-format)
          allOf:
            - $ref: '#/components/schemas/TicketObject'
        ticket_id:
          type: integer
          description: ID of the skipped ticket
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: Time the skip was last updated
          readOnly: true
        user_id:
          type: integer
          description: ID of the skipping agent
          readOnly: true
      example:
        created_at: "2015-09-30T21:44:03Z"
        id: 1
        reason: I have no idea.
        ticket:
          assignee_id: 235323
          collaborator_ids:
            - 35334
            - 234
          created_at: "2009-07-20T22:55:29Z"
          custom_fields:
            - id: 27642
              value: "745"
            - id: 27648
              value: "yes"
          description: The fire is very colorful.
          due_at: null
          external_id: ahg35h3jh
          follower_ids:
            - 35334
            - 234
          from_messaging_channel: false
          generated_timestamp: 1304553600
          group_id: 98738
          has_incidents: false
          id: 123
          organization_id: 509974
          priority: high
          problem_id: 9873764
          raw_subject: '{{dc.printer_on_fire}}'
          recipient: support@company.com
          requester_id: 20978392
          satisfaction_rating:
            comment: Great support!
            id: 1234
            score: good
          sharing_agreement_ids:
            - 84432
          status: open
          subject: Help, my printer is on fire!
          submitter_id: 76872
          tags:
            - enterprise
            - other_tag
          type: incident
          updated_at: "2011-05-05T10:38:52Z"
          url: https://company.zendesk.com/api/v2/tickets/35436.json
          via:
            channel: web
        ticket_id: 123
        updated_at: "2015-09-30T21:44:03Z"
        user_id: 456
    TicketSkipsResponse:
      type: object
      properties:
        skips:
          type: array
          items:
            $ref: '#/components/schemas/TicketSkipObject'
    TicketUpdateInput:
      type: object
      properties:
        additional_collaborators:
          type: array
          description: An array of numeric IDs, emails, or objects containing name and email properties. See [Setting Collaborators](/api-reference/ticketing/tickets/tickets/#setting-collaborators). An email notification is sent to them when the ticket is updated
          items:
            $ref: '#/components/schemas/CollaboratorObject'
        assignee_email:
          type: string
          format: email
          description: The email address of the agent to assign the ticket to
        assignee_id:
          type: integer
          description: The agent currently assigned to the ticket
        attribute_value_ids:
          type: array
          description: An array of the IDs of attribute values to be associated with the ticket
          items:
            type: integer
        collaborator_ids:
          type: array
          description: The ids of users currently CC'ed on the ticket
          items:
            type: integer
        comment:
          $ref: '#/components/schemas/TicketCommentObject'
        custom_fields:
          type: array
          description: Custom fields for the ticket. See [Setting custom field values](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#setting-custom-field-values)
          items:
            $ref: '#/components/schemas/CustomFieldObject'
        custom_status_id:
          type: integer
          description: The custom ticket status id of the ticket. See [custom ticket statuses](#custom-ticket-statuses)
        due_at:
          type: string
          format: date-time
          description: If this is a ticket of type "task" it has a due date.  Due date format uses [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
          nullable: true
        email_ccs:
          type: array
          description: An array of objects that represent agent or end users email CCs to add or delete from the ticket. See [Setting email CCs](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#setting-email-ccs)
          items:
            $ref: '#/components/schemas/EmailCCObject'
        external_id:
          type: string
          description: An id you can use to link Zendesk Support tickets to local records
        followers:
          type: array
          description: An array of objects that represent agent followers to add or delete from the ticket. See [Setting followers](/documentation/ticketing/managing-tickets/creating-and-updating-tickets#setting-followers)
          items:
            $ref: '#/components/schemas/FollowerObject'
        group_id:
          type: integer
          description: The group this ticket is assigned to
        organization_id:
          type: integer
          description: The organization of the requester. You can only specify the ID of an organization associated with the requester. See [Organization Memberships](/api-reference/ticketing/organizations/organization_memberships/)
        priority:
          type: string
          description: The urgency with which the ticket should be addressed.
          enum:
            - urgent
            - high
            - normal
            - low
        problem_id:
          type: integer
          description: For tickets of type "incident", the ID of the problem the incident is linked to
        requester_id:
          type: integer
          description: The user who requested this ticket
        safe_update:
          type: boolean
          description: Optional boolean. Prevents updates with outdated ticket data (`updated_stamp` property required when true)
        sharing_agreement_ids:
          type: array
          description: An array of the numeric IDs of sharing agreements. Note that this replaces any existing agreements
          items:
            type: integer
        status:
          type: string
          description: |
            The state of the ticket.

            If your account has activated custom ticket statuses, this is the ticket's
            status category. See [custom ticket statuses](#custom-ticket-statuses).
          enum:
            - new
            - open
            - pending
            - hold
            - solved
            - closed
        subject:
          type: string
          description: The value of the subject field for this ticket
        tags:
          type: array
          description: The array of tags applied to this ticket
          items:
            type: string
        type:
          type: string
          description: The type of this ticket.
          enum:
            - problem
            - incident
            - question
            - task
        updated_stamp:
          type: string
          format: date-time
          description: Datetime of last update received from API. See the safe_update property
      example:
        comment:
          body: The smoke is very colorful.
        priority: urgent
        subject: My printer is on fire!
    TicketUpdateRequest:
      type: object
      properties:
        ticket:
          $ref: '#/components/schemas/TicketUpdateInput'
    TicketUpdateResponse:
      type: object
      properties:
        audit:
          $ref: '#/components/schemas/AuditObject'
        ticket:
          $ref: '#/components/schemas/TicketObject'
    TicketsCreateRequest:
      type: object
      properties:
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketCreateInput'
    TicketsResponse:
      type: object
      properties:
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketObject'
    TimeBasedExportIncrementalTicketsResponse:
      type: object
      description: |
        See [Tickets](/api-reference/ticketing/tickets/tickets/) for a detailed example.
      properties:
        count:
          type: integer
        end_of_stream:
          type: boolean
        end_time:
          type: integer
        next_page:
          type: string
          nullable: true
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/TicketObject'
      example:
        count: 2
        end_of_stream: true
        end_time: 1390362485
        next_page: https://{subdomain}.zendesk.com/api/v2/incremental/tickets.json?per_page=3&start_time=1390362485
        tickets:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 35436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    TimeBasedExportIncrementalUsersResponse:
      type: object
      properties:
        count:
          type: integer
        end_of_stream:
          type: boolean
        end_time:
          type: integer
        next_page:
          type: string
          nullable: true
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserObject'
      example:
        count: 1
        end_of_stream: true
        end_time: 1601357503
        next_page: https://example.zendesk.com/api/v2/incremental/ticket_events.json?start_time=1601357503
        users:
          - active: true
            alias: Mr. Johnny
            created_at: "2009-07-20T22:55:29Z"
            custom_role_id: 9373643
            details: ""
            email: johnny@example.com
            external_id: sai989sur98w9
            id: 35436
            last_login_at: "2011-05-05T10:38:52Z"
            locale: en-US
            locale_id: 1
            moderator: true
            name: Johnny Agent
            notes: Johnny is a nice guy!
            only_private_comments: false
            organization_id: 57542
            phone: "+15551234567"
            photo:
              content_type: image/png
              content_url: https://company.zendesk.com/photos/my_funny_profile_pic.png
              id: 928374
              name: my_funny_profile_pic.png
              size: 166144
              thumbnails:
                - content_type: image/png
                  content_url: https://company.zendesk.com/photos/my_funny_profile_pic_thumb.png
                  id: 928375
                  name: my_funny_profile_pic_thumb.png
                  size: 58298
            restricted_agent: true
            role: agent
            role_type: 0
            shared: false
            shared_agent: false
            signature: Have a nice day, Johnny
            suspended: true
            tags:
              - enterprise
              - other_tag
            ticket_restriction: assigned
            time_zone: Copenhagen
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/users/35436.json
            user_fields:
              user_date: "2012-07-23T00:00:00Z"
              user_decimal: 5.1
              user_dropdown: option_1
            verified: true
    TrialAccountObject:
      type: object
      properties:
        name:
          type: string
          description: The name of the account
        subdomain:
          type: string
          description: The subdomain of the account
        url:
          type: string
          description: The URL of the account
    TrialAccountResponse:
      type: object
      properties:
        account:
          $ref: '#/components/schemas/TrialAccountObject'
    TriggerActionDefinitionObject:
      type: object
      properties:
        group:
          type: string
        nullable:
          type: boolean
        repeatable:
          type: boolean
        subject:
          type: string
        title:
          type: string
        type:
          type: string
        values:
          type: array
          items:
            type: object
            properties:
              enabled:
                type: boolean
              title:
                type: string
              value:
                type: string
    TriggerActionDiffObject:
      type: object
      properties:
        field:
          type: array
          description: An array of [change](#change) objects.
          items:
            $ref: '#/components/schemas/TriggerChangeObject'
        value:
          type: array
          description: An array of [change](#change) objects.
          items:
            $ref: '#/components/schemas/TriggerChangeObject'
      example:
        field:
          - change: +
            content: solved
        value:
          - change: '-'
            content: open
    TriggerActionObject:
      type: object
      properties:
        field:
          type: string
        value:
          oneOf:
            - type: string
            - type: integer
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: integer
      example:
        field: status
        value: solved
    TriggerBatchRequest:
      type: object
      properties:
        active:
          type: boolean
        category_id:
          type: string
        id:
          type: string
        position:
          type: integer
          format: int64
      required:
        - id
    TriggerBulkUpdateItem:
      type: object
      properties:
        active:
          type: boolean
          description: The active status of the ticket trigger (true or false)
        category_id:
          type: string
          description: The ID of the new category the ticket trigger is to be moved to
        id:
          type: integer
          description: The ID of the ticket trigger to update
        position:
          type: integer
          description: The new position of the ticket trigger
      example:
        active: true
        category_id: "10026"
        id: 25
        position: 8
      required:
        - id
    TriggerBulkUpdateRequest:
      type: object
      properties:
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/TriggerBulkUpdateItem'
    TriggerCategoriesResponse:
      type: object
      properties:
        trigger_categories:
          type: array
          items:
            type: object
            anyOf:
              - $ref: '#/components/schemas/TriggerCategoryRuleCounts'
            allOf:
              - $ref: '#/components/schemas/TriggerCategory'
    TriggerCategory:
      type: object
      properties:
        created_at:
          type: string
          readOnly: true
        id:
          type: string
          readOnly: true
        name:
          type: string
        position:
          type: integer
          format: int64
        updated_at:
          type: string
          readOnly: true
    TriggerCategoryBatchRequest:
      type: object
      properties:
        id:
          type: string
        position:
          type: integer
          format: int64
      required:
        - id
        - position
    TriggerCategoryId:
      type: string
    TriggerCategoryRequest:
      type: object
      properties:
        name:
          type: string
        position:
          type: integer
          format: int64
    TriggerCategoryRequestRequired:
      type: object
      required:
        - name
    TriggerCategoryResponse:
      type: object
      properties:
        trigger_category:
          $ref: '#/components/schemas/TriggerCategory'
    TriggerCategoryRuleCounts:
      type: object
      properties:
        active_count:
          type: integer
          format: int64
        inactive_count:
          type: integer
          format: int64
    TriggerChangeObject:
      type: object
      properties:
        change:
          type: string
          description: One of `-`, `+`, `=` representing the type of change
        content:
          description: The value of the item it represents
          oneOf:
            - type: boolean
            - type: string
            - type: integer
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: integer
                  - type: boolean
      example:
        change: +
        content: solved
    TriggerConditionDefinitionObjectAll:
      type: object
      properties:
        group:
          type: string
        nullable:
          type: boolean
        operators:
          type: array
          items:
            type: object
            properties:
              terminal:
                type: boolean
              title:
                type: string
              value:
                type: string
        repeatable:
          type: boolean
        subject:
          type: string
        title:
          type: string
        type:
          type: string
        values:
          type: array
          items:
            type: object
            properties:
              enabled:
                type: boolean
              title:
                type: string
              value:
                type: string
    TriggerConditionDefinitionObjectAny:
      type: object
      properties:
        group:
          type: string
        nullable:
          type: boolean
        operators:
          type: array
          items:
            type: object
            properties:
              terminal:
                type: boolean
              title:
                type: string
              value:
                type: string
        repeatable:
          type: boolean
        subject:
          type: string
        title:
          type: string
        type:
          type: string
    TriggerConditionDiffObject:
      type: object
      properties:
        field:
          type: array
          description: An array of [change](#change) objects
          items:
            $ref: '#/components/schemas/TriggerChangeObject'
        operator:
          type: array
          description: An array of [change](#change) objects
          items:
            $ref: '#/components/schemas/TriggerChangeObject'
        value:
          type: array
          description: An array of [change](#change) objects
          items:
            $ref: '#/components/schemas/TriggerChangeObject'
      example:
        field:
          - change: =
            content: status
        operator:
          - change: =
            content: less_than
        value:
          - change: +
            content: solved
    TriggerConditionObject:
      type: object
      properties:
        field:
          type: string
        operator:
          type: string
        value:
          oneOf:
            - type: string
            - type: integer
            - type: array
              items:
                oneOf:
                  - type: string
                  - type: integer
      example:
        field: status
        operator: less_than
        value: solved
    TriggerConditionsDiffObject:
      type: object
      properties:
        all:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionDiffObject'
          nullable: true
        any:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionDiffObject'
          nullable: true
    TriggerConditionsObject:
      type: object
      description: An object that describes the circumstances under which the trigger performs its actions. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      properties:
        all:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionObject'
          nullable: true
        any:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionObject'
          nullable: true
      example:
        all:
          - field: status
            operator: less_than
            value: solved
          - field: assignee_id
            operator: is
            value: "296220096"
          - field: custom_status_id
            operator: includes
            value:
              - "1"
              - "2"
        any:
          - field: status
            operator: less_than
            value: solved
          - field: custom_status_id
            operator: includes
            value:
              - "1"
              - "2"
    TriggerDefinitionObject:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/TriggerActionDefinitionObject'
        conditions_all:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionDefinitionObjectAll'
        conditions_any:
          type: array
          items:
            $ref: '#/components/schemas/TriggerConditionDefinitionObjectAny'
    TriggerDefinitionResponse:
      type: object
      properties:
        definitions:
          $ref: '#/components/schemas/TriggerDefinitionObject'
    TriggerObject:
      type: object
      properties:
        actions:
          type: array
          description: An array of actions describing what the ticket trigger will do. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
          items:
            $ref: '#/components/schemas/TriggerActionObject'
        active:
          type: boolean
          description: Whether the ticket trigger is active
        category_id:
          type: string
          description: The ID of the category the ticket trigger belongs to
        conditions:
          $ref: '#/components/schemas/TriggerConditionsObject'
        created_at:
          type: string
          description: The time the ticket trigger was created
          readOnly: true
        default:
          type: boolean
          description: If true, the ticket trigger is a standard trigger
          readOnly: true
        description:
          type: string
          description: The description of the ticket trigger
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        position:
          type: integer
          description: Position of the ticket trigger, determines the order they will execute in
        raw_title:
          type: string
          description: The raw format of the title of the ticket trigger
        title:
          type: string
          description: The title of the ticket trigger
        updated_at:
          type: string
          description: The time of the last update of the ticket trigger
          readOnly: true
        url:
          type: string
          description: The url of the ticket trigger
          readOnly: true
      example:
        actions:
          - {}
        active: true
        category_id: "10026"
        conditions: {}
        created_at: "2012-09-25T22:50:26Z"
        default: false
        description: Close and save a ticket
        id: 25
        position: 8
        raw_title: Close and Save
        title: Close and Save
        updated_at: "2012-09-25T22:50:26Z"
        url: http://{subdomain}.zendesk.com/api/v2/triggers/25.json
      required:
        - conditions
        - actions
        - title
    TriggerResponse:
      type: object
      properties:
        trigger:
          $ref: '#/components/schemas/TriggerObject'
    TriggerRevisionResponse:
      type: object
      properties:
        trigger_revision:
          type: object
          properties:
            author_id:
              type: integer
            created_at:
              type: string
            id:
              type: integer
            snapshot:
              type: object
              properties:
                actions:
                  type: array
                  items:
                    $ref: '#/components/schemas/TriggerActionObject'
                active:
                  type: boolean
                conditions:
                  $ref: '#/components/schemas/TriggerConditionsObject'
                description:
                  type: string
                  nullable: true
                title:
                  type: string
            url:
              type: string
    TriggerRevisionsResponse:
      type: object
      properties:
        after_cursor:
          type: string
        after_url:
          type: string
        before_cursor:
          type: string
        before_url:
          type: string
        count:
          type: integer
        trigger_revisions:
          type: array
          items:
            type: object
            properties:
              author_id:
                type: integer
              created_at:
                type: string
              diff:
                type: object
                properties:
                  actions:
                    type: array
                    description: An array that contain [action diff objects](#Action Diffs)
                    items:
                      $ref: '#/components/schemas/TriggerActionDiffObject'
                  active:
                    type: array
                    description: An array of [change](#change) objects
                    items:
                      $ref: '#/components/schemas/TriggerChangeObject'
                  conditions:
                    $ref: '#/components/schemas/TriggerConditionDiffObject'
                  description:
                    type: array
                    description: An array of [change](#change) objects
                    items:
                      $ref: '#/components/schemas/TriggerChangeObject'
                  source_id:
                    type: integer
                    description: ID of the source revision
                  target_id:
                    type: integer
                    description: ID of the target revision
                  title:
                    type: array
                    description: An array of [change](#change) objects
                    items:
                      $ref: '#/components/schemas/TriggerChangeObject'
              id:
                type: integer
              snapshot:
                $ref: '#/components/schemas/TriggerSnapshotObject'
              url:
                type: string
    TriggerSnapshotObject:
      type: object
      properties:
        actions:
          type: array
          description: An array of [Actions](#actions) describing what the ticket trigger will do
          items:
            $ref: '#/components/schemas/TriggerActionObject'
        active:
          type: boolean
          description: Whether the ticket trigger is active
        conditions:
          $ref: '#/components/schemas/TriggerConditionsObject'
        description:
          type: string
          description: The description of the ticket trigger
          nullable: true
        title:
          type: string
          description: The title of the ticket trigger
      example:
        actions: []
        active: true
        conditions: {}
        description: Notifies requester that a comment was updated
        title: Notify requester of comment update
    TriggerWithCategoryRequest:
      type: object
      properties:
        trigger:
          allOf:
            - $ref: '#/components/schemas/TriggerObject'
            - anyOf:
                - $ref: '#/components/schemas/TriggerCategory'
                - $ref: '#/components/schemas/TriggerCategoryId'
    TriggersResponse:
      type: object
      properties:
        count:
          type: integer
        next_page:
          type: string
          nullable: true
        previous_page:
          type: string
          nullable: true
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/TriggerObject'
    TwitterChannelObject:
      title: Monitored X handles
      type: object
      properties:
        allow_reply:
          type: boolean
          description: If replies are allowed for this handle
          readOnly: true
        avatar_url:
          type: string
          description: The profile image url of the handle
          readOnly: true
        brand_id:
          type: integer
          description: What brand the handle is associated with
          readOnly: true
        can_reply:
          type: boolean
          description: If replies are allowed for this handle
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: The time the handle was created
          readOnly: true
        id:
          type: integer
          description: Automatically assigned upon creation
          readOnly: true
        name:
          type: string
          description: The profile name of the handle
          readOnly: true
        screen_name:
          type: string
          description: The X handle
          readOnly: true
        twitter_user_id:
          type: integer
          description: The country's code
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the handle
          readOnly: true
      example:
        created_at: "2009-05-13T00:07:08Z"
        id: 211
        screen_name: '@zendesk'
        twitter_user_id: 67462376832
        updated_at: "2011-07-22T00:11:12Z"
      required:
        - id
        - screen_name
        - twitter_user_id
    TwitterChannelResponse:
      type: object
      properties:
        monitored_twitter_handle:
          $ref: '#/components/schemas/TwitterChannelObject'
    TwitterChannelTwicketStatusResponse:
      type: object
      properties:
        statuses:
          type: array
          items:
            type: object
            properties:
              favorited:
                type: boolean
              id:
                type: integer
              retweeted:
                type: boolean
              user_followed:
                type: boolean
    TwitterChannelsResponse:
      type: object
      properties:
        monitored_twitter_handles:
          type: array
          items:
            $ref: '#/components/schemas/TwitterChannelObject'
    UpdateResourceResult:
      type: object
      properties:
        action:
          type: string
          description: |
            the action the job attempted (`"action": "update"`)
        id:
          type: integer
          description: the id of the resource the job attempted to update
        status:
          type: string
          description: |
            the status (`"status": "Updated"`)
        success:
          type: boolean
          description: |
            whether the action was successful or not (`"success": true`)
      required:
        - id
        - action
        - success
        - status
    UpdateTicketFormStatusesParams:
      type: object
      properties:
        ticket_form_status:
          type: array
          items:
            $ref: '#/components/schemas/TicketFormStatusesUpdateParams'
      required:
        - ticket_form_status
    UrlObject:
      type: object
      properties:
        url:
          type: string
          readOnly: true
    UserCreateInput:
      type: object
      properties:
        custom_role_id:
          type: integer
        email:
          type: string
        external_id:
          type: string
        identities:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              value:
                type: string
            required:
              - type
              - value
        name:
          type: string
        organization:
          type: object
          properties:
            name:
              type: string
          required:
            - name
        organization_id:
          type: integer
        role:
          type: string
      required:
        - name
        - email
    UserFieldObject:
      type: object
      allOf:
        - $ref: '#/components/schemas/CustomFieldObject'
      example:
        active: true
        created_at: "2012-10-16T16:04:06Z"
        description: Description of Custom Field
        id: 7
        key: custom_field_1
        position: 9999
        raw_description: '{{dc.my_description}}'
        raw_title: Custom Field 1
        regexp_for_validation: null
        title: Custom Field 1
        type: text
        updated_at: "2012-10-16T16:04:06Z"
        url: https://company.zendesk.com/api/v2/user_fields/7.json
    UserFieldResponse:
      type: object
      properties:
        user_field:
          $ref: '#/components/schemas/UserFieldObject'
    UserFieldsResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total count of records retrieved
          readOnly: true
        next_page:
          type: string
          description: URL of the next page
          nullable: true
          readOnly: true
        previous_page:
          type: string
          description: URL of the previous page
          nullable: true
          readOnly: true
        user_fields:
          type: array
          items:
            $ref: '#/components/schemas/UserFieldObject'
    UserForAdmin:
      title: Users
      type: object
      properties:
        active:
          type: boolean
          description: false if the user has been deleted
          readOnly: true
        alias:
          type: string
          description: An alias displayed to end users
        chat_only:
          type: boolean
          description: Whether or not the user is a chat-only agent
          readOnly: true
        created_at:
          type: string
          format: datetime
          description: The time the user was created
          readOnly: true
        custom_role_id:
          type: integer
          description: A custom role if the user is an agent on the Enterprise plan or above
          nullable: true
        default_group_id:
          type: integer
          description: The id of the user's default group
        details:
          type: string
          description: Any details you want to store about the user, such as an address
        email:
          type: string
          description: The user's primary email address. *Writeable on create only. On update, a secondary email is added. See [Email Address](#email-address)
        external_id:
          type: string
          description: 'A unique identifier from another system. The API treats the id as case insensitive. Example: "ian1" and "IAN1" are the same value.'
          nullable: true
        iana_time_zone:
          type: string
          description: The time zone for the user
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when the user is created
          readOnly: true
        last_login_at:
          type: string
          format: datetime
          description: |
            Last time the user signed in to Zendesk Support or made an API request
            using an API token or basic authentication
          readOnly: true
        locale:
          type: string
          description: The user's locale. A BCP-47 compliant tag for the locale. If both "locale" and "locale_id" are present on create or update, "locale_id" is ignored and only "locale" is used.
        locale_id:
          type: integer
          description: The user's language identifier
        moderator:
          type: boolean
          description: Designates whether the user has forum moderation capabilities
        name:
          type: string
          description: The user's name
        notes:
          type: string
          description: Any notes you want to store about the user
        only_private_comments:
          type: boolean
          description: true if the user can only create private comments
        organization_id:
          type: integer
          description: The id of the user's organization. If the user has more than one [organization memberships](/api-reference/ticketing/organizations/organization_memberships/), the id of the user's default organization. If updating, see [Organization ID](#organization-id)
          nullable: true
        phone:
          type: string
          description: The user's primary phone number. See [Phone Number](#phone-number) below
          nullable: true
        photo:
          type: object
          description: The user's profile picture represented as an [Attachment](/api-reference/ticketing/tickets/ticket-attachments/) object
          additionalProperties: true
          nullable: true
        remote_photo_url:
          type: string
          description: A URL pointing to the user's profile picture.
        report_csv:
          type: boolean
          description: |
            This parameter is inert and has no effect. It may be deprecated in the
            future.

            Previously, this parameter determined whether a user could access a CSV
            report in a legacy Guide dashboard. This dashboard has been removed. See
            [Announcing Guide legacy reporting upgrade to
            Explore](https://support.zendesk.com/hc/en-us/articles/4762263171610-Announcing-Guide-legacy-reporting-upgrade-to-Explore-)
          readOnly: true
        restricted_agent:
          type: boolean
          description: If the agent has any restrictions; false for admins and unrestricted agents, true for other agents
        role:
          type: string
          description: The user's role. Possible values are "end-user", "agent", or "admin"
        role_type:
          type: integer
          description: The user's role id. 0 for a custom agent, 1 for a light agent, 2 for a chat agent, 3 for a chat agent added to the Support account as a contributor ([Chat Phase 4](https://support.zendesk.com/hc/en-us/articles/360022365373#topic_djh_1zk_4fb)), 4 for an admin, and 5 for a billing admin
          nullable: true
          readOnly: true
        shared:
          type: boolean
          description: If the user is shared from a different Zendesk Support instance. Ticket sharing accounts only
          readOnly: true
        shared_agent:
          type: boolean
          description: If the user is a shared agent from a different Zendesk Support instance. Ticket sharing accounts only
          readOnly: true
        shared_phone_number:
          type: boolean
          description: Whether the `phone` number is shared or not. See [Phone Number](#phone-number) below
          nullable: true
        signature:
          type: string
          description: The user's signature. Only agents and admins can have signatures
        suspended:
          type: boolean
          description: If the agent is suspended. Tickets from suspended users are also suspended, and these users cannot sign in to the end user portal
        tags:
          type: array
          description: The user's tags. Only present if your account has user tagging enabled
          items:
            type: string
        ticket_restriction:
          type: string
          description: 'Specifies which tickets the user has access to. Possible values are: "organization", "groups", "assigned", "requested", null. "groups" and "assigned" are valid only for agents. If you pass an invalid value to an end user (for example, "groups"), they will be assigned to "requested", regardless of their previous access'
          nullable: true
        time_zone:
          type: string
          description: The user's time zone. See [Time Zone](#time-zone)
        two_factor_auth_enabled:
          type: boolean
          description: If two factor authentication is enabled
          nullable: true
          readOnly: true
        updated_at:
          type: string
          format: datetime
          description: The time the user was last updated
          readOnly: true
        url:
          type: string
          description: The user's API url
          readOnly: true
        user_fields:
          type: object
          description: Values of custom fields in the user's profile. See [User Fields](#user-fields)
          additionalProperties: true
        verified:
          type: boolean
          description: Any of the user's identities is verified. See [User Identities](/api-reference/ticketing/users/user_identities)
      example:
        active: true
        alias: Mr. Johnny
        created_at: "2009-07-20T22:55:29Z"
        custom_role_id: 9373643
        details: ""
        email: johnny@example.com
        external_id: sai989sur98w9
        iana_time_zone: Pacific/Pago_Pago
        id: 35436
        last_login_at: "2011-05-05T10:38:52Z"
        locale: en-US
        locale_id: 1
        moderator: true
        name: Johnny Agent
        notes: Johnny is a nice guy!
        only_private_comments: false
        organization_id: 57542
        phone: "+15551234567"
        photo:
          content_type: image/png
          content_url: https://company.zendesk.com/photos/my_funny_profile_pic.png
          id: 928374
          name: my_funny_profile_pic.png
          size: 166144
          thumbnails:
            - content_type: image/png
              content_url: https://company.zendesk.com/photos/my_funny_profile_pic_thumb.png
              id: 928375
              name: my_funny_profile_pic_thumb.png
              size: 58298
        restricted_agent: true
        role: agent
        role_type: 0
        shared: false
        shared_agent: false
        signature: Have a nice day, Johnny
        suspended: true
        tags:
          - enterprise
          - other_tag
        ticket_restriction: assigned
        time_zone: Copenhagen
        updated_at: "2011-05-05T10:38:52Z"
        url: https://company.zendesk.com/api/v2/users/35436.json
        user_fields:
          user_date: "2012-07-23T00:00:00Z"
          user_decimal: 5.1
          user_dropdown: option_1
        verified: true
      required:
        - name
    UserForEndUser:
      type: object
      properties:
        created_at:
          type: string
          format: datetime
          description: The time the user was created
          readOnly: true
        email:
          type: string
          description: The primary email address of this user. If the primary email address is not [verified](https://support.zendesk.com/hc/en-us/articles/4408886752410), the secondary email address is used
        iana_time_zone:
          type: string
          description: The time zone for the user
          readOnly: true
        id:
          type: integer
          description: Automatically assigned when creating users
          readOnly: true
        locale:
          type: string
          description: The locale for this user
          readOnly: true
        locale_id:
          type: integer
          description: The language identifier for this user
        name:
          type: string
          description: The name of the user
        organization_id:
          type: integer
          description: The id of the user's organization. If the user has more than one [organization memberships](/api-reference/ticketing/organizations/organization_memberships/), the id of the user's default organization. If updating, see [Organization ID](/api-reference/ticketing/users/users/#organization-id)
        phone:
          type: string
          description: The primary phone number of this user. See [Phone Number](/api-reference/ticketing/users/users/#phone-number) in the Users API
        photo:
          type: object
          description: The user's profile picture represented as an [Attachment](/api-reference/ticketing/tickets/ticket-attachments/) object
          additionalProperties: true
        role:
          type: string
          description: 'The role of the user. Possible values: `"end-user"`, `"agent"`, `"admin"`'
        shared_phone_number:
          type: boolean
          description: Whether the `phone` number is shared or not. See [Phone Number](/api-reference/ticketing/users/users/#phone-number) in the Users API
        time_zone:
          type: string
          description: The time-zone of this user
        updated_at:
          type: string
          format: datetime
          description: The time of the last update of the user
          readOnly: true
        url:
          type: string
          description: The API url of this user
          readOnly: true
        verified:
          type: boolean
          description: Any of the user's identities is verified. See [User Identities](/api-reference/ticketing/users/user_identities)
      required:
        - name
    UserIdentitiesResponse:
      type: object
      properties:
        identities:
          type: array
          items:
            $ref: '#/components/schemas/UserIdentityObject'
    UserIdentityObject:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
          description: The time the identity was created
          readOnly: true
        deliverable_state:
          type: string
          description: Email identity type only. Indicates if Zendesk sends notifications to the email address. See [Deliverable state](#deliverable-state)
          readOnly: true
        id:
          type: integer
          description: Automatically assigned on creation
          readOnly: true
        primary:
          type: boolean
          description: If the identity is the primary identity. *Writable only when creating, not when updating. Use the [Make Identity Primary](#make-identity-primary) endpoint instead
        type:
          type: string
          description: The type of this identity
          enum:
            - email
            - twitter
            - facebook
            - google
            - phone_number
            - agent_forwarding
            - any_channel
            - foreign
            - sdk
          readOnly: true
        undeliverable_count:
          type: integer
          description: The number of times a soft-bounce response was received at that address
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: The time the identity was updated
          readOnly: true
        url:
          type: string
          description: The API url of this identity
          readOnly: true
        user_id:
          type: integer
          description: The id of the user
          readOnly: true
        value:
          type: string
          description: The identifier for this identity, such as an email address
          readOnly: true
        verified:
          type: boolean
          description: If the identity has been verified
      example:
        created_at: "2011-07-20T22:55:29Z"
        deliverable_state: deliverable
        id: 35436
        primary: true
        type: email
        updated_at: "2011-07-20T22:55:29Z"
        url: https://company.zendesk.com/api/v2/users/135/identities/35436.json
        user_id: 135
        value: someone@example.com
        verified: true
      required:
        - user_id
        - type
        - value
    UserIdentityResponse:
      type: object
      properties:
        identity:
          $ref: '#/components/schemas/UserIdentityObject'
    UserInput:
      anyOf:
        - $ref: '#/components/schemas/UserCreateInput'
        - $ref: '#/components/schemas/UserMergePropertiesInput'
        - $ref: '#/components/schemas/UserMergeByIdInput'
      additionalProperties: true
    UserMergeByIdInput:
      type: object
      properties:
        id:
          type: integer
    UserMergePropertiesInput:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
        organization_id:
          type: integer
        password:
          type: string
    UserObject:
      anyOf:
        - $ref: '#/components/schemas/UserForAdmin'
        - $ref: '#/components/schemas/UserForEndUser'
      additionalProperties: true
    UserPasswordRequirementsResponse:
      type: object
      properties:
        requirements:
          type: array
          items:
            type: string
    UserRelatedObject:
      type: object
      properties:
        assigned_tickets:
          type: integer
          description: Count of assigned tickets
        ccd_tickets:
          type: integer
          description: Count of collaborated tickets
        organization_subscriptions:
          type: integer
          description: Count of organization subscriptions
        requested_tickets:
          type: integer
          description: Count of requested tickets
    UserRelatedResponse:
      type: object
      properties:
        user_related:
          $ref: '#/components/schemas/UserRelatedObject'
    UserRequest:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/UserInput'
      required:
        - user
    UserResponse:
      type: object
      properties:
        user:
          $ref: '#/components/schemas/UserObject'
    UsersRequest:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserInput'
      required:
        - users
    UsersResponse:
      type: object
      properties:
        users:
          type: array
          items:
            $ref: '#/components/schemas/UserObject'
    ViaObject:
      type: object
      description: |
        An object explaining how the ticket was created. See the [Via object reference](/documentation/ticketing/reference-guides/via-object-reference)
      properties:
        channel:
          type: string
          description: |
            This tells you how the ticket or event was created. Examples: "web", "mobile", "rule", "system"
        source:
          type: object
          description: |
            For some channels a source object gives more information about how or why the ticket or event was created
          properties:
            from:
              type: object
              properties:
                address:
                  type: string
                  nullable: true
                id:
                  type: integer
                  nullable: true
                name:
                  type: string
                  nullable: true
                title:
                  type: string
                  nullable: true
            rel:
              type: string
              nullable: true
            to:
              type: object
              properties:
                address:
                  type: string
                name:
                  type: string
          additionalProperties: true
      example:
        channel: rule
        source:
          from:
            id: 22472716
            title: Assign to first responder
          rel: trigger
          to: {}
      readOnly: true
    ViewCountObject:
      type: object
      properties:
        active:
          type: boolean
          description: Only active views if true, inactive views if false, all views if null.
          readOnly: true
        fresh:
          type: boolean
          description: false if the cached data is stale and the system is still loading and caching new data
          readOnly: true
        pretty:
          type: string
          description: A pretty-printed text approximation of the view count
          readOnly: true
        url:
          type: string
          description: The API url of the count
          readOnly: true
        value:
          type: integer
          description: The cached number of tickets in the view. Can also be null if the system is loading and caching new data. Not to be confused with 0 tickets
          nullable: true
          readOnly: true
        view_id:
          type: integer
          description: The id of the view
          readOnly: true
    ViewCountResponse:
      type: object
      properties:
        view_count:
          $ref: '#/components/schemas/ViewCountObject'
    ViewCountsResponse:
      type: object
      properties:
        view_counts:
          type: array
          items:
            $ref: '#/components/schemas/ViewCountObject'
    ViewExportResponse:
      type: object
      properties:
        export:
          type: object
          properties:
            status:
              type: string
              readOnly: true
            view_id:
              type: integer
              readOnly: true
    ViewObject:
      type: object
      properties:
        active:
          type: boolean
          description: Whether the view is active
        conditions:
          type: object
          description: Describes how the view is constructed. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
          additionalProperties: true
        created_at:
          type: string
          format: date-time
          description: The time the view was created
          readOnly: true
        default:
          type: boolean
          description: If true, the view is a default view
          readOnly: true
        description:
          type: string
          description: The description of the view
        execution:
          type: object
          description: Describes how the view should be executed. See [Execution](#execution)
          additionalProperties: true
        id:
          type: integer
          description: Automatically assigned when created
          readOnly: true
        position:
          type: integer
          description: The position of the view
        restriction:
          type: object
          description: Who may access this account. Is null when everyone in the account can access it
          additionalProperties: true
        title:
          type: string
          description: The title of the view
        updated_at:
          type: string
          format: date-time
          description: The time the view was last updated
          readOnly: true
      example:
        active: true
        conditions:
          all:
            - field: status
              operator: less_than
              value: solved
            - field: assignee_id
              operator: is
              value: "296220096"
          any: []
        default: false
        description: View for recent tickets
        execution:
          columns:
            - id: status
              title: Status
            - id: updated
              title: Updated
            - id: 5
              title: Account
              type: text
              url: https://example.zendesk.com/api/v2/ticket_fields/5.json
          group:
            id: status
            order: desc
            title: Status
          sort:
            id: updated
            order: desc
            title: Updated
        id: 25
        position: 8
        restriction:
          id: 4
          type: User
        title: Tickets updated <12 Hours
    ViewResponse:
      type: object
      properties:
        columns:
          type: array
          items:
            type: object
            additionalProperties: true
        groups:
          type: array
          items:
            type: object
            additionalProperties: true
        rows:
          type: array
          items:
            type: object
            additionalProperties: true
        view:
          $ref: '#/components/schemas/ViewObject'
    ViewsCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    ViewsResponse:
      type: object
      properties:
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
        views:
          type: array
          items:
            $ref: '#/components/schemas/ViewObject'
    WorkspaceInput:
      type: object
      properties:
        conditions:
          $ref: '#/components/schemas/ConditionsObject'
        description:
          type: string
          description: User-defined description of this workspace's purpose
        macros:
          type: array
          items:
            type: number
        ticket_form_id:
          type: number
        title:
          type: string
          description: The title of the workspace
    WorkspaceObject:
      type: object
      properties:
        activated:
          type: boolean
          description: If true, this workspace is available for use
        apps:
          type: array
          description: The apps associated to this workspace
          items:
            type: object
            additionalProperties: true
        conditions:
          $ref: '#/components/schemas/ConditionsObject'
        created_at:
          type: string
          format: date-time
          description: The time the workspace was created
        description:
          type: string
          description: User-defined description of this workspace's purpose
        id:
          type: integer
          description: Automatically assigned upon creation
        macro_ids:
          type: array
          description: The ids of the macros associated to this workspace
          items:
            type: integer
        macros:
          type: array
          description: The ids of the macros associated to this workspace
          items:
            type: integer
        position:
          type: integer
          description: Ordering of the workspace relative to other workspaces
        prefer_workspace_app_order:
          type: boolean
          description: If true, the order of apps within the workspace will be preserved
        selected_macros:
          type: array
          description: An array of the macro objects that will be used in this workspace. See [Macros](/api-reference/ticketing/business-rules/macros/)
          items:
            $ref: '#/components/schemas/MacroObject'
        ticket_form_id:
          type: integer
          description: The id of the ticket web form associated to this workspace
        title:
          type: string
          description: The title of the workspace
        updated_at:
          type: string
          format: date-time
          description: The time of the last update of the workspace
        url:
          type: string
          description: The URL for this resource
    WorkspaceResponse:
      type: object
      allOf:
        - type: object
          properties:
            workspaces:
              type: array
              items:
                $ref: '#/components/schemas/WorkspaceObject'
        - $ref: '#/components/schemas/OffsetPaginationObject'
  parameters:
    ActivityId:
      name: activity_id
      in: path
      description: The activity ID
      required: true
      schema:
        type: integer
      example: 29183462
    ActivitySince:
      name: since
      in: query
      description: A UTC time in ISO 8601 format to return ticket activities since said date.
      schema:
        type: string
      example: "2013-04-03T16:02:46Z"
    AgentId:
      name: agent_id
      in: path
      description: ID of an agent
      required: true
      schema:
        type: integer
      examples:
        default:
          value: 385473779372
    ArchiveImmediately:
      name: archive_immediately
      in: query
      description: If `true`, any ticket created with a `closed` status bypasses the normal ticket lifecycle and will be created directly in your ticket archive
      schema:
        type: boolean
    AssigneeFieldSearchValue:
      name: name
      in: query
      description: Query string used to search assignable groups & agents in the AssigneeField
      required: true
      schema:
        type: string
      example: Johnny Agent
    AttachmentId:
      name: attachment_id
      in: path
      description: The ID of the attachment
      required: true
      schema:
        type: integer
      example: 498483
    AuditLogId:
      name: audit_log_id
      in: path
      description: The ID of the audit log
      required: true
      schema:
        type: integer
      example: 498483
    AutomationActive:
      name: active
      in: query
      description: Filter by active automations if true or inactive automations if false
      schema:
        type: boolean
      example: true
    AutomationId:
      name: automation_id
      in: path
      description: The ID of the automation
      required: true
      schema:
        type: integer
      example: 25
    AutomationInclude:
      name: include
      in: query
      description: A sideload to include in the response. See [Sideloads](#sideloads-2)
      schema:
        type: string
      example: usage_24h
    AutomationSearchQuery:
      name: query
      in: query
      description: Query string used to find all automations with matching title
      required: true
      schema:
        type: string
      example: close
    AutomationSortBy:
      name: sort_by
      in: query
      description: Possible values are "alphabetical", "created_at", "updated_at", and "position". If unspecified, the automations are sorted by relevance
      schema:
        type: string
      example: position
    AutomationSortOrder:
      name: sort_order
      in: query
      description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
      schema:
        type: string
      example: desc
    BookmarkId:
      name: bookmark_id
      in: path
      description: The ID of the bookmark
      required: true
      schema:
        type: integer
      example: 900000001111
    BrandId:
      name: brand_id
      in: path
      description: The ID of the brand
      required: true
      schema:
        type: integer
      example: 360002783572
    CommentId:
      name: comment_id
      in: path
      description: The ID of the comment
      required: true
      schema:
        type: integer
      example: 654321
    CommentIds:
      name: comment_ids
      in: query
      description: Comma-separated list of comment ids
      required: true
      schema:
        type: string
      example: 8433348111741,8433544226045,8433702508413
    Creator:
      name: creator
      in: query
      description: |
        If true, displays the `creator_user_id` and `creator_app_name` properties. If the ticket field is created
         by an app, `creator_app_name` is the name of the app and `creator_user_id` is `-1`. If the ticket field
         is not created by an app, then `creator_app_name` is null
      schema:
        type: boolean
    CustomObjectFieldKeyOrId:
      name: custom_object_field_key_or_id
      in: path
      description: The key or id of a custom object field
      required: true
      schema:
        type: string
      example: make
    CustomObjectKey:
      name: custom_object_key
      in: path
      description: The key of a custom object
      required: true
      schema:
        type: string
      example: car
    CustomObjectRecordExternalId:
      name: external_id
      in: query
      description: The external id of a custom object record
      required: true
      schema:
        type: string
      example: X90001
    CustomObjectRecordId:
      name: custom_object_record_id
      in: path
      description: The id of a custom object record
      required: true
      schema:
        type: string
      example: 01GCSJW391QVSC80GYDH7E93Q6
    CustomObjectRecordName:
      name: name
      in: query
      description: The name of a custom object record
      required: true
      schema:
        type: string
      example: boat
    CustomRoleId:
      name: custom_role_id
      in: path
      description: The ID of the custom agent role
      required: true
      schema:
        type: integer
      example: 10127
    CustomStatusId:
      name: custom_status_id
      in: path
      description: The id of the custom status
      required: true
      schema:
        type: integer
      example: 1234567
    DeletedUserId:
      name: deleted_user_id
      in: path
      description: The ID of the deleted user
      required: true
      schema:
        type: integer
      example: 35436
    DeletionScheduleId:
      name: deletion_schedule_id
      in: path
      description: The id of the deletion schedule
      required: true
      schema:
        type: integer
      example: 132828
    DynamicContentItemId:
      name: dynamic_content_item_id
      in: path
      description: The ID of the dynamic content item
      required: true
      schema:
        type: integer
      example: 47
    DynamicContentVariantId:
      name: dynammic_content_variant_id
      in: path
      description: The ID of the variant
      required: true
      schema:
        type: integer
      example: 23
    EmailNotificationsByTicketIds:
      name: ticket_ids
      in: query
      description: Comma-separated list of ticket ids
      required: true
      schema:
        type: string
      example: 35436,35437
    EmailNotificationsFilter:
      name: filter
      in: query
      description: |
        Filters the email notifications by ticket, comment, or notification id.
      schema:
        type: integer
        enum:
          - ticket_id
          - comment_id
          - notification_id
    EssentialsCardKey:
      name: object_type
      in: path
      description: |
        Essentials card type. Example: `zen:user` refers user type
      required: true
      schema:
        type: string
      example: zen:user
    ExcludeDeleted:
      name: exclude_deleted
      in: query
      description: Whether to exclude deleted entities
      schema:
        type: boolean
      example: false
    GroupId:
      name: group_id
      in: path
      description: The ID of the group
      required: true
      schema:
        type: integer
      example: 122
    GroupMembershipId:
      name: group_membership_id
      in: path
      description: The ID of the group membership
      required: true
      schema:
        type: integer
      example: 4
    GroupSLAPolicyId:
      name: group_sla_policy_id
      in: path
      description: The id of the Group SLA policy
      required: true
      schema:
        type: integer
      example: 36
    HostMapping:
      name: host_mapping
      in: query
      description: The hostmapping to a brand, if any (only admins view this key)
      required: true
      schema:
        type: string
      example: brand1.com
    IncludeStandardFields:
      name: include_standard_fields
      in: query
      description: Include standard fields if true. Exclude them if false
      schema:
        type: boolean
      example: true
    IncrementalCursor:
      name: cursor
      in: query
      description: The cursor pointer to work with for all subsequent exports after the initial request
      schema:
        type: string
    IncrementalPage:
      name: per_page
      in: query
      description: The number of records to return per page
      schema:
        type: integer
    IncrementalResource:
      name: incremental_resource
      in: path
      description: The resource requested for incremental sample export
      required: true
      schema:
        type: string
      example: tickets
    IncrementalTimeQueryParameter:
      name: unix_time
      in: query
      description: A query start time for incremental exports
      schema:
        type: integer
      example: 1383685952
    IncrementalUnixTime:
      name: start_time
      in: query
      description: 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
      required: true
      schema:
        type: integer
      example: 1332034771
    JobStatusId:
      name: job_status_id
      in: path
      description: the Id of the Job status
      required: true
      schema:
        type: string
      example: 8b726e606741012ffc2d782bcb7848fe
    LocaleId:
      name: locale_id
      in: path
      description: |
        The ID or the [BCP-47 code](https://en.wikipedia.org/wiki/IETF_language_tag) of the locale. Examples: es-419, en-us, pr-br
      required: true
      schema:
        type: string
      example: es-419
    LookupRelationshipAutocompleteFieldIdFragment:
      name: field_id
      in: query
      description: |
        The id of a lookup relationship field.  The type of field is determined
        by the `source` param
      schema:
        type: string
    LookupRelationshipAutocompleteSourceFragment:
      name: source
      in: query
      description: |
        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
      schema:
        type: string
      examples:
        organization:
          summary: A reference to an organization
          value: zen:organization
        ticket:
          summary: A reference to a ticket
          value: zen:ticket
        user:
          summary: A reference to a user
          value: zen:user
    MacroAccess:
      name: access
      in: query
      description: 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.
      schema:
        type: string
      example: personal
    MacroActive:
      name: active
      in: query
      description: Filter by active macros if true or inactive macros if false
      schema:
        type: boolean
      example: true
    MacroCategory:
      name: category
      in: query
      description: Filter macros by category
      schema:
        type: integer
      example: 25
    MacroGroupId:
      name: group_id
      in: query
      description: Filter macros by group
      schema:
        type: integer
      example: 25
    MacroId:
      name: macro_id
      in: path
      description: The ID of the macro
      required: true
      schema:
        type: integer
      example: 25
    MacroIdQuery:
      name: macro_id
      in: query
      description: The ID of the macro to replicate
      required: true
      schema:
        type: integer
      example: 25
    MacroInclude:
      name: include
      in: query
      description: A sideload to include in the response. See [Sideloads](#sideloads-2)
      schema:
        type: string
      example: usage_7d
    MacroOnlyViewable:
      name: only_viewable
      in: query
      description: If true, returns only macros that can be applied to tickets. If false, returns all macros the current user can manage. Default is false
      schema:
        type: boolean
      example: false
    MacroQuery:
      name: query
      in: query
      description: Query string used to find macros with matching titles
      required: true
      schema:
        type: string
      example: close
    MacroSearchSortBy:
      name: sort_by
      in: query
      description: Possible values are "alphabetical", "created_at", "updated_at", or "position". Defaults to alphabetical
      schema:
        type: string
      example: alphabetical
    MacroSortBy:
      name: sort_by
      in: query
      description: Possible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", "usage_7d", or "usage_30d". Defaults to alphabetical
      schema:
        type: string
      example: alphabetical
    MacroSortOrder:
      name: sort_order
      in: query
      description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
      schema:
        type: string
      example: asc
    MonitoredTwitterHandleId:
      name: monitored_twitter_handle_id
      in: path
      description: The ID of the custom agent role
      required: true
      schema:
        type: integer
      example: 431
    NotificationId:
      name: notification_id
      in: path
      description: The id of the email notification
      required: true
      schema:
        type: integer
      example: 7824075373693
    NotificationIds:
      name: ids
      in: query
      description: Comma-separated list of notification ids
      required: true
      schema:
        type: string
      example: 8433702508541,8433348111869
    ObjectKey:
      name: object_zrn_type
      in: path
      description: |
        Custom object type. Example: `zen:custom_object:car` refers to a custom object type with the
        `car` key
      required: true
      schema:
        type: string
      example: zen:custom_object:car
    OcrQueueId:
      name: queue_id
      in: path
      description: The id of the omnichannel routing queue
      required: true
      schema:
        type: string
      example: 01HG80ATNNZK1N7XRFVKX48XD6
    OrganizationExternalId:
      name: external_id
      in: query
      description: The external id of an organization
      schema:
        type: integer
      example: 1234
    OrganizationExternalIds:
      name: external_ids
      in: query
      description: A list of external ids
      schema:
        type: string
      example: 1764,42156
    OrganizationFieldId:
      name: organization_field_id
      in: path
      description: The ID or key of the organization field
      required: true
      schema:
        oneOf:
          - type: integer
          - type: string
      example: my_text_field
    OrganizationId:
      name: organization_id
      in: path
      description: The ID of an organization
      required: true
      schema:
        type: integer
      example: 16
    OrganizationIds:
      name: ids
      in: query
      description: A list of organization ids
      schema:
        type: string
      example: 35436,20057623
    OrganizationMembershipId:
      name: organization_membership_id
      in: path
      description: The ID of the organization membership
      required: true
      schema:
        type: integer
      example: 4
    OrganizationMergeId:
      name: organization_merge_id
      in: path
      description: The ID of the organization merge
      required: true
      schema:
        type: string
      example: 01HPZM6206BF4G63783E5349AD
    OrganizationName:
      name: name
      in: query
      description: The name of an organization
      schema:
        type: string
      example: ACME Incorporated
    OrganizationQueryFragment:
      name: name
      in: query
      description: A substring of an organization to search for
      required: true
      schema:
        type: string
      example: imp
    OrganizationSubscriptionId:
      name: organization_subscription_id
      in: path
      description: The ID of the organization subscription
      required: true
      schema:
        type: integer
      example: 35436
    RequestId:
      name: request_id
      in: path
      description: The ID of the request
      required: true
      schema:
        type: integer
      example: 33
    ResourceCollectionId:
      name: resource_collection_id
      in: path
      description: The id of the resource collection
      required: true
      schema:
        type: integer
      example: 10002
    SLAPolicyId:
      name: sla_policy_id
      in: path
      description: The ID of the SLA Policy
      required: true
      schema:
        type: integer
      example: 36
    SessionId:
      name: session_id
      in: path
      description: The ID of the session
      required: true
      schema:
        type: integer
      example: 14
    SharingAgreementId:
      name: sharing_agreement_id
      in: path
      description: The ID of the sharing agreement
      required: true
      schema:
        type: integer
      example: 1
    SkillBasedRoutingAttributeId:
      name: attribute_id
      in: path
      description: The ID of the skill-based routing attribute
      required: true
      schema:
        type: string
      example: 6e279587-e930-11e8-a292-09cfcdea1b75
    SkillBasedRoutingAttributeValueId:
      name: attribute_value_id
      in: path
      description: The ID of the skill-based routing attribute value
      required: true
      schema:
        type: string
      example: b376b35a-e38b-11e8-a292-e3b6377c5575
    SkipTicketUserId:
      name: user_id
      in: path
      description: User ID of an agent
      required: true
      schema:
        type: integer
      example: 35436
    Sort:
      name: sort
      in: query
      description: The field to sort the list.  Possible values are "created_at", "updated_at" (ascending order) or "-created_at", "-updated_at" (descending order)
      schema:
        type: string
      example: updated_at
    Subdomain:
      name: subdomain
      in: query
      description: Subdomain for a given Zendesk account address
      required: true
      schema:
        type: string
      example: Brand1
    SupportAddressId:
      name: support_address_id
      in: path
      description: The ID of the support address
      required: true
      schema:
        type: integer
      example: 33
    SuspendedTicketId:
      name: id
      in: path
      description: id of the suspended ticket
      required: true
      schema:
        type: number
      example: 35436
    SuspendedTicketIds:
      name: ids
      in: query
      description: A list of suspended ticket ids
      schema:
        type: string
      example: 3436,3437
    SuspendedTicketsDeleteIds:
      name: ids
      in: query
      description: A comma separated list of ids of suspended tickets to delete.
      required: true
      schema:
        type: string
      example: 94,141
    SuspendedTicketsRecoverIds:
      name: ids
      in: query
      description: A comma separated list of ids of suspended tickets to recover.
      required: true
      schema:
        type: string
      example: 14,77
    SuspendedTicketsSortBy:
      name: sort_by
      in: query
      description: The field to sort the suspended tickets by. One of "author_email", "cause", "created_at", or "subject"
      schema:
        type: string
      example: author_email
    SuspendedTicketsSortOrder:
      name: sort_order
      in: query
      description: The order in which to sort the suspended tickets.  This can take value `asc` or `desc`.
      schema:
        type: string
      example: asc
    TagNameFragment:
      name: name
      in: query
      description: A substring of a tag to search for
      schema:
        type: string
      example: att
    TargetFailureId:
      name: target_failure_id
      in: path
      description: The ID of the target failure
      required: true
      schema:
        type: integer
      example: 1
    TargetId:
      name: target_id
      in: path
      description: The ID of the target
      required: true
      schema:
        type: integer
      example: 211
    TicketAuditId:
      name: ticket_audit_id
      in: path
      description: The ID of the ticket audit
      required: true
      schema:
        type: integer
      example: 2127301143
    TicketCommentId:
      name: ticket_comment_id
      in: path
      description: The ID of the ticket comment
      required: true
      schema:
        type: integer
      example: 35436
    TicketFieldId:
      name: ticket_field_id
      in: path
      description: The ID of the ticket field
      required: true
      schema:
        type: integer
      example: 34
    TicketFieldOptionId:
      name: ticket_field_option_id
      in: path
      description: The ID of the ticket field option
      required: true
      schema:
        type: integer
      example: 10001
    TicketFormId:
      name: ticket_form_id
      in: path
      description: The ID of the ticket form
      required: true
      schema:
        type: integer
      example: 47
    TicketFormStatusId:
      name: ticket_form_status_id
      in: path
      description: The id of the ticket form status
      required: true
      schema:
        type: string
      example: abcdef
    TicketId:
      name: ticket_id
      in: path
      description: The ID of the ticket
      required: true
      schema:
        type: integer
      example: 123456
    TicketIds:
      name: ids
      in: query
      description: Comma-separated list of ticket ids
      required: true
      schema:
        type: string
      example: 35436,35437
    TicketSortBy:
      name: sort_by
      in: query
      description: Sort by
      schema:
        type: string
        enum:
          - id
          - subject
          - deleted_at
    TicketSortOrder:
      name: sort_order
      in: query
      description: Sort order. Defaults to "asc"
      schema:
        type: string
        enum:
          - asc
          - desc
    TriggerActive:
      name: active
      in: query
      description: Filter by active triggers if true or inactive triggers if false
      schema:
        type: boolean
      example: true
    TriggerCategoryId:
      name: category_id
      in: query
      description: Filter triggers by category ID
      schema:
        type: string
      example: "10026"
    TriggerId:
      name: trigger_id
      in: path
      description: The ID of the trigger
      required: true
      schema:
        type: integer
      example: 198
    TriggerIds:
      name: ids
      in: query
      description: A comma separated list of trigger IDs
      required: true
      schema:
        type: string
      example: 131,178,938
    TriggerInclude:
      name: include
      in: query
      description: A sideload to include in the response. See [Sideloads](#sideloads-2)
      schema:
        type: string
      example: usage_24h
    TriggerRevisionId:
      name: trigger_revision_id
      in: path
      description: The ID of the revision for a particular trigger
      required: true
      schema:
        type: integer
      example: 1
    TriggerSearchFilter:
      name: filter
      in: query
      description: Trigger attribute filters for the search. See [Filter](#filter)
      schema:
        type: object
        properties:
          json:
            $ref: '#/components/schemas/TriggerObject'
    TriggerSearchQuery:
      name: query
      in: query
      description: Query string used to find all triggers with matching title
      required: true
      schema:
        type: string
      example: important_trigger
    TriggerSort:
      name: sort
      in: query
      description: Cursor-based pagination only. Possible values are "alphabetical", "created_at", "updated_at", or "position".
      schema:
        type: string
      example: position
    TriggerSortBy:
      name: sort_by
      in: query
      description: Offset pagination only. Possible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d". Defaults to "position"
      schema:
        type: string
      example: position
    TriggerSortOrder:
      name: sort_order
      in: query
      description: One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
      schema:
        type: string
      example: desc
    UserExternalIdFilter:
      name: external_id
      in: query
      description: List users by external id. External id has to be unique for each user under the same account.
      schema:
        type: string
      example: abc
    UserFieldId:
      name: user_field_id
      in: path
      description: The ID or key of the user field
      required: true
      schema:
        oneOf:
          - type: integer
          - type: string
      example: my_text_field
    UserFieldOptionId:
      name: user_field_option_id
      in: path
      description: The ID of the user field option
      required: true
      schema:
        type: integer
      example: 10001
    UserId:
      name: user_id
      in: path
      description: The id of the user
      required: true
      schema:
        type: integer
      example: 35436
    UserIdentityId:
      name: user_identity_id
      in: path
      description: The ID of the user identity
      required: true
      schema:
        type: integer
      example: 77938
    UserPermissionSetFilter:
      name: permission_set
      in: query
      description: For custom roles which is available on the Enterprise plan and above. You can only filter by one role ID per request
      schema:
        type: integer
      example: 123
    UserRoleFilter:
      name: role
      in: query
      description: |
        Filters the results by role. Possible values are "end-user", "agent", or "admin"
      schema:
        type: string
        enum:
          - end-user
          - agent
          - admin
      example: agent
    UserRolesFilter:
      name: role[]
      in: query
      description: |
        Filters the results by more than one role using the format `role[]={role}&role[]={role}`
      explode: true
      schema:
        type: string
      example: agent
    ViewId:
      name: view_id
      in: path
      description: The ID of the view
      required: true
      schema:
        type: integer
      example: 25
    WorkspaceId:
      name: workspace_id
      in: path
      description: The id of the workspace
      required: true
      schema:
        type: integer
      example: 3133
  examples:
    AccountSettingsResponseExample:
      value:
        settings:
          active_features:
            agent_forwarding: false
            allow_ccs: true
            allow_email_template_customization: true
            automatic_answers: false
            bcc_archiving: false
            benchmark_opt_out: false
            business_hours: false
            chat: false
            chat_about_my_ticket: false
            csat_reason_code: false
            custom_dkim_domain: true
            customer_context_as_default: false
            customer_satisfaction: false
            dynamic_contents: false
            explore: true
            explore_on_support_ent_plan: false
            explore_on_support_pro_plan: false
            facebook: false
            facebook_login: false
            fallback_composer: false
            forum_analytics: true
            good_data_and_explore: false
            google_login: false
            is_abusive: false
            light_agents: false
            markdown: false
            on_hold_status: false
            organization_access_enabled: true
            rich_content_in_emails: true
            sandbox: false
            satisfaction_prediction: false
            suspended_ticket_notification: false
            ticket_forms: true
            ticket_tagging: true
            topic_suggestion: false
            twitter: true
            twitter_login: false
            user_org_fields: true
            user_tagging: true
            voice: true
          agents:
            agent_home: false
            agent_workspace: false
            aw_self_serve_migration_enabled: true
            focus_mode: false
            idle_timeout_enabled: false
            unified_agent_statuses: false
          api:
            accepted_api_agreement: true
            api_password_access: "true"
            api_token_access: "true"
          apps:
            create_private: true
            create_public: false
            use: true
          billing:
            backend: zuora
          branding:
            favicon_url: null
            header_color: 78A300
            header_logo_url: null
            page_background_color: "333333"
            tab_background_color: 7FA239
            text_color: FFFFFF
          brands:
            default_brand_id: 1873
            require_brand_on_new_tickets: false
          cdn:
            cdn_provider: default
            fallback_cdn_provider: cloudfront
            hosts:
              - name: default
                url: https://p18.zdassets.com
              - name: cloudfront
                url: https://d2y9oszrd3dhjh.cloudfront.net
          chat:
            available: true
            enabled: false
            integrated: true
            maximum_request_count: 1
            welcome_message: Hi there. How can I help today?
          cross_sell:
            show_chat_tooltip: true
            xsell_source: null
          email:
            accept_wildcard_emails: false
            custom_dkim_domain: false
            email_sender_authentication: true
            email_sender_authentication_profile: enhanced
            email_template_photos: true
            email_template_section: false
            gmail_actions: true
            modern_email_template: true
            no_mail_delimiter: true
            personalized_replies: true
            send_gmail_messages_via_gmail: true
          google_apps:
            has_google_apps: false
            has_google_apps_admin: false
          groups:
            check_group_name_uniqueness: true
          limits:
            attachment_size: 52428800
          localization:
            locale_ids:
              - 1042
          lotus:
            pod_id: 999
            prefer_lotus: true
            reporting: true
          metrics:
            account_size: 100-399
          onboarding:
            checklist_onboarding_version: 2
            onboarding_segments: null
            product_sign_up: null
          routing:
            autorouting_tag: ""
            enabled: false
            max_email_capacity: 0
            max_messaging_capacity: 0
          rule:
            macro_most_used: true
            macro_order: alphabetical
            skill_based_filtered_views: []
            using_skill_based_routing: false
          side_conversations:
            email_channel: false
            msteams_channel: false
            show_in_context_panel: false
            slack_channel: false
            tickets_channel: false
          statistics:
            forum: true
            rule_usage: true
            search: true
          ticket_form:
            raw_ticket_forms_instructions: Please choose your issue below
            ticket_forms_instructions: Please choose your issue below
          tickets:
            accepted_new_collaboration_tos: false
            agent_collision: true
            agent_invitation_enabled: true
            agent_ticket_deletion: false
            allow_group_reset: true
            assign_default_organization: true
            assign_tickets_upon_solve: true
            auto_translation_enabled: false
            auto_updated_ccs_followers_rules: false
            chat_sla_enablement: false
            collaboration: true
            comments_public_by_default: true
            default_solved_ticket_reassignment_strategy: legacy
            email_attachments: false
            emoji_autocompletion: true
            follower_and_email_cc_collaborations: false
            has_color_text: true
            is_first_comment_private_enabled: true
            light_agent_email_ccs_allowed: false
            list_empty_views: true
            list_newest_comments_first: true
            markdown_ticket_comments: false
            maximum_personal_views_to_list: 8
            modern_ticket_reassignment: false
            private_attachments: false
            rich_text_comments: true
            show_modern_ticket_reassignment: false
            status_hold: false
            tagging: true
            using_skill_based_routing: false
          twitter:
            shorten_url: optional
          user:
            agent_created_welcome_emails: true
            end_user_phone_number_validation: false
            have_gravatars_enabled: true
            language_selection: true
            multiple_organizations: false
            tagging: true
            time_zone_selection: true
          voice:
            agent_confirmation_when_forwarding: true
            agent_wrap_up_after_calls: true
            enabled: true
            logging: true
            maximum_queue_size: 5
            maximum_queue_wait_time: 1
            only_during_business_hours: false
            outbound_enabled: true
            recordings_public: true
            uk_mobile_forwarding: true
    ActivitiesCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    ActivitiesResponseExample:
      value:
        activities:
          - actor:
              active: true
              alias: ""
              created_at: "2020-11-17T00:32:12Z"
              custom_role_id: null
              default_group_id: 1873
              details: ""
              email: cgoddard+ted@zendesk.com
              external_id: null
              iana_time_zone: America/Juneau
              id: 158488612
              last_login_at: "2020-11-17T00:33:44Z"
              locale: en-gb
              locale_id: 5
              moderator: true
              name: Tedd
              notes: ""
              only_private_comments: false
              organization_id: null
              phone: null
              photo: null
              report_csv: true
              restricted_agent: false
              role: admin
              role_type: null
              shared: false
              shared_agent: false
              shared_phone_number: null
              signature: ""
              suspended: false
              tags: []
              ticket_restriction: null
              time_zone: Alaska
              two_factor_auth_enabled: null
              updated_at: "2020-11-17T00:34:38Z"
              url: https://example.zendesk.com/api/v2/users/158488612.json
              user_fields:
                its_remember_september: null
                skittles: null
                user_field_1: null
              verified: true
            actor_id: 158488612
            created_at: "2020-11-17T00:34:40Z"
            id: 29183462
            object:
              ticket:
                id: 1521
                subject: test
            target:
              ticket:
                id: 1521
                subject: test
            title: 'Tedd assigned ticket #1521 to you.'
            updated_at: "2020-11-17T00:34:40Z"
            url: https://example.zendesk.com/api/v2/activities/29183462.json
            user:
              active: true
              alias: test
              created_at: "2017-08-14T20:13:53Z"
              custom_role_id: null
              default_group_id: 1873
              details: ""
              email: user@zendesk.com
              external_id: oev7jj
              iana_time_zone: Pacific/Pago_Pago
              id: 3343
              last_login_at: "2020-11-16T22:57:45Z"
              locale: en-gb
              locale_id: 5
              moderator: true
              name: Samwise Gamgee
              notes: test
              only_private_comments: false
              organization_id: 1873
              phone: null
              photo:
                content_type: image/gif
                content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
                deleted: false
                file_name: 1f84950b8d7949b3.gif
                height: 80
                id: 8730791
                inline: false
                mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
                size: 4566
                thumbnails:
                  - content_type: image/gif
                    content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                    deleted: false
                    file_name: 1f84950b8d7949b3_thumb.gif
                    height: 32
                    id: 8730801
                    inline: false
                    mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                    size: 1517
                    url: https://example.zendesk.com/api/v2/attachments/8730801.json
                    width: 32
                url: https://example.zendesk.com/api/v2/attachments/8730791.json
                width: 80
              report_csv: true
              restricted_agent: false
              role: admin
              role_type: null
              shared: false
              shared_agent: false
              shared_phone_number: null
              signature: test
              suspended: false
              tags:
                - "101"
              ticket_restriction: null
              time_zone: American Samoa
              two_factor_auth_enabled: null
              updated_at: "2020-11-17T00:33:55Z"
              url: https://example.zendesk.com/api/v2/users/3343.json
              user_fields:
                its_remember_september: null
                skittles: "2018-09-14T00:00:00+00:00"
                user_field_1: "101"
              verified: true
            user_id: 3343
            verb: tickets.assignment
        actors:
          - active: true
            alias: ""
            created_at: "2020-11-17T00:32:12Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: cgoddard+ted@zendesk.com
            external_id: null
            iana_time_zone: America/Juneau
            id: 158488612
            last_login_at: "2020-11-17T00:33:44Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Tedd
            notes: ""
            only_private_comments: false
            organization_id: null
            phone: null
            photo: null
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: ""
            suspended: false
            tags: []
            ticket_restriction: null
            time_zone: Alaska
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:34:38Z"
            url: https://example.zendesk.com/api/v2/users/158488612.json
            user_fields:
              its_remember_september: null
              skittles: null
              user_field_1: null
            verified: true
        count: 1
        next_page: null
        previous_page: null
        users:
          - active: true
            alias: test
            created_at: "2017-08-14T20:13:53Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: user@zendesk.com
            external_id: oev7jj
            iana_time_zone: Pacific/Pago_Pago
            id: 3343
            last_login_at: "2020-11-16T22:57:45Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Samwise Gamgee
            notes: test
            only_private_comments: false
            organization_id: 1873
            phone: null
            photo:
              content_type: image/gif
              content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              deleted: false
              file_name: 1f84950b8d7949b3.gif
              height: 80
              id: 8730791
              inline: false
              mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              size: 4566
              thumbnails:
                - content_type: image/gif
                  content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  deleted: false
                  file_name: 1f84950b8d7949b3_thumb.gif
                  height: 32
                  id: 8730801
                  inline: false
                  mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  size: 1517
                  url: https://example.zendesk.com/api/v2/attachments/8730801.json
                  width: 32
              url: https://example.zendesk.com/api/v2/attachments/8730791.json
              width: 80
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: test
            suspended: false
            tags:
              - "101"
            ticket_restriction: null
            time_zone: American Samoa
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:33:55Z"
            url: https://example.zendesk.com/api/v2/users/3343.json
            user_fields:
              its_remember_september: null
              skittles: "2018-09-14T00:00:00+00:00"
              user_field_1: "101"
            verified: true
    ActivityResponseExample:
      value:
        activity:
          actor:
            active: true
            alias: ""
            created_at: "2020-11-17T00:32:12Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: cgoddard+ted@zendesk.com
            external_id: null
            iana_time_zone: America/Juneau
            id: 158488612
            last_login_at: "2020-11-17T00:33:44Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Tedd
            notes: ""
            only_private_comments: false
            organization_id: null
            phone: null
            photo: null
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: ""
            suspended: false
            tags: []
            ticket_restriction: null
            time_zone: Alaska
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:34:38Z"
            url: https://example.zendesk.com/api/v2/users/158488612.json
            user_fields:
              its_remember_september: null
              skittles: null
              user_field_1: null
            verified: true
          actor_id: 158488612
          created_at: "2020-11-17T00:34:40Z"
          id: 29183462
          object:
            ticket:
              id: 1521
              subject: test
          target:
            ticket:
              id: 1521
              subject: test
          title: 'Tedd assigned ticket #1521 to you.'
          updated_at: "2020-11-17T00:34:40Z"
          url: https://example.zendesk.com/api/v2/activities/29183462.json
          user:
            active: true
            alias: test
            created_at: "2017-08-14T20:13:53Z"
            custom_role_id: null
            default_group_id: 1873
            details: ""
            email: user@zendesk.com
            external_id: oev7jj
            iana_time_zone: Pacific/Pago_Pago
            id: 3343
            last_login_at: "2020-11-16T22:57:45Z"
            locale: en-gb
            locale_id: 5
            moderator: true
            name: Samwise Gamgee
            notes: test
            only_private_comments: false
            organization_id: 1873
            phone: null
            photo:
              content_type: image/gif
              content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              deleted: false
              file_name: 1f84950b8d7949b3.gif
              height: 80
              id: 8730791
              inline: false
              mapped_content_url: https://example.zendesk.com/system/photos/8730791/1f84950b8d7949b3.gif
              size: 4566
              thumbnails:
                - content_type: image/gif
                  content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  deleted: false
                  file_name: 1f84950b8d7949b3_thumb.gif
                  height: 32
                  id: 8730801
                  inline: false
                  mapped_content_url: https://example.zendesk.com/system/photos/8730801/1f84950b8d7949b3_thumb.gif
                  size: 1517
                  url: https://example.zendesk.com/api/v2/attachments/8730801.json
                  width: 32
              url: https://example.zendesk.com/api/v2/attachments/8730791.json
              width: 80
            report_csv: true
            restricted_agent: false
            role: admin
            role_type: null
            shared: false
            shared_agent: false
            shared_phone_number: null
            signature: test
            suspended: false
            tags:
              - "101"
            ticket_restriction: null
            time_zone: American Samoa
            two_factor_auth_enabled: null
            updated_at: "2020-11-17T00:33:55Z"
            url: https://example.zendesk.com/api/v2/users/3343.json
            user_fields:
              its_remember_september: null
              skittles: "2018-09-14T00:00:00+00:00"
              user_field_1: "101"
            verified: true
          user_id: 3343
          verb: tickets.assignment
    AddTagsByObjectIdResponseExample:
      value:
        tags:
          - urgent
          - printer
          - fire
          - paper
    AssigneeFieldAssignableGroupAgentsResponseExample:
      value:
        agents:
          - avatar_url: https://z3n-example.zendesk.com/system/photos/900005192023/my_profile.png
            id: 6473829100
            name: Joe Smith
          - avatar_url: https://z3n-example.zendesk.com/system/photos/412005192023/my_profile.png
            id: 9182736400
            name: Jane Doe
          - avatar_url: https://z3n-example.zendesk.com/system/photos/887005192023/my_profile.png
            id: 1928373460
            name: Cookie Monster
        count: 3
        next_page: null
        previous_page: null
    AssigneeFieldAssignableGroupsAndAgentsSearchResponseExample:
      value:
        agents:
          - group: Tech
            group_id: 6574839201
            id: 8392017465
            name: Sam Technologist
            photo_url: https://z3n-example.zendesk.com/system/photos/410305192023/my_profile.png
        count: 2
        groups:
          - id: 6574839201
            name: Tech
    AssigneeFieldAssignableGroupsResponseExample:
      value:
        count: 3
        groups:
          - description: Engineering
            id: 9182736455
            name: Group for Bugs for Engineering
          - description: Product
            id: 1928374655
            name: Group for feature requests
          - description: Customer Support
            id: 5519283746
            name: Group for customer inquiries
        next_page: null
        previous_page: null
    AttachmentResponseExample:
      value:
        attachment:
          content_type: application/binary
          content_url: https://company.zendesk.com/attachments/myfile.dat
          file_name: myfile.dat
          id: 498483
          size: 2532
          thumbnails: []
          url: https://company.zendesk.com/api/v2/attachments/498483.json
    AttachmentUpdateRequestExample:
      value:
        attachment:
          malware_access_override: true
    AttachmentUploadResponseExample:
      value:
        upload:
          attachment:
            content_type: image/png
            content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
            deleted: false
            file_name: crash.png
            height: "62"
            id: 1503729607981
            inline: false
            mapped_content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
            size: 5172
            thumbnails: []
            url: https://company.zendesk.com/api/v2/attachments/1503729607981.json
            width: "80"
          attachments:
            - content_type: image/png
              content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
              deleted: false
              file_name: crash.png
              height: "62"
              id: 1503729607981
              inline: false
              mapped_content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=crash.png
              size: 5172
              thumbnails: []
              url: https://company.zendesk.com/api/v2/attachments/1503729607981.json
              width: "80"
          token: LXJdriewLBP8JrtzzkN7Ne4k6
    AuditLogResponseExample:
      value:
        audit_log:
          action: update
          actor_id: 1234
          actor_name: Sameer Patel
          change_description: Role changed from Administrator to End User
          created_at: "2012-03-05T11:32:44Z"
          id: 498483
          ip_address: 209.119.38.228
          source_id: 3456
          source_label: John Doe
          source_type: user
          url: https://company.zendesk.com/api/v2/audit_logs/498483.json
    AuditLogsResponseExample:
      value:
        audit_logs:
          - action: update
            actor_id: 1234
            actor_name: Sameer Patel
            change_description: Role changed from Administrator to End User
            created_at: "2012-03-05T11:32:44Z"
            id: 498483
            ip_address: 209.119.38.228
            source_id: 3456
            source_label: John Doe
            source_type: user
            url: https://company.zendesk.com/api/v2/audit_logs/498483.json
    AutocompleteOrganizationsResponseExample:
      value:
        count: 2
        next_page: null
        organizations:
          - created_at: "2018-11-14T00:14:52Z"
            details: caterpillar =)
            domain_names:
              - remain.com
            external_id: null
            group_id: 1835962
            id: 35436
            name: Important Customers
            notes: donkey
            organization_fields:
              datepudding: "2018-11-04T00:00:00+00:00"
              org_field_1: happy happy
              org_field_2: teapot_kettle
            shared_comments: false
            shared_tickets: false
            tags:
              - smiley
              - teapot_kettle
            updated_at: "2018-11-14T00:54:22Z"
            url: https://example.zendesk.com/api/v2/organizations/4112492.json
          - created_at: "2017-08-14T20:13:52Z"
            details: test
            domain_names:
              - test.com
            external_id: null
            group_id: null
            id: 20057623
            name: Imperial College
            notes: ""
            organization_fields:
              datepudding: "2018-11-02T00:00:00+00:00"
              org_field_1: malarky
              org_field_2: teapot_kettle
            shared_comments: false
            shared_tickets: false
            tags:
              - teapot_kettle
            updated_at: "2019-05-16T01:27:46Z"
            url: https://example.zendesk.com.com/api/v2/organizations/1873.json
        previous_page: null
    AutomationCreateResponseExample:
      value:
        automation:
          actions:
            - field: priority
              value: high
          active: true
          conditions:
            all:
              - field: status
                operator: is
                value: open
              - field: priority
                operator: less_than
                value: high
            any: []
          id: 9873843
          position: 8
          raw_title: Roger Wilco
          title: Roger Wilco
    AutomationResponseExample:
      value:
        automation:
          actions:
            - field: status
              value: open
            - field: assignee_id
              value: "296220096"
          active: true
          conditions:
            all:
              - field: status
                operator: less_than
                value: solved
              - field: assignee_id
                operator: is
                value: "296220096"
            any:
              - field: current_tags
                operator: includes
                value: hello
          id: 25
          position: 8
          raw_title: Close and Save
          title: Close and Save
    AutomationsResponseExample:
      value:
        automations:
          - actions:
              - field: status
                value: open
              - field: assignee_id
                value: "296220096"
            active: true
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: current_tags
                  operator: includes
                  value: hello
            id: 25
            position: 8
            raw_title: Close and Save
            title: Close and Save
          - actions:
              - field: status
                value: open
              - field: assignee_id
                value: "296220096"
            active: false
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: current_tags
                  operator: includes
                  value: hello
            id: 26
            position: 9
            raw_title: '{{dc.assign_priority_tag}}'
            title: Assign priority tag
        count: 2
        next_page: null
        previous_page: null
    AutomationsSearchResponseExample:
      value:
        automations:
          - actions:
              - field: status
                value: open
              - field: assignee_id
                value: "296220096"
            active: true
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: current_tags
                  operator: includes
                  value: hello
            id: 25
            position: 9
            raw_title: Close and Save
            title: Close and Save
          - actions:
              - field: status
                value: open
              - field: assignee_id
                value: "296220096"
            active: true
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: current_tags
                  operator: includes
                  value: hello
            id: 28
            position: 9
            raw_title: '{{dc.close_and_redirect}}'
            title: Close and redirect to topics
        count: 2
        next_page: null
        previous_page: null
    AutomationsUpdateManyResponseExample:
      value:
        automations:
          - actions:
              - field: status
                value: open
              - field: assignee_id
                value: "296220096"
            active: true
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: current_tags
                  operator: includes
                  value: hello
            id: 25
            position: 15
            raw_title: Close and Save
            title: Close and Save
          - actions:
              - field: status
                value: open
              - field: assignee_id
                value: "296220096"
            active: false
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: current_tags
                  operator: includes
                  value: hello
            id: 26
            position: 8
            raw_title: '{{dc.assign_priority_tag}}'
            title: Assign priority tag
        count: 2
        next_page: null
        previous_page: null
    BookmarkCreateRequest:
      value:
        bookmark:
          ticket_id: 113
    BookmarkResponse:
      value:
        bookmark:
          created_at: "2020-10-01T08:33:45Z"
          id: 900000009567
          ticket:
            id: 123
            priority: high
            raw_subject: Chat with Visitor 19785128
            requester_id: 156
            subject: Chat with Visitor 19785128
            url: https://{subdomain}.zendesk.com/api/v2/tickets/123.json
          url: https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001111.json
    BookmarksResponse:
      value:
        bookmarks:
          - created_at: "2020-10-01T08:33:45Z"
            id: 900000009567
            ticket:
              id: 123
              priority: high
              raw_subject: Chat with Visitor 19785128
              requester_id: 165
              subject: Chat with Visitor 19785128
              url: https://{subdomain}.zendesk.com/api/v2/tickets/123.json
            url: https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001111.json
          - created_at: "2020-09-11T10:22:45Z"
            id: 900000009568
            ticket:
              id: 123
              priority: high
              raw_subject: Chat with Visitor 19785128
              requester_id: 156
              subject: Chat with Visitor 19785128
              url: https://{subdomain}.zendesk.com/api/v2/tickets/123.json
            url: https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001112.json
        count: 1
        next_page: null
        previous_page: null
    BrandCreateRequestExample:
      value:
        brand:
          name: Brand 1
          subdomain: Brand1
    BrandResponseExample:
      value:
        brand:
          active: true
          brand_url: https://brand1.zendesk.com
          created_at: "2019-08-06T02:43:39Z"
          default: true
          has_help_center: true
          help_center_state: enabled
          host_mapping: brand1.com
          id: 360002783572
          is_deleted: false
          logo:
            content_type: image/png
            content_url: https://company.zendesk.com/logos/brand1_logo.png
            file_name: brand1_logo.png
            id: 928374
            mapped_content_url: https://company.com/logos/brand1_logo.png
            size: 166144
            thumbnails:
              - content_type: image/png
                content_url: https://company.zendesk.com/photos/brand1_logo_thumb.png
                file_name: brand1_logo_thumb.png
                id: 928375
                mapped_content_url: https://company.com/photos/brand1_logo_thumb.png
                size: 58298
                url: https://company.zendesk.com/api/v2/attachments/928375.json
              - content_type: image/png
                content_url: https://company.zendesk.com/photos/brand1_logo_small.png
                file_name: brand1_logo_small.png
                id: 928376
                mapped_content_url: https://company.com/photos/brand1_logo_small.png
                size: 58298
                url: https://company.zendesk.com/api/v2/attachments/928376.json
            url: https://company.zendesk.com/api/v2/attachments/928374.json
          name: Brand 1
          signature_template: '{{agent.signature}}'
          subdomain: hello-world
          ticket_form_ids:
            - 360000660811
          updated_at: "2019-08-06T02:43:40Z"
          url: https://company.zendesk.com/api/v2/brands/360002783572.json
    BrandUpdateRequestExample:
      value:
        brand:
          active: true
          host_mapping: brand1.com
          name: Brand 1
          subdomain: Brand1
    BrandsResponseExample:
      value:
        brands:
          - active: true
            brand_url: https://brand1.zendesk.com
            created_at: "2019-08-06T02:43:39Z"
            default: true
            has_help_center: true
            help_center_state: enabled
            host_mapping: brand1.com
            id: 360002783572
            is_deleted: false
            logo:
              content_type: image/png
              content_url: https://company.zendesk.com/logos/brand1_logo.png
              file_name: brand1_logo.png
              id: 928374
              mapped_content_url: https://company.com/logos/brand1_logo.png
              size: 166144
              thumbnails:
                - content_type: image/png
                  content_url: https://company.zendesk.com/photos/brand1_logo_thumb.png
                  file_name: brand1_logo_thumb.png
                  id: 928375
                  mapped_content_url: https://company.com/photos/brand1_logo_thumb.png
                  size: 58298
                  url: https://company.zendesk.com/api/v2/attachments/928375.json
                - content_type: image/png
                  content_url: https://company.zendesk.com/photos/brand1_logo_small.png
                  file_name: brand1_logo_small.png
                  id: 928376
                  mapped_content_url: https://company.com/photos/brand1_logo_small.png
                  size: 58298
                  url: https://company.zendesk.com/api/v2/attachments/928376.json
              url: https://company.zendesk.com/api/v2/attachments/928374.json
            name: Brand 1
            signature_template: '{{agent.signature}}'
            subdomain: hello-world
            ticket_form_ids:
              - 360000660811
            updated_at: "2019-08-06T02:43:40Z"
            url: https://company.zendesk.com/api/v2/brands/360002783572.json
        count: 1
        next_page: null
        previous_page: null
    BulkUpdateDefaultCustomStatusRequestExample:
      value:
        ids: 1234567,1234577
    BulkUpdateDefaultCustomStatusResponseExample:
      value: {}
    ChannelFrameworkPushResultsResponseExample:
      value:
        results:
          - external_resource_id: "234"
            status:
              code: could_not_locate_parent_external_resource
              description: "123"
    ComplianceDeletionStatusesResponseExample:
      value:
        compliance_deletion_statuses:
          - account_subdomain: accountABC
            action: request_deletion
            application: all
            created_at: "2009-07-20T22:55:23Z"
            executer_id: 2000
            user_id: 1
          - account_subdomain: accountABC
            action: started
            application: support
            created_at: "2009-07-20T22:55:29Z"
            executer_id: null
            user_id: 1
          - account_subdomain: accountABC
            action: complete
            application: support
            created_at: "2009-07-20T22:57:02Z"
            executer_id: null
            user_id: 1
          - account_subdomain: accountABC
            action: started
            application: chat
            created_at: "2009-07-21T02:51:18Z"
            executer_id: null
            user_id: 1
    CountOrganizationsResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    CreateDeletionScheduleRequestExample:
      value:
        deletion_schedule:
          active: true
          conditions:
            all:
              - field: duration_since_last_update
                operator: greater_than
                value: P1Y
            any: []
          description: Delete tickets older than 1 year
          title: some schedule
    CreateDeletionScheduleResponseExample:
      value:
        deletion_schedule:
          active: true
          conditions:
            all:
              - field: duration_since_last_update
                operator: greater_than
                value: P1Y
            any: []
          created_at: "2021-07-20T22:55:29Z"
          default: false
          description: Delete tickets older than 1 year
          id: 7772196094461
          title: some schedule
          updated_at: "2021-07-20T22:55:29Z"
          url: https://{some domain}.zendesk.com/api/v2/deletion_schedules/7772196094461.json
    CreateMacroResponseExample:
      value:
        macro:
          actions:
            - field: status
              value: solved
          id: 25
          restriction: {}
          title: Roger Wilco
    CreateOrganizationRequestExample:
      value:
        organization:
          name: My Organization
    CreatedOrganizationResponseExample:
      value:
        organization:
          created_at: "2020-09-30T01:50:12Z"
          details: null
          domain_names: []
          external_id: null
          group_id: null
          id: 23409462
          name: My Organization
          notes: null
          organization_fields: null
          shared_comments: false
          shared_tickets: false
          tags: []
          updated_at: "2020-09-30T01:50:12Z"
          url: https://example.zendesk.com/api/v2/organizations/23409462.json
    CurrentUserResponseExample:
      value:
        user:
          active: true
          alias: Mr. Johnny
          authenticity_token: <CORS TOKEN>
          created_at: "2009-07-20T22:55:29Z"
          custom_role_id: 9373643
          details: ""
          email: johnny@example.com
          external_id: sai989sur98w9
          id: 35436
          last_login_at: "2011-05-05T10:38:52Z"
          locale: en-US
          locale_id: 1
          moderator: true
          name: Johnny Agent
          notes: Johnny is a nice guy!
          only_private_comments: false
          organization_id: 57542
          phone: "+15551234567"
          photo:
            content_type: image/png
            content_url: https://company.zendesk.com/photos/my_funny_profile_pic.png
            id: 928374
            name: my_funny_profile_pic.png
            size: 166144
            thumbnails:
              - content_type: image/png
                content_url: https://company.zendesk.com/photos/my_funny_profile_pic_thumb.png
                id: 928375
                name: my_funny_profile_pic_thumb.png
                size: 58298
          restricted_agent: true
          role: agent
          role_type: 0
          shared: false
          shared_agent: false
          signature: Have a nice day, Johnny
          suspended: true
          tags:
            - enterprise
            - other_tag
          ticket_restriction: assigned
          time_zone: Copenhagen
          updated_at: "2011-05-05T10:38:52Z"
          url: https://company.zendesk.com/api/v2/users/35436.json
          user_fields:
            user_date: "2012-07-23T00:00:00Z"
            user_decimal: 5.1
            user_dropdown: option_1
          verified: true
    CursorBasedExportIncrementalTicketsResponseExample:
      value:
        after_cursor: MTU3NjYxMzUzOS4wfHw0Njd8
        after_url: https://{subdomain}.zendesk.com/api/v2/incremental/tickets/cursor.json?cursor=MTU3NjYxMzUzOS4wfHw0Njd8
        before_cursor: null
        before_url: null
        end_of_stream: true
        tickets:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 35436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    CursorBasedExportIncrementalUsersResponseExample:
      value:
        after_cursor: MTU3NjYxMzUzOS4wfHw0Njd8
        after_url: https://{subdomain}.zendesk.com/api/v2/incremental/users/cursor.json?cursor=MTU3NjYxMzUzOS4wfHw0Njd8
        before_cursor: null
        before_url: null
        end_of_stream: true
        users:
          - active: true
            alias: Mr. Johnny
            created_at: "2009-07-20T22:55:29Z"
            custom_role_id: 9373643
            details: ""
            email: johnny@example.com
            external_id: sai989sur98w9
            id: 35436
            last_login_at: "2011-05-05T10:38:52Z"
            locale: en-US
            locale_id: 1
            moderator: true
            name: Johnny Agent
            notes: Johnny is a nice guy!
            only_private_comments: false
            organization_id: 57542
            phone: "+15551234567"
            photo:
              content_type: image/png
              content_url: https://company.zendesk.com/photos/my_funny_profile_pic.png
              id: 928374
              name: my_funny_profile_pic.png
              size: 166144
              thumbnails:
                - content_type: image/png
                  content_url: https://company.zendesk.com/photos/my_funny_profile_pic_thumb.png
                  id: 928375
                  name: my_funny_profile_pic_thumb.png
                  size: 58298
            restricted_agent: true
            role: agent
            role_type: 0
            shared: false
            shared_agent: false
            signature: Have a nice day, Johnny
            suspended: true
            tags:
              - enterprise
              - other_tag
            ticket_restriction: assigned
            time_zone: Copenhagen
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/users/35436.json
            user_fields:
              user_date: "2012-07-23T00:00:00Z"
              user_decimal: 5.1
              user_dropdown: option_1
            verified: true
    CustomObjectFieldCreateResponseExample:
      value:
        custom_object_field:
          active: true
          created_at: 2022-09-07T23:21:59Z
          description: Make
          id: 4398096842879
          key: make
          position: 0
          raw_description: Make
          raw_title: Make
          regexp_for_validation: null
          system: false
          title: Make
          type: text
          updated_at: 2022-09-07T23:22:00Z
          url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842879
    CustomObjectFieldsCreateRequestExample:
      value:
        custom_object_field:
          key: color
          title: Color
          type: text
    CustomObjectFieldsLimitResponseExample:
      value:
        count: 44
        limit: 400
    CustomObjectFieldsResponseExample:
      value:
        custom_object_fields:
          - active: true
            created_at: 2022-09-07T23:21:59Z
            description: Name
            id: 4398096842877
            key: standard::name
            position: 0
            properties:
              autoincrement_enabled: true
              autoincrement_next_sequence: 1
              autoincrement_padding: 5
              autoincrement_prefix: 'Order # '
              is_unique: false
            raw_description: Name
            raw_title: Name
            regexp_for_validation: null
            system: false
            title: Name
            type: text
            updated_at: 2022-09-07T23:22:00Z
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842877
          - active: true
            created_at: 2022-09-07T23:21:59Z
            description: External ID
            id: 4398096842878
            key: standard::external_id
            position: 1
            raw_description: External ID
            raw_title: External ID
            regexp_for_validation: null
            system: false
            title: External ID
            type: text
            updated_at: 2022-09-07T23:22:00Z
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096842878
          - active: true
            created_at: 2022-09-07T23:22:14Z
            description: Model
            id: 4398096843007
            key: model
            position: 2
            raw_description: Model
            raw_title: Model
            regexp_for_validation: null
            system: false
            title: Model
            type: text
            updated_at: 2022-09-07T23:22:14Z
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/fields.json?id=4398096843007
    CustomObjectRecordsAutocompleteResponseExample:
      value:
        count: 100
        custom_object_records:
          - created_at: "2022-09-12T19:29:59Z"
            created_by_user_id: "10001"
            custom_object_fields:
              make: Tesla
              model: S
            custom_object_key: car
            external_id: Internal System Record 54848
            id: 01GCSJW391QVSC80GYDH7E93Q6
            name: My Tesla CO record
            updated_at: "2022-09-15T21:07:03Z"
            updated_by_user_id: "10001"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GCSJW391QVSC80GYDH7E93Q6.json
          - created_at: "2022-09-26T22:24:15Z"
            created_by_user_id: "123123"
            custom_object_fields:
              make: Honda
              model: Civic
            custom_object_key: car
            external_id: null
            id: 01GDXYD7ZTWYP542BA8MDDTE36
            name: My Tesla CO record2
            updated_at: "2022-09-26T22:24:15Z"
            updated_by_user_id: "245159"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GDXYD7ZTWYP542BA8MDDTE36.json
        links:
          next: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/autocomplete.json?page%5Bafter%5D=eyJmcm9tIjoxLCJzaXplIjoxLCJzZWFyY2hBZnRlciI6bnVsbCwic29ydCI6bnVsbH0%3D&page%5Bsize%5D=1&query=
          prev: null
        meta:
          after_cursor: eyJmcm9tIjoxLCJzaXplIjoxLCJzZWFyY2hBZnRlciI6bnVsbCwic29ydCI6bnVsbH0=
          before_cursor: null
          has_more: true
    CustomObjectRecordsBulkCreateRequestExample:
      value:
        job:
          action: create
          items:
            - custom_object_fields:
                color: Red
                year: 2020
              name: 2020 Tesla
            - custom_object_fields:
                color: Blue
                external_id: ddd444
                year: 2012
              name: 2012 Toyota
            - custom_object_fields:
                color: Silver
                external_id: ddd445
                year: 2017
              name: 2017 Ford
    CustomObjectRecordsCreateRequestExample:
      value:
        custom_object_record:
          custom_object_fields:
            make: Tesla
            model: "Y"
          name: My car 1
    CustomObjectRecordsCreateResponseExample:
      value:
        custom_object_record:
          created_at: "2022-09-26T22:25:10Z"
          created_by_user_id: "10001"
          custom_object_fields:
            color: white
            make: Tesla
            model: "Y"
          custom_object_key: car
          external_id: null
          id: 01GDXYEY1FQYN066VHF49YHJ21
          name: My Tesla
          updated_at: 2022-09-26T22:25:10Z
          updated_by_user_id: "10001"
          url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GDXYEY1FQYN066VHF49YHJ21.json
    CustomObjectRecordsFilteredSearchRequestExample:
      value:
        filter:
          $and:
            custom_object_fields.key_one:
              $eq: foo
            custom_object_fields.key_two:
              $eq: bar
          $or:
            custom_object_fields.key_four:
              $eq: bar
            custom_object_fields.key_three:
              $eq: foo
    CustomObjectRecordsIndexResponseExample:
      value:
        custom_object_records:
          - created_at: "2022-09-12T19:29:59Z"
            created_by_user_id: "10001"
            custom_object_fields:
              make: Tesla
              model: S
            custom_object_key: car
            external_id: Internal System Record 54848
            id: 01GCSJW391QVSC80GYDH7E93Q6
            name: My Tesla CO record
            updated_at: "2022-09-15T21:07:03Z"
            updated_by_user_id: "10001"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GCSJW391QVSC80GYDH7E93Q6.json
          - created_at: "2022-09-26T22:24:15Z"
            created_by_user_id: "123123"
            custom_object_fields:
              make: Honda
              model: Civic
            custom_object_key: car
            external_id: null
            id: 01GDXYD7ZTWYP542BA8MDDTE36
            name: My Tesla CO record2
            updated_at: "2022-09-26T22:24:15Z"
            updated_by_user_id: "245159"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GDXYD7ZTWYP542BA8MDDTE36.json
        links:
          next: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records.json?page%5Bafter%5D=eyJmcm9tIjoxLCJzaXplIjoxLCJzZWFyY2hBZnRlciI6bnVsbCwic29ydCI6bnVsbH0%3D&page%5Bsize%5D=1&query=
          prev: null
        meta:
          after_cursor: eyJmcm9tIjoxLCJzaXplIjoxLCJzZWFyY2hBZnRlciI6bnVsbCwic29ydCI6bnVsbH0=
          before_cursor: null
          has_more: true
    CustomObjectRecordsJobsResponseExample:
      value:
        job_status:
          id: V3-291e720c98aef4d953563ab090486213
          message: null
          progress: null
          results: null
          status: queued
          total: 2
          url: https://{subdomain}.zendesk.com/api/v2/job_statuses/V3-291e720c98aef4d953563ab090486213.json
    CustomObjectRecordsLimitResponseExample:
      value:
        count: 10294
        limit: 1000000
    CustomObjectRecordsSearchResponseExample:
      value:
        count: 100
        custom_object_records:
          - created_at: "2022-09-12T19:29:59Z"
            created_by_user_id: "10001"
            custom_object_fields:
              make: Tesla
              model: S
            custom_object_key: car
            external_id: Internal System Record 54848
            id: 01GCSJW391QVSC80GYDH7E93Q6
            name: My Tesla CO record
            updated_at: "2022-09-15T21:07:03Z"
            updated_by_user_id: "10001"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GCSJW391QVSC80GYDH7E93Q6.json
          - created_at: "2022-09-26T22:24:15Z"
            created_by_user_id: "123123"
            custom_object_fields:
              make: Honda
              model: Civic
            custom_object_key: car
            external_id: null
            id: 01GDXYD7ZTWYP542BA8MDDTE36
            name: My Tesla CO record2
            updated_at: "2022-09-26T22:24:15Z"
            updated_by_user_id: "245159"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GDXYD7ZTWYP542BA8MDDTE36.json
        links:
          next: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/search.json?page%5Bafter%5D=eyJmcm9tIjoxLCJzaXplIjoxLCJzZWFyY2hBZnRlciI6bnVsbCwic29ydCI6bnVsbH0%3D&page%5Bsize%5D=1&query=
          prev: null
        meta:
          after_cursor: eyJmcm9tIjoxLCJzaXplIjoxLCJzZWFyY2hBZnRlciI6bnVsbCwic29ydCI6bnVsbH0=
          before_cursor: null
          has_more: true
    CustomObjectRecordsUpsertRequestExample:
      value:
        custom_object_record:
          custom_object_fields:
            make: Oldsmobile
            model: Cutlass Supreme
          name: 1997 Cutlass Supreme
    CustomObjectRecordsUpsertResponseExample:
      value:
        custom_object_record:
          created_at: "2023-09-26T22:25:10Z"
          created_by_user_id: "10001"
          custom_object_fields:
            make: Oldsmobile
            model: Cutlass Supreme
          custom_object_key: car
          external_id: X90001
          id: 01GDXYEY1FQYN066VHF49YHJ21
          name: 1997 Cutlass Supreme
          updated_at: 2023-09-26T22:25:10Z
          updated_by_user_id: "10001"
          url: https://{subdomain}.zendesk.com/api/v2/custom_objects/car/records/01GDXYEY1FQYN066VHF49YHJ21.json
    CustomObjectsCreateRequestExample:
      value:
        custom_object:
          key: apartment
          title: Apartment
          title_pluralized: Apartments
    CustomObjectsCreateResponseExample:
      value:
        custom_object:
          created_at: "2022-09-02T22:44:35Z"
          created_by_user_id: "16485"
          description: The list of cars in our fleet
          include_in_list_view: true
          key: car
          raw_description: '{{dc.car_description}}'
          raw_title: '{{dc.car_title}}'
          raw_title_pluralized: '{{dc.car_title_plural}}'
          title: Car
          title_pluralized: Cars
          updated_at: 2022-09-02T22:44:35Z
          updated_by_user_id: "10234"
          url: https://{subdomain}.zendesk.com/api/v2/custom_objects/01GC0617DV48CAXK6WA4DW51HD.json
    CustomObjectsLimitResponseExample:
      value:
        count: 19
        limit: 50
    CustomObjectsResponseExample:
      value:
        custom_objects:
          - created_at: "2022-09-02T22:44:35Z"
            created_by_user_id: "16485"
            description: The list of cars in our fleet
            include_in_list_view: true
            key: car
            raw_description: '{{dc.car_description}}'
            raw_title: '{{dc.car_title}}'
            raw_title_pluralized: '{{dc.car_title_plural}}'
            title: Car
            title_pluralized: Cars
            updated_at: 2022-09-02T22:44:35Z
            updated_by_user_id: "10234"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/01GC0617DV48CAXK6WA4DW51HD.json
          - created_at: 2022-08-01T22:44:35Z
            created_by_user_id: "123123"
            description: The list of vessels in our fleet
            include_in_list_view: true
            key: vessel
            raw_description: '{{dc.vessel_description}}'
            raw_title: '{{dc.vessel_title}}'
            raw_title_pluralized: '{{dc.vessel_title_plural}}'
            title: Vessel
            title_pluralized: Vessel
            updated_at: 2022-09-02T22:44:35Z
            updated_by_user_id: "251251"
            url: https://{subdomain}.zendesk.com/api/v2/custom_objects/01GC9TXVMNT6VHB5GBGAR09WPF.json
    CustomRoleResponseExample:
      value:
        custom_role:
          configuration:
            assign_tickets_to_any_group: false
            chat_access: true
            end_user_list_access: full
            end_user_profile_access: readonly
            explore_access: edit
            forum_access: readonly
            forum_access_restricted_content: false
            group_access: true
            light_agent: false
            macro_access: full
            manage_business_rules: true
            manage_contextual_workspaces: false
            manage_dynamic_content: false
            manage_extensions_and_channels: true
            manage_facebook: false
            manage_organization_fields: false
            manage_ticket_fields: false
            manage_ticket_forms: false
            manage_user_fields: false
            moderate_forums: false
            organization_editing: false
            organization_notes_editing: false
            report_access: none
            side_conversation_create: true
            ticket_access: within-groups
            ticket_comment_access: none
            ticket_deletion: false
            ticket_editing: true
            ticket_merge: false
            ticket_tag_editing: true
            twitter_search_access: true
            user_view_access: readonly
            view_access: full
            view_deleted_tickets: false
            voice_access: true
            voice_dashboard_access: false
          created_at: "2012-03-12T16:32:22Z"
          description: sample description
          id: 10127
          name: sample role
          role_type: 0
          team_member_count: 10
          updated_at: "2012-03-12T16:32:22Z"
    CustomRolesResponseExample:
      value:
        custom_roles:
          - configuration:
              assign_tickets_to_any_group: false
              chat_access: true
              end_user_list_access: full
              end_user_profile_access: readonly
              explore_access: edit
              forum_access: readonly
              forum_access_restricted_content: false
              group_access: true
              light_agent: false
              macro_access: full
              manage_business_rules: true
              manage_contextual_workspaces: false
              manage_dynamic_content: false
              manage_extensions_and_channels: true
              manage_facebook: false
              manage_organization_fields: false
              manage_ticket_fields: false
              manage_ticket_forms: false
              manage_user_fields: false
              moderate_forums: false
              organization_editing: false
              organization_notes_editing: false
              report_access: none
              side_conversation_create: true
              ticket_access: within-groups
              ticket_comment_access: none
              ticket_deletion: false
              ticket_editing: true
              ticket_merge: false
              ticket_tag_editing: true
              twitter_search_access: true
              user_view_access: readonly
              view_access: full
              view_deleted_tickets: false
              voice_access: true
              voice_dashboard_access: false
            created_at: "2012-03-12T16:32:22Z"
            description: Advisors manage the workflow and configure the help desk. They create or manage automations, macros, triggers, views, and SLA targets. They also set up channels and extensions. Advisors don't solve tickets, they can only make private comments.
            id: 16
            name: Advisor
            role_type: 0
            team_member_count: 10
            updated_at: "2012-03-12T16:32:22Z"
          - configuration:
              assign_tickets_to_any_group: false
              chat_access: true
              end_user_list_access: full
              end_user_profile_access: readonly
              explore_access: edit
              forum_access: readonly
              forum_access_restricted_content: false
              group_access: true
              light_agent: false
              macro_access: full
              manage_business_rules: true
              manage_contextual_workspaces: false
              manage_dynamic_content: false
              manage_extensions_and_channels: true
              manage_facebook: false
              manage_organization_fields: false
              manage_ticket_fields: false
              manage_ticket_forms: false
              manage_user_fields: false
              moderate_forums: false
              organization_editing: false
              organization_notes_editing: false
              report_access: none
              side_conversation_create: true
              ticket_access: within-groups
              ticket_comment_access: none
              ticket_deletion: false
              ticket_editing: true
              ticket_merge: false
              ticket_tag_editing: true
              twitter_search_access: true
              user_view_access: readonly
              view_access: full
              view_deleted_tickets: false
              voice_access: true
              voice_dashboard_access: false
            created_at: "2011-07-20T04:31:29Z"
            description: A Staff agent's primary role is to solve tickets. They can edit tickets within their groups, view reports, and add or edit personal views and macros.
            id: 6
            name: Staff
            role_type: 0
            team_member_count: 10
            updated_at: "2012-02-02T10:32:59Z"
    CustomStatusCreateRequestExample:
      value:
        custom_status:
          active: true
          agent_label: Responding quickly
          description: Customer needs a response quickly
          end_user_description: Your ticket is being responded to
          end_user_label: Urgent processing
          status_category: open
    CustomStatusResponseExample:
      value:
        custom_status:
          active: true
          agent_label: Responding quickly
          created_at: 2021-07-20T22:55:29Z
          default: false
          description: Customer needs a response quickly
          end_user_description: Your ticket is being responded to
          end_user_label: Urgent processing
          id: 35436
          raw_agent_label: Responding quickly
          raw_description: Customer needs a response quickly
          raw_end_user_description: Your ticket is being responded to
          raw_end_user_label: Urgent processing
          status_category: open
          updated_at: 2021-07-20T22:55:29Z
    CustomStatusUpdateRequestExample:
      value:
        custom_status:
          active: true
          agent_label: Responding quickly
          description: Customer needs a response quickly
          end_user_description: Your ticket is being responded to
          end_user_label: Urgent processing
    CustomStatusesResponseExample:
      value:
        custom_statuses:
          - active: true
            agent_label: Responding quickly
            created_at: 2021-07-20T22:55:29Z
            default: false
            description: Customer needs a response quickly
            end_user_description: Your ticket is being responded to
            end_user_label: Urgent processing
            id: 35436
            raw_agent_label: Responding quickly
            raw_description: Customer needs a response quickly
            raw_end_user_description: Your ticket is being responded to
            raw_end_user_label: Urgent processing
            status_category: open
            updated_at: 2021-07-20T22:55:29Z
    CustomTicketFieldOptionCreateResponseExample:
      value:
        custom_field_option:
          id: 10002
          name: Grapes
          position: 2
          raw_name: Grapes
          url: http://{subdomain}.zendesk.com/api/v2/ticket_fields/1/options/10002.json
          value: grape
    CustomTicketFieldOptionResponseExample:
      value:
        custom_field_option:
          id: 10001
          name: Bananas
          position: 1
          raw_name: Bananas
          url: http://{subdomain}.zendesk.com/api/v2/ticket_fields/1/options/10001.json
          value: banana
    CustomTicketFieldOptionUpdateResponseExample:
      value:
        custom_field_option:
          id: 10002
          name: Pineapples
          position: 2
          raw_name: Pineapples
          url: http://{subdomain}.zendesk.com/api/v2/ticket_fields/1/options/10002.json
          value: pineapple
    CustomTicketFieldOptionsResponseExample:
      value:
        count: 2
        custom_field_options:
          - id: 10000
            name: Apples
            position: 0
            raw_name: Apples
            url: http://{subdomain}.zendesk.com/api/v2/ticket_fields/1/options/10000.json
            value: apple
          - id: 10001
            name: Bananas
            position: 1
            raw_name: Bananas
            url: http://{subdomain}.zendesk.com/api/v2/ticket_fields/1/options/10001.json
            value: banana
        next_page: null
        previous_page: null
    CustomUserFieldOptionCreateResponseExample:
      value:
        custom_field_option:
          id: 10002
          name: Grapes
          position: 2
          raw_name: Grapes
          url: http://{subdomain}.zendesk.com/api/v2/user_fields/1/options/10002.json
          value: grape
    CustomUserFieldOptionResponseExample:
      value:
        custom_field_option:
          id: 10001
          name: Bananas
          position: 1
          raw_name: Bananas
          url: http://{subdomain}.zendesk.com/api/v2/user_fields/1/options/10001.json
          value: banana
    CustomUserFieldOptionUpdateResponseExample:
      value:
        custom_field_option:
          id: 10002
          name: Pineapples
          position: 2
          raw_name: Pineapples
          url: http://{subdomain}.zendesk.com/api/v2/user_fields/1/options/10002.json
          value: pineapple
    CustomUserFieldOptionsResponseExample:
      value:
        count: 2
        custom_field_options:
          - id: 10000
            name: Apples
            position: 0
            raw_name: Apples
            url: http://{subdomain}.zendesk.com/api/v2/user_fields/1/options/10000.json
            value: apple
          - id: 10001
            name: Bananas
            position: 1
            raw_name: Bananas
            url: http://{subdomain}.zendesk.com/api/v2/user_fields/1/options/10001.json
            value: banana
        next_page: null
        previous_page: null
    DefinitionsResponseExample:
      value:
        definitions:
          conditions_all:
            - group: ticket
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
              repeatable: false
              subject: status
              title: Status
              type: list
              values:
                - enabled: false
                  title: Closed
                  value: closed
          conditions_any:
            - group: ticket
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
              repeatable: false
              subject: status
              title: Status
              type: list
              values:
                - enabled: false
                  title: Closed
                  value: closed
    DeleteUserResponseExample:
      value:
        user:
          active: false
          id: 9873843
          name: Roger Wilco II
    DeletedUserResponseExample:
      value:
        deleted_user:
          active: false
          created_at: "2019-08-26T02:10:24Z"
          email: david@email.com
          id: 189304711533
          locale: en-US
          locale_id: 1
          name: David
          organization_id: 360000000008
          phone: null
          photo: null
          role: end-user
          shared_phone_number: null
          time_zone: Eastern Time (US & Canada)
          updated_at: "2019-08-26T02:10:27Z"
          url: https://{subdomain}.zendesk.com/api/v2/deleted_users/189304711533
    DeletedUsersCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 13
    DeletedUsersResponseExample:
      value:
        deleted_users:
          - active: false
            created_at: "2019-08-26T02:10:24Z"
            email: david@gmail.com
            id: 189304711533
            locale: en-US
            locale_id: 1
            name: David
            organization_id: 12312312
            phone: null
            photo: null
            role: end-user
            shared_phone_number: null
            time_zone: Eastern Time (US & Canada)
            updated_at: "2019-08-26T02:10:27Z"
            url: https://{subdomain}.zendesk.com/api/v2/deleted_users/189304711533
          - active: false
            created_at: "2019-08-26T02:10:28Z"
            email: linda@gmail.com
            id: 12204720593
            locale: en-US
            locale_id: 1
            name: Linda
            organization_id: 123123123
            phone: null
            photo: null
            role: end-user
            shared_phone_number: null
            time_zone: Eastern Time (US & Canada)
            updated_at: "2019-08-26T02:10:29Z"
            url: https://{subdomain}.zendesk.com/api/v2/deleted_users/12204720593
    DynamicContentResponseExample:
      value:
        item:
          created_at: "2015-05-13T22:33:12Z"
          default_locale_id: 1
          id: 47
          name: Snowboard Problem
          outdated: false
          placeholder: '{{dc.snowboard_problem}}'
          updated_at: "2015-05-13T22:33:12Z"
          url: https://company.zendesk.com/api/v2/dynamic_content/items/47.json
          variants:
            - active: true
              content: Voici mon contenu dynamique en français
              created_at: "2015-05-13T22:33:12Z"
              default: true
              id: 47
              locale_id: 16
              outdated: false
              updated_at: "2015-05-13T22:33:12Z"
              url: https://company.zendesk.com/api/v2/dynamic_content/items/47/variants/47.json
            - active: true
              content: Este es mi contenido dinámico en español
              created_at: "2015-05-13T22:33:12Z"
              default: false
              id: 48
              locale_id: 2
              outdated: false
              updated_at: "2015-05-13T22:33:12Z"
              url: https://company.zendesk.com/api/v2/dynamic_content/items/47/variants/48.json
    DynamicContentUpdateResponseExample:
      value:
        item:
          created_at: "2015-05-13T22:33:12Z"
          default_locale_id: 1
          id: 47
          name: New name
          outdated: false
          placeholder: '{{dc.snowboard_problem}}'
          updated_at: "2015-05-13T22:33:12Z"
          url: https://company.zendesk.com/api/v2/dynamic_content/items/47.json
          variants:
            - active: true
              content: Voici mon contenu dynamique en français
              created_at: "2015-05-13T22:33:12Z"
              default: true
              id: 47
              locale_id: 16
              outdated: false
              updated_at: "2015-05-13T22:33:12Z"
              url: https://company.zendesk.com/api/v2/dynamic_content/items/47/variants/47.json
            - active: true
              content: Este es mi contenido dinámico en español
              created_at: "2015-05-13T22:33:12Z"
              default: false
              id: 48
              locale_id: 2
              outdated: false
              updated_at: "2015-05-13T22:33:12Z"
              url: https://company.zendesk.com/api/v2/dynamic_content/items/47/variants/48.json
    DynamicContentVariantResponseExample:
      value:
        variant:
          active: true
          content: C'est mon contenu dynamique en français
          created_at: "2014-04-09T19:53:23Z"
          default: false
          id: 23
          locale_id: 127
          outdated: false
          updated_at: "2014-04-09T19:53:23Z"
          url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/23.json
    DynamicContentVariantUpdateResponseExample:
      value:
        variant:
          active: false
          content: C'est mon contenu dynamique en français
          created_at: "2014-04-09T19:53:23Z"
          default: false
          id: 23
          locale_id: 125
          outdated: false
          updated_at: "2014-04-09T19:53:23Z"
          url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/23.json
    DynamicContentVariantsCreateManyResponseExample:
      value:
        variants:
          - active: true
            content: C'est mon contenu dynamique en français
            created_at: "2014-04-09T19:53:23Z"
            default: false
            id: 23
            locale_id: 127
            outdated: false
            updated_at: "2014-04-09T19:53:23Z"
            url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/23.json
          - active: true
            content: Este es mi contenido dinámico en español
            created_at: "2014-04-09T19:53:23Z"
            default: false
            id: 24
            locale_id: 126
            outdated: false
            updated_at: "2014-04-09T19:53:23Z"
            url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/24.json
    DynamicContentVariantsResponseExample:
      value:
        variants:
          - active: true
            content: This is my dynamic content in English
            created_at: "2014-04-09T19:53:23Z"
            default: true
            id: 23
            locale_id: 125
            outdated: false
            updated_at: "2014-04-09T19:53:23Z"
            url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/23.json
          - active: false
            content: Este es mi contenido dinámico en español
            created_at: "2014-04-09T19:53:23Z"
            default: false
            id: 24
            locale_id: 126
            outdated: true
            updated_at: "2014-04-09T19:53:23Z"
            url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/24.json
    DynamicContentVariantsUpdateManyResponseExample:
      value:
        variants:
          - active: true
            content: C'est mon contenu dynamique en français
            created_at: "2014-04-09T19:53:23Z"
            default: false
            id: 23
            locale_id: 16
            outdated: false
            updated_at: "2014-04-09T19:53:23Z"
            url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/23.json
          - active: true
            content: Este es mi contenido dinámico en español
            created_at: "2014-04-09T19:53:23Z"
            default: false
            id: 24
            locale_id: 2
            outdated: false
            updated_at: "2014-04-09T19:53:23Z"
            url: https://subdomain.zendesk.com/api/v2/dynamic_content/items/3/variants/24.json
    DynamicContentsResponseExample:
      value:
        items:
          - created_at: "2015-05-13T22:33:12Z"
            default_locale_id: 1
            id: 47
            name: Snowboard Problem
            outdated: true
            placeholder: '{{dc.snowboard_problem}}'
            updated_at: "2015-05-13T22:33:12Z"
            url: https://company.zendesk.com/api/v2/dynamic_content/items/47.json
            variants:
              - active: true
                content: C'est mon contenu dynamique en français
                created_at: "2015-05-13T22:33:12Z"
                default: true
                id: 47
                locale_id: 1
                outdated: false
                updated_at: "2015-05-13T22:33:12Z"
                url: https://company.zendesk.com/api/v2/dynamic_content/items/47/variants/47.json
    EmailNotificationResponseExample:
      value:
        email_notification:
          comment_id: 7824075373565
          created_at: "2024-02-21T23:13:07Z"
          email_id: 01HQ6Z3DE28F34XBFCYH0SRM95
          message_id: <56Z97D7G67G_65d68382aa493_4639581606f3@example.com>
          notification_id: 7824075373693
          recipients:
            - delivery_status:
                code: 530 5.7.0
                id: 24
                message: 'Email failed to deliver. Status code: 530'
                name: authentication_required
              email_address: recipient1@example.com
              user_id: 7612709251581
          ticket_id: 623
          updated_at: "2024-02-21T23:13:07Z"
          url: https://example.zendesk.com/api/v2/email_notifications/7824075373693.json
    EmailNotificationsResponseExample:
      value:
        email_notifications:
          - comment_id: 7824075373565
            created_at: "2024-02-21T23:13:07Z"
            email_id: 01HQ6Z3DE28F34XBFCYH0SRM95
            message_id: <56Z97D7G67G_65d68382aa493_4639581606f3@example.com>
            notification_id: 7824075373693
            recipients:
              - delivery_status:
                  code: 530 5.7.0
                  id: 24
                  message: 'Email failed to deliver. Status code: 530'
                  name: authentication_required
                email_address: recipient1@example.com
                user_id: 7612709251581
            ticket_id: 623
            updated_at: "2024-02-21T23:13:07Z"
            url: https://example.zendesk.com/api/v2/email_notifications/7824075373693.json
          - comment_id: 7975134672637
            created_at: "2024-05-16T20:15:20Z"
            email_id: 01HY1GPZVDQAQK3CKWD3MFPX7Z
            message_id: <DW8VPD4ZDQ1_6646695859d95_4c39f81091ee@example.com>
            notification_id: 7975134674301
            recipients:
              - delivery_status:
                  code: 538 5.7.11
                  id: 27
                  message: 'Email failed to deliver. Status code: 538 5.7.11'
                  name: encryption_required
                email_address: recipient1@example.com
                user_id: 1100021780374
              - delivery_status:
                  code: "200"
                  id: 5
                  message: Email was delivered.
                  name: delivered
                email_address: recipient2@example.com
                user_id: 6020924697213
            ticket_id: 626
            updated_at: "2024-05-16T20:15:20Z"
            url: https://example.zendesk.com/api/v2/email_notifications/7975134674301.json
          - comment_id: 7975121425149
            created_at: "2024-05-16T20:15:58Z"
            email_id: 01HY1GR2T8VKSPZ73TMCWAFWS3
            message_id: <DW8VPD4ZDQ1_6646697dcf0d8_4b39f81553be@example.com>
            notification_id: 7975121425661
            recipients:
              - delivery_status:
                  code: "0"
                  id: 0
                  message: No delivery response has been received.
                  name: none
                email_address: recipient1@example.com
                user_id: 1100021780374
              - delivery_status:
                  code: "501"
                  id: 8
                  message: 'Recipient server rejected email. Status code: 501'
                  name: syntax_error_in_arguments
                email_address: recipient2@example.com
                user_id: 6020924697213
            ticket_id: 626
            updated_at: "2024-05-16T20:15:58Z"
            url: https://example.zendesk.com/api/v2/email_notifications/7975121425661.json
    EssentialsCardExample:
      value:
        object_layout:
          created_at: "2022-04-02T22:55:29Z"
          default: true
          fields:
            - id: null
              zrn: zen:user:identity:email
            - id: null
              zrn: zen:user:field:standard:external_id
            - id: null
              zrn: zen:user:field:standard:iana_time_zone
            - id: null
              zrn: zen:user:field:standard:locale
            - id: null
              zrn: zen:user:field:standard:organization_id
          id: null
          key: zen:user
          layout: essentials_card
          max_count: 20
          updated_at: "2022-04-02T22:55:29Z"
    EssentialsCardsExample:
      value:
        object_layouts:
          - created_at: "2022-04-02T22:55:29Z"
            default: true
            fields: []
            id: null
            key: zen:user
            layout: essentials_card
            max_count: 20
            updated_at: "2022-04-02T22:55:29Z"
          - created_at: "2022-05-02T22:55:29Z"
            default: true
            fields: []
            id: null
            key: zen:custome_object:car
            layout: essentials_card
            max_count: 20
            updated_at: "2022-05-02T22:55:29Z"
    ExportIncrementalOrganizationsResponseExample:
      value:
        count: 1
        end_of_stream: true
        end_time: 1601357503
        next_page: https://example.zendesk.com/api/v2/incremental/ticket_events.json?start_time=1601357503
        organizations:
          - created_at: "2018-11-14T00:14:52Z"
            details: caterpillar =)
            domain_names:
              - remain.com
            external_id: ABC198
            group_id: 1835962
            id: 4112492
            name: Groablet Enterprises
            notes: donkey
            organization_fields:
              datepudding: "2018-11-04T00:00:00+00:00"
              org_field_1: happy happy
              org_field_2: teapot_kettle
            shared_comments: false
            shared_tickets: false
            tags:
              - smiley
              - teapot_kettle
            updated_at: "2018-11-14T00:54:22Z"
            url: https://example.zendesk.com/api/v2/organizations/4112492.json
    ExportIncrementalTicketEventsResponseExample:
      value:
        count: 1
        end_of_stream: true
        end_time: 1601357503
        next_page: https://example.zendesk.com/api/v2/incremental/ticket_events.json?start_time=1601357503
        ticket_events:
          - id: 926256957613
            instance_id: 1
            metric: agent_work_time
            ticket_id: 155
            time: "2020-10-26T12:53:12Z"
            type: measure
    GetDeletionScheduleResponseExample:
      value:
        deletion_schedule:
          active: true
          conditions:
            all:
              - field: duration_since_last_update
                operator: greater_than
                value: P1Y
            any: []
          created_at: "2021-07-20T22:55:29Z"
          default: false
          description: Delete tickets older than 1 year
          id: 7772196094461
          title: some schedule
          updated_at: "2021-07-20T22:55:29Z"
          url: https://{some domain}.zendesk.com/api/v2/deletion_schedules/7772196094461.json
    GetDeletionSchedulesResponseExample:
      value:
        deletion_schedules:
          - active: true
            conditions:
              all:
                - field: duration_since_last_update
                  operator: greater_than
                  value: P1Y
              any: []
            created_at: "2021-07-20T22:55:29Z"
            default: false
            description: Delete tickets older than 1 year
            id: 7772196094461
            title: some schedule
            updated_at: "2021-07-20T22:55:29Z"
            url: https://{some domain}.zendesk.com/api/v2/deletion_schedules/7772196094461.json
    GroupCreateResponseExample:
      value:
        group:
          created_at: "2009-08-26T00:07:08Z"
          id: 122
          is_public: true
          name: My Group
          updated_at: "2010-05-13T00:07:08Z"
    GroupMembershipResponseExample:
      value:
        group_membership:
          created_at: "2012-04-03T12:34:01Z"
          default: true
          group_id: 88
          id: 461
          updated_at: "2012-04-03T12:34:01Z"
          user_id: 72
    GroupMembershipsResponseExample:
      value:
        group_memberships:
          - created_at: "2009-05-13T00:07:08Z"
            default: true
            group_id: 12
            id: 4
            updated_at: "2011-07-22T00:11:12Z"
            user_id: 29
          - created_at: "2012-03-13T22:01:32Z"
            default: false
            group_id: 3
            id: 49
            updated_at: "2012-03-13T22:01:32Z"
            user_id: 155
    GroupResponseExample:
      value:
        group:
          created_at: "2009-08-26T00:07:08Z"
          id: 122
          is_public: true
          name: MCs
          updated_at: "2010-05-13T00:07:08Z"
    GroupSLAPoliciesResponseExample:
      value:
        count: 1
        group_sla_policies:
          - description: For low priority tickets, the Tier 1 group will solve or reassign the ticket in one hour.
            filter:
              all:
                - field: group_ownership_time
                  operator: includes
                  value:
                    - 6
            id: 01H078CBDY28BZG7P6BONY09DN
            policy_metrics:
              - business_hours: false
                metric: group_ownership_time
                priority: low
                target: 3600
            position: 3
            title: Incidents
            url: https://{subdomain}.zendesk.com/api/v2/group_sla/policies/01H078CBDY28BZG7P6BONY09DN.json
        next_page: null
        previous_page: null
    GroupSLAPolicyCreateResponse:
      value:
        group_sla_policy:
          description: The group with id 6 will have to solve or reassign normal priority tickets in 30 minutes and urgent tickets in 10.
          filter:
            all:
              - field: group_ownership_time
                operator: includes
                value:
                  - 6
          id: 01H078CBDY28BZG7P6BONY09DN
          policy_metrics:
            - business_hours: false
              metric: group_ownership_time
              priority: normal
              target: 1800
            - business_hours: false
              metric: group_ownership_time
              priority: urgent
              target: 600
          position: 3
          title: Incidents
          url: https://{subdomain}.zendesk.com/api/v2/group_slas/policies/01H078CBDY28BZG7P6BONY09DN.json
    GroupSLAPolicyFilterDefinitionResponseExample:
      value:
        definitions:
          all:
            - group: ticket
              operators:
                - title: Contains at least one of the following
                  value: includes
                - title: Contains at least none of the following
                  value: not_includes
              title: Group ID
              value: group_id
              values:
                list:
                  - title: Tier 1
                    value: 6
                type: list
    GroupSLAPolicyResponseExample:
      value:
        group_sla_policy:
          description: Low priority tickets assigned to the group with id 6 will be completed or reassigned in one hour.
          filter:
            all:
              - field: group_id
                operator: includes
                value:
                  - 6
          id: 01H078CBDY28BZG7P6BONY09DN
          policy_metrics:
            - business_hours: false
              metric: group_ownership_time
              priority: low
              target: 3600
          position: 3
          title: Incidents
          url: https://{subdomain}.zendesk.com/api/v2/group_sla/policies/01H078CBDY28BZG7P6BONY09DN.json
    GroupSLAPolicyUpdateResponse:
      value:
        group_sla_policy:
          description: Normal priority tickets assigned to the groups 6 or 7 will be completed or reassigned in 30 minutes.
          filter:
            all:
              - field: group_id
                operator: includes
                value:
                  - 6
                  - 7
          id: 01H078CBDY28BZG7P6BONY09DN
          policy_metrics:
            - business_hours: false
              metric: group_ownership_time
              priority: normal
              target: 1800
          position: 3
          title: Urgent Incidents
          url: https://{subdomain}.zendesk.com/api/v2/group_slas/policies/01H078CBDY28BZG7P6BONY09DN.json
    GroupUpdateResponseExample:
      value:
        group:
          created_at: "2009-08-26T00:07:08Z"
          id: 123
          is_public: false
          name: Interesting Group
          updated_at: "2010-05-13T00:07:08Z"
    GroupsCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    GroupsResponseExample:
      value:
        groups:
          - created_at: "2009-05-13T00:07:08Z"
            id: 211
            is_public: true
            name: DJs
            updated_at: "2011-07-22T00:11:12Z"
          - created_at: "2009-08-26T00:07:08Z"
            id: 122
            is_public: true
            name: MCs
            updated_at: "2010-05-13T00:07:08Z"
    HostMappingResponseInvalidCNAMEExample:
      value:
        expected_cnames:
          - bar.zendesk.com
        is_valid: false
        reason: not_a_cname
    HostMappingResponseValidExample:
      value:
        cname: bar.zendesk.com
        is_valid: true
    HostMappingResponseWrongCNAMEExample:
      value:
        cname: bar.zendesk.com
        expected_cnames:
          - bar.zendesk.com
        is_valid: false
        reason: google.com
    IncrementalSkillBasedRoutingAttributeValuesExample:
      value:
        attribute_values:
          - attribute_id: 15821cba-7326-11e8-b07e-950ba849aa27
            id: 19ed17fb-7326-11e8-b07e-9de44e7e7f20
            name: English
            time: "2018-06-19T01:33:26Z"
            type: create
        count: 1200
        end_time: 1533266020
        next_page: https://{subdomain}.zendesk.com/api/v2/incremental/routing/attribute_values.json?cursor=7d724c71-3911-11e8-9621-836b8c683dc6
    IncrementalSkillBasedRoutingAttributesExample:
      value:
        attributes:
          - id: 15821cba-7326-11e8-b07e-950ba849aa27
            name: Languages
            time: "2018-06-19T01:33:19Z"
            type: create
        count: 1200
        end_time: 1533266020
        next_page: https://{subdomain}.zendesk.com/api/v2/incremental/routing/attributes.json?cursor=7d724c71-3911-11e8-9621-836b8c683dc6
    IncrementalSkillBasedRoutingInstanceValuesExample:
      value:
        count: 1200
        end_time: 1533266020
        instance_values:
          - attribute_value_id: 19ed17fb-7326-11e8-b07e-9ab44e7e7f28
            id: 62055cad-7326-11e8-b07e-73653560136b
            instance_id: "10001"
            time: "2019-06-19T01:35:27Z"
            type: associate_agent
          - attribute_value_id: 19ed17fb-7326-11e8-b07e-9ab44e7e7f28
            id: 62055cad-7326-11e8-b07e-cf1082b7e6d4
            instance_id: "11375"
            time: "2019-06-19T01:35:27Z"
            type: associate_agent
          - attribute_value_id: 19ed17fb-7326-11e8-b07e-9ab44e7e7f28
            id: 62055cad-7326-11e8-b07e-5b8483a47e24
            instance_id: "14187"
            time: "2020-11-14T16:32:22Z"
            type: unassociate_agent
        next_page: https://{subdomain}.zendesk.com/api/v2/incremental/routing/instance_values.json?cursor=62055cad-7326-11e8-b07e-73653560136b
    JobStatusBulkDeleteResponseExample:
      value:
        job_status:
          id: 82de0b044094f0c67893ac9fe64f1a99
          message: Completed at 2018-03-08 10:07:04 +0000
          progress: 2
          results:
            - action: delete
              id: 244
              status: Deleted
              success: true
            - action: delete
              id: 245
              status: Deleted
              success: true
          status: completed
          total: 2
          url: https://example.zendesk.com/api/v2/job_statuses/82de0b0467893ac9fe64f1a99.json
    JobStatusResponseExample:
      value:
        job_status:
          id: 82de0b044094f0c67893ac9fe64f1a99
          message: Completed at 2018-03-08 10:07:04 +0000
          progress: 2
          results:
            - action: update
              id: 244
              status: Updated
              success: true
            - action: update
              id: 245
              status: Updated
              success: true
          status: completed
          total: 2
          url: https://example.zendesk.com/api/v2/job_statuses/82de0b0467893ac9fe64f1a99.json
    JobStatusesResponseExample:
      value:
        job_statuses:
          - id: 8b726e606741012ffc2d782bcb7848fe
            status: completed
          - id: e7665094164c498781ebe4c8db6d2af5
            status: completed
    ListDeletedTicketsResponseExample:
      value:
        count: 1
        deleted_tickets:
          - actor:
              id: 3946
              name: Taz Wombat
            deleted_at: 20140704T15:37:04Z
            id: 581
            previous_state: open
            subject: Wombat Party
        next_page: null
        previous_page: null
    ListTicketCollaboratorsResponseExample:
      value:
        users:
          - id: 223443
            name: Johnny Agent
          - id: 8678530
            name: Peter Admin
    ListTicketEmailCCsResponseExample:
      value:
        users:
          - id: "223443"
            name: Johnny Agent
          - id: "8678530"
            name: Peter Admin
          - id: "6748530"
            name: Jane End User
    ListTicketFollowersResponseExample:
      value:
        users:
          - id: 223443
            name: Johnny Agent
          - id: 8678530
            name: Peter Admin
    ListTicketIncidentsResponseExample:
      value:
        tickets:
          - description: The fire is very colorful.
            id: 33
            status: open
            subject: My printer is on fire
          - description: The fire is very colorful as well!
            id: 34
            status: pending
            subject: The printer is on fire over here too
    ListTicketProblemsResponseExample:
      value:
        tickets:
          - custom_status_id: 123
            description: The fire is very colorful.
            id: 33
            status: open
            subject: My printer is on fire
          - custom_status_id: 231
            description: The fire is very colorful as well!
            id: 34
            status: pending
            subject: The printer is on fire over here too
    LocaleDetectBestLanguageResponseExample:
      value:
        locale:
          created_at: "2010-12-23T12:45:22Z"
          id: 1
          locale: en
          name: English
          updated_at: "2012-04-01T10:44:12Z"
          url: https://company.zendesk.com/api/v2/locales/en-US.json
    LocaleResponseExample:
      value:
        locale:
          created_at: "2010-12-23T12:45:22Z"
          id: 8
          locale: de
          name: Deutsch
          updated_at: "2012-04-01T10:44:12Z"
          url: https://company.zendesk.com/api/v2/locales/de.json
    LocalesResponseExample:
      value:
        locales:
          - created_at: "2009-07-20T22:55:29Z"
            id: 1
            locale: en-US
            name: English
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/locales/en-US.json
          - created_at: "2010-12-23T12:45:22Z"
            id: 8
            locale: de
            name: Deutsch
            updated_at: "2012-04-01T10:44:12Z"
            url: https://company.zendesk.com/api/v2/locales/de.json
    MacroActionsResponseExample:
      value:
        actions:
          - group: ticket
            operators:
              - title: Is
                value: is
            output_key: null
            target: null
            title: Set subject
            title_for_field: Set subject
            value: subject
            values:
              list: []
              type: text
          - group: ticket
            operators:
              - title: Is
                value: is
            output_key: null
            target: null
            title: Status
            title_for_field: Set subject
            value: subject
            values:
              list:
                - enabled: true
                  title: Open
                  value: open
                - enabled: true
                  title: Pending
                  value: pending
                - enabled: true
                  title: Solved
                  value: solved
              type: list
          - field: priority
            group: ticket
            operators:
              - title: Is
                value: is
            output_key: null
            title: Priority
            title_for_field: Priority
            value: priority
            values:
              list:
                - enabled: false
                  title: Low
                  value: low
                - enabled: true
                  title: Normal
                  value: normal
                - enabled: true
                  title: High
                  value: high
                - enabled: false
                  title: Urgent
                  value: urgent
              type: list
    MacroAttachmentResponseExample:
      value:
        macro_attachment:
          content_type: image/jpeg
          content_url: https://company.zendesk.com/api/v2/macros/attachments/100/content
          created_at: "2016-08-15T16:04:06Z"
          filename: foobar.jpg
          id: 100
          size: 2532
    MacroAttachmentsResponseExample:
      value:
        macro_attachments:
          - content_type: image/jpeg
            content_url: https://company.zendesk.com/api/v2/macros/attachments/100/content
            created_at: "2016-08-15T16:04:06Z"
            filename: foobar.jpg
            id: 100
            size: 2532
          - content_type: image/jpeg
            content_url: https://company.zendesk.com/api/v2/macros/attachments/342/content
            created_at: "2016-08-16T12:42:25Z"
            filename: bazbat.jpg
            id: 342
            size: 5028
    MacroCategoriesResponseExample:
      value:
        categories:
          - FAQ
          - Triage
    MacroChangesToTicketsResponseExample:
      value:
        result:
          ticket:
            assignee_id: 235323
            comment:
              body: Assigned to Agent Uno.
              public: false
              scoped_body:
                - - channel:all
                  - Assigned to Agent Uno.
            fields:
              id: 27642
              value: "745"
            group_id: 98738
    MacroResponseExample:
      value:
        macro:
          actions: []
          active: true
          description: Sets the ticket status to `solved`
          id: 25
          position: 42
          restriction: {}
          title: Close and Save
    MacrosResponseExample:
      value:
        count: 2
        macros:
          - actions: []
            active: true
            description: Sets the ticket status to `solved`
            id: 25
            position: 42
            restriction: {}
            title: Close and Save
          - actions: []
            active: false
            description: Adds a `priority` tag to the ticket
            id: 26
            restriction: {}
            title: Assign priority tag
        next_page: null
        previous_page: null
    MergeEndUsersRequestExample:
      value:
        user:
          id: 1234
    MergeUserWithCurrentUserRequestExample:
      value:
        user:
          email: roge@example.org
          password: foo1234
    MergeUserWithCurrentUserResponseExample:
      value:
        user:
          id: 9873843
          name: Roger Wilco
    ObjectTriggerBulkUpdateRequestExample:
      value:
        triggers:
          - id: 25
            position: 1
          - active: false
            id: 26
    ObjectTriggerDefinitionResponseExample:
      value:
        definitions:
          actions:
            - group: custom_object
              nullable: true
              repeatable: false
              subject: custom_object.order.custom_fields.due
              title: due
              type: date
              values:
                - enabled: true
                  format: date
                  title: Set to a specific date
                  value: specific_date
                - enabled: true
                  format: text
                  title: Set to a number of days from now
                  value: days_from_now
            - group: custom_object
              nullable: true
              repeatable: false
              subject: custom_object.order.custom_fields.fulfilled
              title: Fulfilled
              type: list
              values:
                - enabled: true
                  title: Checked
                  value: "true"
                - enabled: true
                  title: Unchecked
                  value: "false"
            - group: custom_object
              nullable: true
              repeatable: false
              subject: custom_object.order.custom_fields.heat
              title: heat
              type: text
            - group: custom_object
              nullable: true
              repeatable: false
              subject: custom_object.order.custom_fields.miles
              title: miles
              type: text
          conditions_all:
            - group: custom_object
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
              repeatable: false
              subject: update_type
              title: Order
              type: list
              values:
                - enabled: true
                  title: Created
                  value: Create
                - enabled: true
                  title: Updated
                  value: Change
            - group: custom_object
              nullable: false
              operators:
                - format: date
                  terminal: false
                  title: Is
                  value: is
                - format: date
                  terminal: false
                  title: Is not
                  value: is_not
                - format: date
                  terminal: true
                  title: Present
                  value: present
                - format: date
                  terminal: true
                  title: Not present
                  value: not_present
                - format: date
                  terminal: false
                  title: Before
                  value: less_than
                - format: date
                  terminal: false
                  title: Before or on
                  value: less_than_equal
                - format: date
                  terminal: false
                  title: After
                  value: greater_than
                - format: date
                  terminal: false
                  title: After or on
                  value: greater_than_equal
                - format: integer
                  terminal: false
                  title: Is within the previous
                  value: within_previous_n_days
                - format: integer
                  terminal: false
                  title: Is within the next
                  value: within_next_n_days
              repeatable: false
              subject: custom_object.order.custom_fields.due
              title: due
              type: date
            - group: custom_object
              nullable: true
              operators:
                - terminal: false
                  title: Is
                  value: is
              repeatable: false
              subject: custom_object.order.custom_fields.fulfilled
              title: Fulfilled
              type: list
              values:
                - enabled: true
                  title: Checked
                  value: "true"
                - enabled: true
                  title: Unchecked
                  value: "false"
            - group: custom_object
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
                - terminal: false
                  title: Is not
                  value: is_not
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
                - terminal: false
                  title: Contains at least one of the following words
                  value: includes_words
                - terminal: false
                  title: Contains none of the following words
                  value: not_includes_words
                - terminal: false
                  title: Contains the following string
                  value: includes_string
                - terminal: false
                  title: Does not contain the following string
                  value: not_includes_string
              repeatable: false
              subject: custom_object.order.custom_fields.heat
              title: heat
              type: text
            - group: custom_object
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
                - terminal: false
                  title: Less than
                  value: less_than
                - terminal: false
                  title: Less than or equal to
                  value: less_than_equal
                - terminal: false
                  title: Greater than
                  value: greater_than
                - terminal: false
                  title: Greater than or equal to
                  value: greater_than_equal
                - terminal: false
                  title: Is not
                  value: is_not
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
              repeatable: false
              subject: custom_object.order.custom_fields.miles
              title: miles
              type: text
          conditions_any:
            - group: custom_object
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
              repeatable: false
              subject: update_type
              title: Order
              type: list
              values:
                - enabled: true
                  title: Created
                  value: Create
                - enabled: true
                  title: Updated
                  value: Change
            - group: custom_object
              nullable: false
              operators:
                - format: date
                  terminal: false
                  title: Is
                  value: is
                - format: date
                  terminal: false
                  title: Is not
                  value: is_not
                - format: date
                  terminal: true
                  title: Present
                  value: present
                - format: date
                  terminal: true
                  title: Not present
                  value: not_present
                - format: date
                  terminal: false
                  title: Before
                  value: less_than
                - format: date
                  terminal: false
                  title: Before or on
                  value: less_than_equal
                - format: date
                  terminal: false
                  title: After
                  value: greater_than
                - format: date
                  terminal: false
                  title: After or on
                  value: greater_than_equal
                - format: integer
                  terminal: false
                  title: Is within the previous
                  value: within_previous_n_days
                - format: integer
                  terminal: false
                  title: Is within the next
                  value: within_next_n_days
              repeatable: false
              subject: custom_object.order.custom_fields.due
              title: due
              type: date
            - group: custom_object
              nullable: true
              operators:
                - terminal: false
                  title: Is
                  value: is
              repeatable: false
              subject: custom_object.order.custom_fields.fulfilled
              title: Fulfilled
              type: list
              values:
                - enabled: true
                  title: Checked
                  value: "true"
                - enabled: true
                  title: Unchecked
                  value: "false"
            - group: custom_object
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
                - terminal: false
                  title: Is not
                  value: is_not
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
                - terminal: false
                  title: Contains at least one of the following words
                  value: includes_words
                - terminal: false
                  title: Contains none of the following words
                  value: not_includes_words
                - terminal: false
                  title: Contains the following string
                  value: includes_string
                - terminal: false
                  title: Does not contain the following string
                  value: not_includes_string
              repeatable: false
              subject: custom_object.order.custom_fields.heat
              title: heat
              type: text
            - group: custom_object
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
                - terminal: false
                  title: Less than
                  value: less_than
                - terminal: false
                  title: Less than or equal to
                  value: less_than_equal
                - terminal: false
                  title: Greater than
                  value: greater_than
                - terminal: false
                  title: Greater than or equal to
                  value: greater_than_equal
                - terminal: false
                  title: Is not
                  value: is_not
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
              repeatable: false
              subject: custom_object.order.custom_fields.miles
              title: miles
              type: text
    ObjectTriggerRequestExample:
      value:
        trigger:
          actions:
            - field: custom_object.order.custom_fields.miles
              value: "100"
          conditions:
            all: []
            any:
              - field: custom_object.order.custom_fields.heat
                operator: not_present
          title: active test order trigger with any conditions
    ObjectTriggerResponseExample:
      value:
        trigger:
          actions:
            - field: custom_object.order.custom_fields.miles
              value: "100"
          active: true
          conditions:
            all: []
            any:
              - field: custom_object.order.custom_fields.heat
                operator: not_present
          created_at: "2024-07-08T22:34:49Z"
          description: ""
          id: 27
          position: 3
          raw_title: active test order trigger with any conditions
          title: active test order trigger with any conditions
          updated_at: "2024-07-08T22:34:49Z"
          url: http://{subdomain}.zendesk.com/api/v2/custom_objects/order/triggers/27.json
    ObjectTriggersActiveResponseExample:
      value:
        count: 1
        next_page: null
        previous_page: null
        triggers:
          - actions: []
            active: true
            conditions: {}
            created_at: "2024-06-27T16:51:54Z"
            description: A trigger for custom object of type = order
            id: 25
            position: 1
            raw_title: Order object trigger
            title: Order object trigger
            updated_at: "2024-06-27T16:51:54Z"
            url: http://{subdomain}.zendesk.com/api/v2/custom_objects/order/triggers/25.json
    ObjectTriggersResponseExample:
      value:
        count: 2
        next_page: null
        previous_page: null
        triggers:
          - actions: []
            active: true
            conditions: {}
            created_at: "2024-06-27T16:51:54Z"
            description: A trigger for custom object of type = order
            id: 25
            position: 1
            raw_title: Order object trigger
            title: Order object trigger
            updated_at: "2024-06-27T16:51:54Z"
            url: http://{subdomain}.zendesk.com/api/v2/custom_objects/order/triggers/25.json
          - actions: []
            active: false
            conditions:
              all:
                - field: custom_object.order.custom_fields.heat
                  operator: not_present
              any: []
            created_at: "2024-07-08T20:44:32Z"
            description: Check order's heat and set field as needed
            id: 26
            position: 2
            raw_title: Set order miles when heat not present
            title: Set order miles when heat not present
            updated_at: "2024-07-08T20:44:32Z"
            url: http://{subdomain}.zendesk.com/api/v2/custom_objects/order/triggers/26.json
    ObjectTriggersSearchResponseExample:
      value:
        count: 1
        next_page: null
        previous_page: null
        triggers:
          - actions:
              - field: custom_object.order.custom_fields.miles
                value: "100"
            active: true
            conditions:
              all:
                - field: custom_object.order.custom_fields.heat
                  operator: is
                  value: "1"
              any: []
            created_at: "2024-07-09T21:29:59Z"
            description: ""
            id: 28
            position: 1
            raw_title: Testing CO trigger with tagger field condition
            title: Testing CO trigger with tagger field condition
            updated_at: "2024-07-09T21:29:59Z"
            url: http://{subdomain}.zendesk.com/api/v2/custom_objects/order/triggers/28.json
    OrganizationFieldCreateResponseExample:
      value:
        organization_field:
          active: true
          created_at: "2013-02-27T20:35:55Z"
          description: This field describes the support plan this organization has
          id: 75
          key: support_description
          position: 0
          raw_description: This field describes the support plan this organization has
          raw_title: Support description
          regexp_for_validation: null
          title: Support description
          type: text
          updated_at: "2013-02-27T20:35:55Z"
          url: https://company.zendesk.com/api/v2/organization_fields/75.json
    OrganizationFieldResponseExample:
      value:
        organization_field:
          active: true
          created_at: "2012-10-16T16:04:06Z"
          description: Description of Custom Field
          id: 7
          key: custom_field_1
          position: 9999
          raw_description: '{{dc.my_description}}'
          raw_title: Custom Field 1
          regexp_for_validation: null
          title: Custom Field 1
          type: text
          updated_at: "2012-10-16T16:04:06Z"
          url: https://company.zendesk.com/api/v2/organization_fields/7.json
    OrganizationFieldUpdateResponseExample:
      value:
        organization_field:
          active: true
          created_at: "2013-02-27T20:35:55Z"
          description: This field describes the support plan this organization has
          id: 75
          key: support_description
          position: 0
          raw_description: This field describes the support plan this organization has
          raw_title: Support description
          regexp_for_validation: null
          title: Support description
          type: text
          updated_at: "2013-02-27T20:35:55Z"
          url: https://company.zendesk.com/api/v2/organization_fields/75.json
    OrganizationFieldsResponseExample:
      value:
        count: 1
        next_page: null
        organization_fields:
          - active: true
            created_at: "2012-10-16T16:04:06Z"
            description: Description of Custom Field
            id: 7
            key: custom_field_1
            position: 9999
            raw_description: '{{dc.my_description}}'
            raw_title: Custom Field 1
            regexp_for_validation: null
            title: Custom Field 1
            type: text
            updated_at: "2012-10-16T16:04:06Z"
            url: https://company.zendesk.com/api/v2/organization_fields/7.json
        previous_page: null
    OrganizationMembershipCreateManyResponseExample:
      value:
        job_status:
          id: 8b726e606741012ffc2d782bcb7848fe
          message: Completed at Fri Apr 13 02:51:53 +0000 2012
          progress: 2
          results:
            - action: create
              id: 380
              status: Created
              success: true
          status: completed
          total: 2
          url: https://company.zendesk.com/api/v2/job_statuses/8b726e606741012ffc2d782bcb7848fe.json
    OrganizationMembershipCreateResponseExample:
      value:
        organization_membership:
          created_at: "2012-04-03T12:34:01Z"
          default: true
          id: 461
          organization_id: 88
          updated_at: "2012-04-03T12:34:01Z"
          user_id: 72
    OrganizationMembershipResponseExample:
      value:
        organization_membership:
          created_at: "2009-05-13T00:07:08Z"
          default: true
          id: 4
          organization_id: 12
          updated_at: "2011-07-22T00:11:12Z"
          user_id: 29
    OrganizationMembershipsResponseExample:
      value:
        organization_memberships:
          - created_at: "2009-05-13T00:07:08Z"
            default: true
            id: 4
            organization_id: 12
            organization_name: first organization
            updated_at: "2011-07-22T00:11:12Z"
            user_id: 29
            view_tickets: true
          - created_at: "2012-03-13T22:01:32Z"
            default: null
            id: 49
            organization_id: 3
            organization_name: second organization
            updated_at: "2012-03-13T22:01:32Z"
            user_id: 155
            view_tickets: true
    OrganizationMergeListResponseExample:
      value:
        organization_merges:
          - id: 01HPZM6206BF4G63783E5349AD
            loser_id: 123
            status: complete
            url: https://company.zendesk.com/api/v2/organization_merges/01HPZM6206BF4G63783E5349AD.json
            winner_id: 456
    OrganizationMergeRequestExample:
      value:
        organization_merge:
          winner_id: 54321
    OrganizationMergeResponseExample:
      value:
        organization_merge:
          id: 01HPZM6206BF4G63783E5349AD
          loser_id: 123
          status: new
          url: https://company.zendesk.com/api/v2/organization_merges/01HPZM6206BF4G63783E5349AD.json
          winner_id: 456
    OrganizationResponseExample:
      value:
        organization:
          created_at: "2018-11-14T00:14:52Z"
          details: caterpillar =)
          domain_names:
            - remain.com
          external_id: null
          group_id: 1835962
          id: 4112492
          name: Groablet Enterprises
          notes: donkey
          organization_fields:
            datepudding: "2018-11-04T00:00:00+00:00"
            org_field_1: happy happy
            org_field_2: teapot_kettle
          shared_comments: false
          shared_tickets: false
          tags:
            - smiley
            - teapot_kettle
          updated_at: "2018-11-14T00:54:22Z"
          url: https://example.zendesk.com/api/v2/organizations/4112492.json
    OrganizationSubscriptionCreateRequestExample:
      value:
        organization_subscription:
          organization_id: 32
          user_id: 482
    OrganizationSubscriptionResponseExample:
      value:
        organization_subscription:
          created_at: "2009-07-20T22:55:29Z"
          id: 1234
          organization_id: 32
          user_id: 482
    OrganizationSubscriptionsResponseExample:
      value:
        organization_subscriptions:
          - created_at: "2009-07-20T22:55:29Z"
            id: 1234
            organization_id: 32
            user_id: 482
          - created_at: "2011-08-22T21:12:09Z"
            id: 43681
            organization_id: 334
            user_id: 49471
    OrganizationsRelatedResponse:
      value:
        organization_related:
          tickets_count: 12
          users_count: 4
    OrganizationsResponseExample:
      value:
        count: 2
        next_page: null
        organizations:
          - created_at: "2018-11-14T00:14:52Z"
            details: caterpillar =)
            domain_names:
              - remain.com
            external_id: ABC198
            group_id: 1835962
            id: 4112492
            name: Groablet Enterprises
            notes: donkey
            organization_fields:
              datepudding: "2018-11-04T00:00:00+00:00"
              org_field_1: happy happy
              org_field_2: teapot_kettle
            shared_comments: false
            shared_tickets: false
            tags:
              - smiley
              - teapot_kettle
            updated_at: "2018-11-14T00:54:22Z"
            url: https://example.zendesk.com/api/v2/organizations/4112492.json
          - created_at: "2017-08-14T20:13:52Z"
            details: test
            domain_names:
              - test.com
            external_id: TTV273
            group_id: null
            id: 1873
            name: Willy Wonkas Chocolate Factory
            notes: ""
            organization_fields:
              datepudding: "2018-11-02T00:00:00+00:00"
              org_field_1: malarky
              org_field_2: teapot_kettle
            shared_comments: false
            shared_tickets: false
            tags:
              - teapot_kettle
            updated_at: "2019-05-16T01:27:46Z"
            url: https://example.zendesk.com.com/api/v2/organizations/1873.json
        previous_page: null
    PermanentlyDeleteTicketJobStatusResponseExample:
      value:
        job_status:
          id: 82de0b044094f0c67893ac9fe64f1a99
          message: null
          progress: null
          results: null
          status: queued
          total: null
          url: https://example.zendesk.com/api/v2/job_statuses/82de0b0467893ac9fe64f1a99.json
    PushNotificationDevicesRequestExample:
      value:
        push_notification_devices:
          - token1
          - token2
    QueueCreateResponseExample:
      value:
        queue:
          created_at: "2023-11-27T09:03:59Z"
          definition:
            all:
              - field: priority
                operator: is
                value: urgent
            any: []
          description: Queue description
          id: 01HG80ATNNZK1N7XRFVKX48XD6
          name: New queue with valid definition
          order: 1
          primary_groups:
            count: 2
            groups:
              - id: 6784729637757
                name: EW
              - id: 5399674286077
                name: test
          priority: 1
          secondary_groups:
            count: 0
            groups: []
          updated_at: "2023-11-27T09:03:59Z"
          url: https://company.zendesk.com/api/v2/queues/01HG80ATNNZK1N7XRFVKX48XD6.json
    QueueResponseExample:
      value:
        queue:
          created_at: "2023-11-27T09:03:59Z"
          definition:
            all:
              - field: priority
                operator: is
                value: urgent
            any: []
          description: Queue description
          id: 01HG80ATNNZK1N7XRFVKX48XD6
          name: New queue with valid definition
          order: 1
          primary_groups:
            count: 2
            groups:
              - id: 6784729637757
                name: EW
              - id: 5399674286077
                name: test
          priority: 1
          secondary_groups:
            count: 0
            groups: []
          updated_at: "2023-11-27T09:03:59Z"
          url: https://company.zendesk.com/api/v2/queues/01HG80ATNNZK1N7XRFVKX48XD6.json
    QueuesResponseExample:
      value:
        queues:
          - created_at: "2023-11-27T09:03:59Z"
            definition:
              all:
                - field: priority
                  operator: is
                  value: urgent
              any: []
            description: Queue description
            id: 01HG80ATNNZK1N7XRFVKX48XD6
            name: New queue with valid definition
            order: 1
            primary_groups:
              count: 2
              groups:
                - id: 6784729637757
                  name: EW
                - id: 5399674286077
                  name: test
            priority: 1
            secondary_groups:
              count: 0
              groups: []
            updated_at: "2023-11-27T09:03:59Z"
            url: https://company.zendesk.com/api/v2/queues/01HG80ATNNZK1N7XRFVKX48XD6.json
    QueuesUpdateResponseExample:
      value:
        queue:
          created_at: "2023-09-27T09:06:34Z"
          definition:
            all:
              - field: priority
                operator: is
                value: urgent
            any: []
          description: Queue description 2
          id: 01HG80ATNNZK1N7XRFVKX48XD6
          name: New queue 2
          order: 1
          primary_groups:
            count: 1
            groups:
              - id: 1100002759994
                name: Sales
          priority: 10
          secondary_groups:
            count: 1
            groups:
              - id: 4398063790591
                name: Support
          updated_at: "2023-10-13T10:58:25Z"
          url: https://{subdomain}.zendesk.com/api/v2/queues/01HG80ATNNZK1N7XRFVKX48XD6.json
    RecoverSuspendedTicketResponseExample:
      value:
        ticket:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            custom_status_id: 123
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 35436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    RecoverSuspendedTicketUnprocessableContentResponseExample:
      value:
        ticket:
          - author:
              email: help@example.com
              id: 1
              name: Help
            brand_id: 123
            cause: Received from support address
            cause_id: 22
            content: Your request has been received and is being reviewed by our support staff.
            created_at: "2023-04-06T20:51:31Z"
            error_messages: null
            id: 14668816692628
            message_id: <message-id@mail.gmail.com>
            recipient: support@example.support.com
            subject: Received from support address
            ticket_id: 14668816692628
            updated_at: "2023-04-06T20:51:31Z"
            url: https://example.zendesk.com/api/v2/tickets/14668816692628.json
            via:
              channel: email
              source:
                from:
                  address: help@example.com,
                  name: Help
                rel: null
                to:
                  address: support@example.zendesk.com
                  name: Support,
    RecoverSuspendedTicketsResponseExample:
      value:
        tickets:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            custom_status_id: 123
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 3436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            custom_status_id: 123
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 3437
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    RelationshipFilterDefinitionExample:
      value:
        definitions:
          conditions_all:
            - group: ticket
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
                - terminal: false
                  title: Is not
                  value: is_not
                - terminal: false
                  title: Less than
                  value: less_than
                - terminal: false
                  title: Greater than
                  value: greater_than
                - terminal: true
                  title: Changed
                  value: changed
                - terminal: false
                  title: Changed to
                  value: value
                - terminal: false
                  title: Changed from
                  value: value_previous
                - terminal: true
                  title: Not changed
                  value: not_changed
                - terminal: false
                  title: Not changed to
                  value: not_value
                - terminal: false
                  title: Not changed from
                  value: not_value_previous
              repeatable: false
              subject: status
              title: Status
              type: list
              values:
                - enabled: true
                  title: New
                  value: new
                - enabled: true
                  title: Open
                  value: open
                - enabled: true
                  title: Pending
                  value: pending
                - enabled: true
                  title: Solved
                  value: solved
                - enabled: true
                  title: Closed
                  value: closed
          conditions_any:
            - group: ticket
              nullable: true
              operators:
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
              repeatable: false
              subject: custom_fields_20513432
              title: Happy Gilmore
              type: list
            - group: ticket
              nullable: true
              operators:
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
              repeatable: false
              subject: custom_fields_86492341
              title: total_time_field
              type: list
    RenewSessionResponseExample:
      value:
        authenticity_token: huU19Z76zNC9Yvt+i9p7MviIOlOIg/JWqEdf6nGmnu9JInV04fksCIdtNDvoYAoV
    RequestCreateResponseExample:
      value:
        request:
          custom_status_id: 1
          description: My printer is on fire!
          id: 33
          status: new
          subject: Help!
    RequestGetCommentResponseExample:
      value:
        comment:
          body: Thanks!
          id: 43
    RequestListCommentsResponseExample:
      value:
        comments:
          - body: Thanks for your help
            id: 43
    RequestResponseExample:
      value:
        request:
          custom_status_id: 123
          description: My printer is on fire!
          id: 33
          status: open
          subject: Help!
    RequestUserCreateRequestExample:
      value:
        user:
          email: roge@example.org
          name: Roger Wilco
    RequestsResponseExample:
      value:
        requests:
          - custom_status_id: 123
            description: My printer is on fire!
            id: 33
            status: open
            subject: Help!
          - custom_status_id: 234
            description: I can't find my keys
            id: 34
            status: closed
            subject: Help!
    ResourceCollectionCreateResponseExample:
      value:
        job_status:
          id: 0a3e49b038c40133d7380242ac110031
          message: null
          progress: null
          results: null
          status: queued
          total: null
          url: https://company.zendesk.com/api/v2/job_statuses/0a3e49b038c40133d7380242ac110031.json
    ResourceCollectionDeleteResponseExample:
      value:
        job_status:
          id: 2ee570d0398e0133e26e0242ac110017
          message: null
          progress: null
          results: null
          status: queued
          total: null
          url: https://company.zendesk.com/api/v2/job_statuses/2ee570d0398e0133e26e0242ac110017.json
    ResourceCollectionResponseExample:
      value:
        resource_collection:
          created_at: "2015-09-09T01:57:24Z"
          id: 10002
          resources:
            - deleted: false
              identifier: email_on_ticket_solved
              resource_id: 10824486485524
              type: triggers
            - deleted: false
              identifier: support_description
              resource_id: 10824486482580
              type: ticket_fields
          updated_at: "2015-09-09T01:57:24Z"
    ResourceCollectionUpdateResponseExample:
      value:
        job_status:
          id: 4555831038d20133d7390242ac110031
          message: null
          progress: null
          results: null
          status: queued
          total: null
          url: https://company.zendesk.com/api/v2/job_statuses/4555831038d20133d7390242ac110031.json
    ResourceCollectionsResponseExample:
      value:
        count: 0
        next_page: null
        previous_page: null
        resource_collections:
          - created_at: "2015-09-09T01:57:24Z"
            id: 10002
            resources:
              - deleted: false
                identifier: email_on_ticket_solved
                resource_id: 10824486485524
                type: triggers
              - deleted: false
                identifier: support_description
                resource_id: 10824486482580
                type: ticket_fields
            updated_at: "2015-09-09T01:57:24Z"
          - created_at: "2015-09-10T02:01:03Z"
            id: 10002
            resources:
              - deleted: false
                identifier: an_email_target
                resource_id: 10827267902996
                type: targets
            updated_at: "2015-09-10T02:02:15Z"
    ReverseLookupUsersResponseExample:
      value:
        users:
          - id: 223443
            name: Johnny Agent
          - id: 8678530
            name: James A. Rosen
    SLAPoliciesResponseExample:
      value:
        count: 1
        next_page: null
        previous_page: null
        sla_policies:
          - description: For urgent incidents, we will respond to tickets in 10 minutes
            filter:
              all:
                - field: type
                  operator: is
                  value: incident
                - field: via_id
                  operator: is
                  value: "4"
              any: []
            id: 36
            policy_metrics:
              - business_hours: false
                metric: first_reply_time
                priority: low
                target: 60
            position: 3
            title: Incidents
            url: https://{subdomain}.zendesk.com/api/v2/slas/policies/36.json
    SLAPolicyCreateResponse:
      value:
        sla_policy:
          description: For urgent incidents, we will respond to tickets in 10 minutes
          filter:
            all:
              - field: type
                operator: is
                value: incident
            any: []
          id: 36
          policy_metrics:
            - business_hours: false
              metric: first_reply_time
              priority: normal
              target: 30
            - business_hours: false
              metric: first_reply_time
              priority: urgent
              target: 10
            - business_hours: false
              metric: requester_wait_time
              priority: low
              target: 180
            - business_hours: false
              metric: requester_wait_time
              priority: normal
              target: 160
            - business_hours: false
              metric: requester_wait_time
              priority: high
              target: 140
            - business_hours: false
              metric: requester_wait_time
              priority: urgent
              target: 120
          position: 3
          title: Incidents
          url: https://{subdomain}.zendesk.com/api/v2/slas/policies/36.json
    SLAPolicyFilterDefinitionResponseExample:
      value:
        definitions:
          all:
            - group: ticket
              operators:
                - title: Is
                  value: is
                - title: Is not
                  value: is_not
              target: null
              title: Brand
              value: brand_id
              values:
                list:
                  - title: Support
                    value: "10001"
                type: list
          any:
            - group: ticket
              operators:
                - title: Is
                  value: is
                - title: Is not
                  value: is_not
              target: null
              title: Brand
              value: brand_id
              values:
                list:
                  - title: Support
                    value: "10001"
                type: list
    SLAPolicyResponseExample:
      value:
        sla_policy:
          description: For urgent incidents, we will respond to tickets in 10 minutes
          filter:
            all:
              - field: type
                operator: is
                value: incident
              - field: via_id
                operator: is
                value: "4"
            any: []
          id: 36
          policy_metrics:
            - business_hours: false
              metric: first_reply_time
              priority: low
              target: 60
          position: 3
          title: Incidents
          url: https://{subdomain}.zendesk.com/api/v2/slas/policies/36.json
    SLAPolicyUpdateResponse:
      value:
        sla_policy:
          description: For urgent incidents, we will resolve the ticket within 2 hours
          filter:
            all:
              - field: type
                operator: is
                value: incident
            any: []
          id: 36
          policy_metrics:
            - business_hours: false
              metric: first_reply_time
              priority: normal
              target: 30
            - business_hours: false
              metric: first_reply_time
              priority: urgent
              target: 10
            - business_hours: false
              metric: requester_wait_time
              priority: low
              target: 180
            - business_hours: false
              metric: requester_wait_time
              priority: normal
              target: 160
            - business_hours: false
              metric: requester_wait_time
              priority: high
              target: 140
            - business_hours: false
              metric: requester_wait_time
              priority: urgent
              target: 120
          position: 3
          title: Urgent Incidents
          url: https://{subdomain}.zendesk.com/api/v2/slas/policies/36.json
    SatisfactionRatingResponseExample:
      value:
        satisfaction_rating:
          - assignee_id: 135
            comment: Awesome support!
            created_at: "2011-07-20T22:55:29Z"
            group_id: 44
            id: 35436
            requester_id: 7881
            score: good
            ticket_id: 208
            updated_at: "2011-07-20T22:55:29Z"
            url: https://example.zendesk.com/api/v2/satisfaction_ratings/35436.json
    SatisfactionRatingsCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    SatisfactionRatingsResponseExample:
      value:
        satisfaction_ratings:
          - assignee_id: 135
            comment: Awesome support!
            created_at: "2011-07-20T22:55:29Z"
            group_id: 44
            id: 35436
            requester_id: 7881
            score: good
            ticket_id: 208
            updated_at: "2011-07-20T22:55:29Z"
            url: https://example.zendesk.com/api/v2/satisfaction_ratings/35436.json
          - assignee_id: 136
            comment: Awesome support!
            created_at: "2012-02-01T04:31:29Z"
            group_id: 44
            id: 120447
            requester_id: 7881
            score: good
            ticket_id: 209
            updated_at: "2012-02-02T10:32:59Z"
            url: https://example.zendesk.com/api/v2/satisfaction_ratings/120447.json
    SatisfactionReasonResponseExample:
      value:
        reason:
          - created_at: "2011-07-20T22:55:29Z"
            id: 35121
            raw_value: '{{dc.reason_code_1000}}'
            reason_code: 1000
            updated_at: "2011-07-20T22:55:29Z"
            url: https://company.zendesk.com/api/v2/satisfaction_reason/35121.json
            value: Agent did not respond quickly.
    SatisfactionReasonsResponseExample:
      value:
        reasons:
          - created_at: "2011-07-20T22:55:29Z"
            id: 35436
            raw_value: '{{dc.reason_code_1000}}'
            reason_code: 1000
            updated_at: "2011-07-20T22:55:29Z"
            url: https://company.zendesk.com/api/v2/satisfaction_reasons/35436.json
            value: Agent did not respond quickly.
          - created_at: "2011-07-20T22:55:29Z"
            id: 120447
            raw_value: '{{dc.reason_code_1000}}'
            reason_code: 1001
            updated_at: "2011-07-20T22:55:29Z"
            url: https://company.zendesk.com/api/v2/satisfaction_reasons/120447.json
            value: Issue is not resolved.
    SearchCountResponseExample:
      value:
        count: 6
    SearchExportResponseExample:
      value:
        facets: null
        links:
          next: https://example.zendesk.com/api/v2/search/export.json?filter%5Btype%5D=ticket&page%5Bafter%5D=eyJmaWVsZCI6ImNyZWF0ZWRfYXQiLCJkZXNjIjp0cnVlLCJ0aWVCcmVha0ZpZWxkIjoiaWQiLCJ0aWVCcmVha0Rlc2MiOmZhbHNlLCJzb3J0VmFsdWVzIjpudWxsLCJleHBvcnRlZFRodXNGYXIiOjAsInNlc3Npb25TdGFydCI6MTYwNzAzOTI1Mzk4NSwiY3JlYXRlZEF0IjoxNjA3MDM5MjUzOTg1LCJzYWx0ZWRSZXF1ZXN0SGFzaCI6LTQ5ODM0ODc3LCJzYWx0ZWRDdXJzb3JIYXNoIjotMjQwMzQ4MjgwfQ%3D%3D&page%5Bsize%5D=100&query=hello%26page%5Bsize%5D%3D100%26filter%5Btype%5D%3Dticket
          prev: null
        meta:
          after_cursor: eyJmaWVsZCI6ImNyZWF0ZWRfYXQiLCJkZXNjIjp0cnVlLCJ0aWVCcmVha0ZpZWxkIjoiaWQiLCJ0aWVCcmVha0Rlc2MiOmZhbHNlLCJzb3J0VmFsdWVzIjpudWxsLCJleHBvcnRlZFRodXNGYXIiOjAsInNlc3Npb25TdGFydCI6MTYwNzAzOTI1Mzk4NSwiY3JlYXRlZEF0IjoxNjA3MDM5MjUzOTg1LCJzYWx0ZWRSZXF1ZXN0SGFzaCI6LTQ5ODM0ODc3LCJzYWx0ZWRDdXJzb3JIYXNoIjotMjQwMzQ4MjgwfQ==
          before_cursor: null
          has_more: true
        results: []
    SearchResponseExample:
      value:
        count: 1234
        facets: null
        next_page: https://foo.zendesk.com/api/v2/search.json?query="type:Group hello"&sort_by=created_at&sort_order=desc&page=2
        previous_page: null
        results:
          - created_at: "2009-05-13T00:07:08Z"
            id: 211
            name: Hello DJs
            result_type: group
            updated_at: "2011-07-22T00:11:12Z"
            url: https://foo.zendesk.com/api/v2/groups/211.json
          - created_at: "2009-08-26T00:07:08Z"
            id: 122
            name: Hello MCs
            result_type: group
            updated_at: "2010-05-13T00:07:08Z"
            url: https://foo.zendesk.com/api/v2/groups/122.json
    SearchUsersResponseExample:
      value:
        users:
          - id: 35436
            name: Robert Jones
            notes: sigil issue
          - id: 9873843
            name: Terry Gilliam
    SessionResponseExample:
      value:
        session:
          - authenticated_at: "2014-11-18T17:24:29Z"
            id: 3432
            last_seen_at: "2014-11-18T17:30:52Z"
            url: https://company.zendesk.com/api/v2/users/12345/sessions/3432.json
            user_id: 12345
    SessionsResponseExample:
      value:
        sessions:
          - authenticated_at: "2014-11-18T17:24:29Z"
            id: 3432
            last_seen_at: "2014-11-18T17:30:52Z"
            url: https://company.zendesk.com/api/v2/users/12345/sessions/3432.json
            user_id: 12345
    SharingAgreementCreateResponseExample:
      value:
        sharing_agreement:
          created_at: "2012-02-20T22:55:29Z"
          id: 1
          name: Foo @ Zendesk
          partner_name: null
          remote_subdomain: foo
          status: accepted
          type: inbound
          updated_at: "2013-02-20T22:55:29Z"
          url: https://company.zendesk.com/api/v2/agreements/1.json
    SharingAgreementResponseExample:
      value:
        sharing_agreement:
          created_at: "2012-02-20T22:55:29Z"
          id: 1
          name: Foo @ Zendesk
          partner_name: null
          remote_subdomain: foo
          status: accepted
          type: inbound
          updated_at: "2013-02-20T22:55:29Z"
          url: https://company.zendesk.com/api/v2/agreements/1.json
    SharingAgreementUpdateResponseExample:
      value:
        sharing_agreement:
          created_at: "2012-02-20T22:55:29Z"
          id: 1
          name: Foo @ Zendesk
          partner_name: null
          remote_subdomain: foo
          status: accepted
          type: inbound
          updated_at: "2013-02-20T22:55:29Z"
          url: https://company.zendesk.com/api/v2/agreements/1.json
    SharingAgreementsResponseExample:
      value:
        sharing_agreements:
          - created_at: "2012-02-20T22:55:29Z"
            id: 1
            name: Foo @ Zendesk
            partner_name: jira
            status: accepted
            type: inbound
            updated_at: "2013-02-20T22:55:29Z"
            url: https://company.zendesk.com/api/v2/agreements/1.json
    ShowDerivedMacroResponseExample:
      value:
        definitions:
          actions:
            - group: ticket
              nullable: false
              repeatable: false
              subject: status
              title: Status
              type: list
              values:
                - enabled: true
                  title: Open
                  value: "1"
                - enabled: true
                  title: Pending
                  value: "2"
                - enabled: true
                  title: Solved
                  value: "3"
                - enabled: true
                  title: Closed
                  value: "4"
    ShowJobStatusResponseExample:
      value:
        job_status:
          id: 8b726e606741012ffc2d782bcb7848fe
          message: Completed at Fri Apr 13 02:51:53 +0000 2012
          progress: 2
          results:
            - action: update
              id: 380
              status: Updated
              success: true
          status: completed
          total: 2
          url: https://company.zendesk.com/api/v2/job_statuses/8b726e606741012ffc2d782bcb7848fe.json
    ShowManyUsersResponseExample:
      value:
        users:
          - id: 345678
            name: Johnny Appleseed
          - id: 901234
            name: Rupert Root
    SkillBasedRoutingAttributeCreateResponseExample:
      value:
        attribute:
          created_at: "2018-11-15T23:44:45Z"
          id: 6e279587-e930-11e8-a292-09cfcdea1b75
          name: Language
          updated_at: "2018-11-15T23:44:45Z"
          url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/6e279587-e930-11e8-a292-09cfcdea1b75.json
    SkillBasedRoutingAttributeDefinitionsExample:
      value:
        definitions:
          conditions_all:
            - subject: number_of_incidents
              title: Number of incidents
          conditions_any:
            - subject: brand
              title: Brand
    SkillBasedRoutingAttributeResponseExample:
      value:
        attribute:
          created_at: "2018-11-15T23:44:45Z"
          id: 6e279587-e930-11e8-a292-09cfcdea1b75
          name: Language
          updated_at: "2018-11-15T23:44:45Z"
          url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/6e279587-e930-11e8-a292-09cfcdea1b75.json
    SkillBasedRoutingAttributeUpdateResponseExample:
      value:
        attribute:
          created_at: "2018-11-15T23:44:45Z"
          id: 6e279587-e930-11e8-a292-09cfcdea1b75
          name: Lingua
          updated_at: "2018-11-15T23:44:45Z"
          url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/6e279587-e930-11e8-a292-09cfcdea1b75.json
    SkillBasedRoutingAttributeValueCreateResponseExample:
      value:
        attribute_value:
          created_at: "2018-11-08T19:22:58Z"
          id: 6ccddacf-e85e-11e8-a292-ad7686bdff67
          name: Japanese
          updated_at: "2018-11-08T19:22:58Z"
          url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/afa31619-e38b-11e8-a292-5d17513d969b/values/6ccddacf-e85e-11e8-a292-ad7686bdff67.json
    SkillBasedRoutingAttributeValueResponseExample:
      value:
        attribute_value:
          created_at: "2018-11-08T19:22:58Z"
          id: b376b35a-e38b-11e8-a292-e3b6377c5575
          name: French
          updated_at: "2018-11-08T19:22:58Z"
          url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/afa31619-e38b-11e8-a292-5d17513d969b/values/b376b35a-e38b-11e8-a292-e3b6377c5575.json
    SkillBasedRoutingAttributeValueUpdateResponseExample:
      value:
        attribute_value:
          created_at: "2018-11-14T22:41:28Z"
          id: b376b35a-e38b-11e8-a292-e3b6377c5575
          name: German (Advanced)
          updated_at: "2018-11-14T22:45:01Z"
          url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/afa31619-e38b-11e8-a292-5d17513d969b/values/b376b35a-e38b-11e8-a292-e3b6377c5575.json
    SkillBasedRoutingAttributeValuesResponseExample:
      value:
        attribute_values:
          - created_at: "2018-11-08T19:22:58Z"
            id: b376b35a-e38b-11e8-a292-e3b6377c5575
            name: French
            updated_at: "2018-11-08T19:22:58Z"
            url: https://{subdomain}.zendesk.com/api/v2/routing/attributes/afa31619-e38b-11e8-a292-5d17513d969b/values/b376b35a-e38b-11e8-a292-e3b6377c5575.json
    SkillBasedRoutingAttributesResponseExample:
      value:
        attributes:
          - created_at: "2017-12-01T19:29:31Z"
            id: 15821cba-7326-11e8-b07e-950ba849aa27
            name: Color
            updated_at: "2017-12-01T19:29:31Z"
        count: 1
        next_page: null
        previous_page: null
    SkillBasedRoutingTicketAttributesResponseExample:
      value:
        attribute_values:
          - attribute_id: f4a604b1-d6cd-11e7-a492-657e7928664c
            created_at: "2017-12-01T19:29:41Z"
            id: fa1131e2-d6cd-11e7-a492-dbdd5500c7e3
            name: Ocean
            updated_at: "2017-12-01T19:35:45Z"
    SkillBasedRoutingTicketFulfilledResponseExample:
      value:
        fulfilled_ticket_ids:
          - 1
          - 17
    SupportAddressCreateResponseExample:
      value:
        recipient_address:
          brand_id: 123
          cname_status: verified
          created_at: "2017-04-02T22:55:29Z"
          default: false
          email: help@example.zendesk.com
          forwarding_status: waiting
          id: 33
          name: Sales
          spf_status: verified
          updated_at: "2017-04-02T22:55:29Z"
    SupportAddressResponseExample:
      value:
        recipient_address:
          brand_id: 123
          cname_status: unknown
          created_at: "2017-04-02T22:55:29Z"
          default: true
          email: help@example.zendesk.com
          forwarding_status: waiting
          id: 33
          name: Sales
          spf_status: unknown
          updated_at: "2017-04-02T22:55:29Z"
    SupportAddressUpdateResponseExample:
      value:
        recipient_address:
          brand_id: 123
          created_at: "2017-04-02T22:55:29Z"
          default: true
          email: name2@example.com
          forwarding_status: verified
          id: 33
          name: Sales
          updated_at: "2017-05-02T22:55:29Z"
    SupportAddressesResponseExample:
      value:
        recipient_addresses:
          - brand_id: 123
            cname_status: verified
            created_at: "2015-07-20T22:55:29Z"
            default: true
            domain_verification_status: verified
            email: sales@example.zendesk.com
            forwarding_status: unknown
            id: 33
            name: Sales
            spf_status: verified
            updated_at: "2016-09-21T20:15:20Z"
          - brand_id: 123
            cname_status: verified
            created_at: "2015-07-20T22:55:29Z"
            default: false
            domain_verification_status: verified
            email: marketing@example.zendesk.com
            forwarding_status: unknown
            id: 34
            name: Marketing
            spf_status: verified
            updated_at: "2016-09-21T20:15:20Z"
    SuspendedTicketResponseExample:
      value:
        suspended_ticket:
          - author:
              email: styx@example.com
              id: 1
              name: Mr. Roboto
            brand_id: 123
            cause: Detected as spam
            content: Out Of Office Reply
            created_at: "2009-07-20T22:55:29Z"
            id: 3436
            recipient: john@example.com
            subject: Help I need somebody!
            ticket_id: 67321
            updated_at: "2011-05-05T10:38:52Z"
            url: https://example.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    SuspendedTicketsAttachmentsResponseExample:
      value:
        upload:
          attachments:
            - content_type: application/ics
              content_url: https://company.zendesk.com/attachments/token/tyBq1ms40dFaHefSIigxZpwGg/?name=calendar.ics
              file_name: calendar.ics
              id: 367
              size: 1166
              thumbnails: []
              url: https://company.zendesk.com/api/v2/attachments/367.json
          token: yrznqgjoa24iw2f
    SuspendedTicketsExportResponseExample:
      value:
        export:
          status: enqueued
          view_id: suspended
    SuspendedTicketsResponseExample:
      value:
        suspended_tickets:
          - attachments: []
            author:
              email: styx@example.com
              id: 1
              name: Mr. Roboto
            brand_id: 123
            cause: Detected as spam
            cause_id: 0
            content: Out Of Office Reply
            created_at: "2009-07-20T22:55:29Z"
            error_messages: null
            id: 435
            message_id: Spambot@spam.co.evil
            recipient: john@example.com
            subject: Help, my printer is on fire!
            ticket_id: 67321
            updated_at: "2011-05-05T10:38:52Z"
            url: https://example.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: email
              source:
                from:
                  address: totallylegit@emailaddress.com
                  name: TotallyLegit
                rel: null
                to:
                  address: support@example.zendesk.com
                  name: Example Account
          - attachments: []
            author:
              email: styx@example.com
              id: 1
              name: Mr. Roboto
            brand_id: 123
            cause: Automated response mail
            cause_id: 0
            content: Out Of Office Reply
            created_at: "2009-07-20T22:55:29Z"
            error_messages: null
            id: 207623
            message_id: Spambot@spam.co.evil
            recipient: john@example.com
            subject: Not just anybody!
            ticket_id: 67321
            updated_at: "2011-05-05T10:38:52Z"
            url: https://example.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: email
              source:
                from:
                  address: totallylegit@emailaddress.com
                  name: TotallyLegit
                rel: null
                to:
                  address: support@example.zendesk.com
                  name: Example Account
    TagCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    TagsAutocompleteResponseExample:
      value:
        tags:
          - attention
          - attack
    TagsByObjectIdResponse:
      value:
        tags:
          - urgent
          - printer
          - fire
    TagsResponseExample:
      value:
        count: 1
        next_page: null
        previous_page: null
        tags:
          - count: 10
            name: Triage
    TargetCreateResponseExample:
      value:
        target:
          active: true
          created_at: "2009-05-13T00:07:08Z"
          email: hello@example.com
          subject: Test Target
          title: Test Email Target
          type: email_target
    TargetFailureResponseExample:
      value:
        target_failure:
          id: 1
          raw_request: "GET /api/v2/tickets.json HTTP/1.1\r\nUser-Agent: Zendesk Target\r\n ..."
          raw_response: "HTTP/1.1 401 Unauthorized\r\nServer: nginx\r\n ..."
          status_code: 401
          target_name: My URL Target
    TargetFailuresResponseExample:
      value:
        target_failures:
          - id: 1
            status_code: 401
            target_name: My URL Target
          - id: 2
            status_code: 401
            target_name: My URL Target
    TargetResponseExample:
      value:
        target:
          active: true
          created_at: "2009-05-13T00:07:08Z"
          id: 211
          title: Fancy box
          type: basecamp_target
    TargetUpdateResponseExample:
      value:
        target:
          active: true
          created_at: "2009-05-13T00:07:08Z"
          email: roger@example.com
          subject: Test Target
          title: Test Email Target
          type: email_target
    TargetsResponseExample:
      value:
        targets:
          - active: true
            created_at: "2009-05-13T00:07:08Z"
            id: 211
            title: Fancy box
            type: basecamp_target
    TicketAuditResponseExample:
      value:
        audit:
          author_id: 5246746
          created_at: "2011-09-25T22:35:44Z"
          events:
            - attachments: []
              body: This is a new private comment
              html_body: <p>This is a new private comment</p>
              id: 2127301148
              public: false
              type: Comment
            - field_name: status
              id: 2127301163
              previous_value: new
              type: Change
              value: open
              via:
                channel: rule
                source:
                  from:
                    id: 22472716
                    title: Assign to first responder
                  rel: trigger
                  to: {}
            - field_name: custom_status_id
              id: 2127301164
              previous_value: 1
              type: Change
              value: 123
              via:
                channel: rule
                source:
                  from:
                    id: 22472716
                    title: Assign to first responder
                  rel: trigger
                  to: {}
          id: 2127301143
          metadata:
            custom: {}
            system:
              client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1
              ip_address: 76.218.201.212
              location: San Francisco, CA, United States
          ticket_id: 666
          via:
            channel: web
    TicketAuditsCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 18
    TicketAuditsForTicketResponseExample:
      value:
        audits:
          - author_id: 5246746
            created_at: "2011-09-25T22:35:44Z"
            events:
              - attachments: []
                body: This is a new private comment
                html_body: <p>This is a new private comment</p>
                id: 2127301148
                public: false
                type: Comment
              - field_name: status
                id: 2127301163
                previous_value: new
                type: Change
                value: open
                via:
                  channel: rule
                  source:
                    from:
                      id: 35079792
                      title: Assign to first responder
                    rel: trigger
                    to: {}
              - field_name: custom_status_id
                id: 2127301164
                previous_value: 1
                type: Change
                value: 123
                via:
                  channel: rule
                  source:
                    from:
                      id: 22472716
                      title: Assign to first responder
                    rel: trigger
                    to: {}
            id: 2127301143
            metadata:
              custom: {}
              system:
                client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1
                ip_address: 76.218.201.212
                location: San Francisco, CA, United States
            ticket_id: 666
            via:
              channel: web
        count: 1
        next_page: null
        previous_page: null
    TicketAuditsResponseExample:
      value:
        after_cursor: MTUwMTYwNzUyMi4wfHwxMzQ3NTMxNjcxfA==
        after_url: https://subdomain.zendesk.com/api/v2/ticket_audits.json?cursor=MTUwMTYwNzUyMi4wfHwxMzQ3NTMxNjcxfA%3D%3D&limit=1000
        audits:
          - author_id: 35436
            created_at: "2011-09-25T22:35:44Z"
            events:
              - attachments: []
                body: Thanks for your help!
                id: 1564245
                public: true
                type: Comment
              - body: 'Ticket #47 has been updated'
                id: 1564246
                subject: Your ticket has been updated
                type: Notification
              - field_name: status
                id: 1564247
                previous_value: new
                type: Change
                value: open
              - field_name: custom_status_id
                id: 1564248
                previous_value: 1
                type: Change
                value: 123
            id: 2127301143
            metadata:
              custom:
                time_spent: 3m22s
              system:
                ip_address: 184.106.40.75
            ticket_id: 123
            via:
              channel: web
        before_cursor: fDE1MDE1NzUxMjIuMHx8MTM0NzM0MzAxMQ==
        before_url: https://subdomain.zendesk.com/api/v2/ticket_audits.json?cursor=fDE1MDE1NzUxMjIuMHx8MTM0NzM0MzAxMQ%3D%3D&limit=1000
    TicketBulkImportRequestExample:
      value:
        tickets:
          - assignee_id: 19
            comments:
              - author_id: 827
                created_at: "2009-06-25T10:15:18Z"
                value: This is a comment
              - author_id: 19
                public: false
                value: This is a private comment
            description: A description
            requester_id: 827
            subject: Help
            tags:
              - foo
              - bar
          - assignee_id: 21
            comments:
              - author_id: 830
                created_at: "2009-06-25T10:15:18Z"
                value: This is a comment
              - author_id: 21
                public: false
                value: This is a private comment
            description: A description
            requester_id: 830
            subject: Missing Item
            tags:
              - foo
              - bar
    TicketChatCommentAttachmentRedactionResponseExample:
      value:
        chat_event:
          id: 1932802680168
          type: ChatStartedEvent
          value:
            chat_id: 2109.10502823.Sjuj2YrBpXwei
            history:
              - chat_index: 0
                filename: redacted.txt
                type: ChatFileAttachment
              - chat_index: 1
                filename: redacted.txt
                type: ChatFileAttachment
            visitor_id: 10502823-16EkM3T6VNq7KMd
    TicketChatCommentRedactionResponseExample:
      value:
        chat_event:
          id: 1932802680168
          type: ChatStartedEvent
          value:
            chat_id: 2109.10502823.Sjuj2YrBpXwei
            history:
              - chat_index: 0
                message: My ID number is ▇▇▇▇!
                type: ChatMessage
            visitor_id: 10502823-16EkM3T6VNq7KMd
    TicketCommentStringRedactResponseExample:
      value:
        comment:
          author_id: 1
          id: 35436
          plain_body: My social security number is ▇▇▇▇!
          type: Comment
    TicketCommentsCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 12
    TicketCommentsRedactionInAgentWorkspaceResponseExample:
      value:
        comment:
          attachments: []
          author_id: 123
          id: 100
          plain_body: My ID number is ▇▇▇▇!
          public: true
          type: Comment
    TicketCommentsResponseExample:
      value:
        comments:
          - attachments:
              - content_type: text/plain
                content_url: https://company.zendesk.com/attachments/crash.log
                file_name: crash.log
                id: 498483
                size: 2532
                thumbnails: []
            audit_id: 432567
            author_id: 123123
            body: Thanks for your help!
            created_at: "2009-07-20T22:55:29Z"
            id: 1274
            metadata:
              system:
                client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
                ip_address: 1.1.1.1
                latitude: -37.000000000001
                location: Melbourne, 07, Australia
                longitude: 144.0000000000002
              via:
                channel: web
                source:
                  from: {}
                  rel: web_widget
                  to: {}
            public: true
            type: Comment
    TicketCreateRequestExample:
      value:
        ticket:
          comment:
            body: The smoke is very colorful.
          priority: urgent
          subject: My printer is on fire!
    TicketCreateTicketViaTalkRequestExample:
      value:
        display_to_agent: 1234
        ticket:
          comment:
            body: My printer is on fire!
          priority: urgent
          via_id: 46
          voice_comment:
            answered_by_id: 28
            call_duration: 40
            from: "+16617480240"
            location: Dublin, Ireland
            recording_url: http://yourdomain.com/recordings/1.mp3
            started_at: "2019-04-16T09:14:57Z"
            to: "+16617480123"
            transcription_text: The transcription of the call
    TicketFieldCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    TicketFieldResponseExample:
      value:
        ticket_field:
          active: true
          agent_description: Agent only description
          collapsed_for_agents: false
          created_at: "2012-04-02T22:55:29Z"
          description: Age
          editable_in_portal: false
          id: 89
          position: 9999
          raw_description: Age
          raw_title: Age
          raw_title_in_portal: Age
          regexp_for_validation: null
          required: true
          required_in_portal: false
          tag: null
          title: Age
          title_in_portal: Age
          type: text
          updated_at: "2012-04-02T22:55:29Z"
          url: https://company.zendesk.com/api/v2/ticket_fields/89.json
          visible_in_portal: false
    TicketFieldUpdateResponseExample:
      value:
        ticket_field:
          active: true
          agent_description: Agent only description
          collapsed_for_agents: false
          created_at: "2012-04-02T22:55:29Z"
          description: Your age
          editable_in_portal: false
          id: 89
          position: 9999
          raw_description: Your age
          raw_title: Your age
          raw_title_in_portal: Your age
          regexp_for_validation: null
          required: true
          required_in_portal: false
          tag: null
          title: Your age
          title_in_portal: Your age
          type: text
          updated_at: "2012-04-02T23:11:23Z"
          url: https://company.zendesk.com/api/v2/ticket_fields/89.json
          visible_in_portal: false
    TicketFieldsResponseExample:
      value:
        ticket_fields:
          - active: true
            agent_description: Agent only description
            collapsed_for_agents: false
            created_at: "2009-07-20T22:55:29Z"
            description: This is the subject field of a ticket
            editable_in_portal: true
            id: 34
            position: 21
            raw_description: This is the subject field of a ticket
            raw_title: '{{dc.my_title}}'
            raw_title_in_portal: '{{dc.my_title_in_portal}}'
            regexp_for_validation: null
            required: true
            required_in_portal: true
            tag: null
            title: Subject
            title_in_portal: Subject
            type: subject
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/ticket_fields/34.json
            visible_in_portal: true
    TicketFormCreateResponseExample:
      value:
        ticket_form:
          active: true
          agent_conditions:
            - child_fields:
                - id: 44
                  is_required: false
                  required_on_statuses:
                    statuses:
                      - new
                      - open
                      - pending
                      - hold
                    type: SOME_STATUSES
                - id: 32
                  is_required: true
                  required_on_statuses:
                    statuses:
                      - solved
                    type: SOME_STATUSES
              parent_field_id: 5
              value: matching_value_1
            - child_fields:
                - id: 44
                  is_required: true
                  required_on_statuses:
                    type: ALL_STATUSES
                - id: 32
                  is_required: false
                  required_on_statuses:
                    type: NO_STATUSES
              parent_field_id: 32
              value: matching_value_2
          created_at: "2012-04-02T22:55:29Z"
          default: false
          display_name: Snowboard Damage
          end_user_conditions:
            - child_fields:
                - id: 32
                  is_required: true
              parent_field_id: 5
              value: matching_value_1
            - child_fields:
                - id: 44
                  is_required: false
              parent_field_id: 32
              value: matching_value_2
          end_user_visible: true
          id: 47
          in_all_brands: false
          name: Snowboard Problem
          position: 9999
          raw_display_name: Snowboard Damage
          raw_name: Snowboard Problem
          restricted_brand_ids:
            - 1
            - 4
            - 6
            - 12
            - 34
          ticket_field_ids:
            - 2
            - 4
            - 5
            - 32
            - 44
          updated_at: "2012-04-02T22:55:29Z"
          url: https://company.zendesk.com/api/v2/ticket_forms/47.json
    TicketFormResponseExample:
      value:
        ticket_form:
          active: true
          agent_conditions:
            - child_fields:
                - id: 44
                  is_required: false
                  required_on_statuses:
                    statuses:
                      - new
                      - open
                      - pending
                      - hold
                    type: SOME_STATUSES
                - id: 32
                  is_required: true
                  required_on_statuses:
                    statuses:
                      - solved
                    type: SOME_STATUSES
              parent_field_id: 5
              value: matching_value_1
            - child_fields:
                - id: 44
                  is_required: true
                  required_on_statuses:
                    type: ALL_STATUSES
                - id: 32
                  is_required: false
                  required_on_statuses:
                    type: NO_STATUSES
              parent_field_id: 32
              value: matching_value_2
          created_at: "2012-04-02T22:55:29Z"
          default: true
          display_name: Snowboard Damage
          end_user_conditions:
            - child_fields:
                - id: 32
                  is_required: true
              parent_field_id: 5
              value: matching_value_1
            - child_fields:
                - id: 44
                  is_required: false
              parent_field_id: 32
              value: matching_value_2
          end_user_visible: true
          id: 47
          in_all_brands: false
          name: Snowboard Problem
          position: 9999
          raw_display_name: '{{dc.my_display_name}}'
          raw_name: Snowboard Problem
          restricted_brand_ids:
            - 1
            - 4
            - 6
            - 12
            - 34
          ticket_field_ids:
            - 2
            - 4
            - 5
            - 32
            - 44
          updated_at: "2012-04-02T22:55:29Z"
          url: https://company.zendesk.com/api/v2/ticket_forms/47.json
    TicketFormStatusesResponseExample:
      value:
        ticket_form_statuses:
          - custom_status_id: 7485541848574
            id: 01HFD81Y01D65FJ7EPNNM58GPK
            ticket_form_id: 7485506877054
    TicketFormUpdateResponseExample:
      value:
        ticket_form:
          active: true
          agent_conditions: []
          created_at: "2012-04-02T22:55:29Z"
          default: true
          display_name: Snowboard has been fixed
          end_user_conditions: []
          end_user_visible: true
          id: 47
          in_all_brands: true
          name: Snowboard Fixed
          position: 9999
          raw_display_name: Snowboard has been fixed
          raw_name: Snowboard Fixed
          restricted_brand_ids: []
          ticket_field_ids:
            - 2
            - 4
            - 5
            - 32
            - 44
          updated_at: "2012-04-02T22:55:29Z"
          url: https://company.zendesk.com/api/v2/ticket_forms/47.json
    TicketFormsResponseExample:
      value:
        ticket_forms:
          - active: true
            agent_conditions:
              - child_fields:
                  - id: 44
                    is_required: false
                    required_on_statuses:
                      statuses:
                        - new
                        - open
                        - pending
                        - hold
                      type: SOME_STATUSES
                  - id: 32
                    is_required: true
                    required_on_statuses:
                      statuses:
                        - solved
                      type: SOME_STATUSES
                parent_field_id: 5
                value: matching_value_1
              - child_fields:
                  - id: 44
                    is_required: true
                    required_on_statuses:
                      type: ALL_STATUSES
                  - id: 32
                    is_required: false
                    required_on_statuses:
                      type: NO_STATUSES
                parent_field_id: 32
                value: matching_value_2
            created_at: "2012-04-02T22:55:29Z"
            default: true
            display_name: Snowboard Damage
            end_user_conditions:
              - child_fields:
                  - id: 32
                    is_required: true
                parent_field_id: 5
                value: matching_value_1
              - child_fields:
                  - id: 44
                    is_required: false
                parent_field_id: 32
                value: matching_value_2
            end_user_visible: true
            id: 47
            in_all_brands: false
            name: Snowboard Problem
            position: 9999
            raw_display_name: '{{dc.my_display_name}}'
            raw_name: Snowboard Problem
            restricted_brand_ids:
              - 1
              - 4
              - 6
              - 12
              - 34
            ticket_field_ids:
              - 2
              - 4
              - 5
              - 32
              - 44
            updated_at: "2012-04-02T22:55:29Z"
            url: https://company.zendesk.com/api/v2/ticket_forms/47.json
    TicketImportRequestExample:
      value:
        ticket:
          assignee_id: 19
          comments:
            - author_id: 827
              created_at: "2009-06-25T10:15:18Z"
              value: This is a comment
            - author_id: 19
              public: false
              value: This is a private comment
          description: A description
          requester_id: 827
          subject: Help
          tags:
            - foo
            - bar
    TicketMergeInputExample:
      value:
        ids:
          - 123
          - 456
          - 789
        source_comment: 'Closing in favor of #111'
        target_comment: 'Combining with #123, #456, #789'
    TicketMetricEventsResponseExample:
      value:
        count: 3
        end_time: 1603716792
        next_page: https://company.zendesk.com/api/v2/incremental/ticket_metric_events.json?start_time=1603716792
        ticket_metric_events:
          - id: 926232157301
            instance_id: 0
            metric: agent_work_time
            ticket_id: 155
            time: "2020-10-26T12:53:12Z"
            type: measure
          - id: 926232757371
            instance_id: 1
            metric: agent_work_time
            ticket_id: 155
            time: "2020-10-26T12:53:12Z"
            type: activate
          - id: 926232927415
            instance_id: 0
            metric: pausable_update_time
            ticket_id: 155
            time: "2020-10-26T12:53:12Z"
            type: measure
    TicketMetricResponseExample:
      value:
        ticket_metric:
          - agent_wait_time_in_minutes:
              business: 0
              calendar: 0
            assigned_at: "2020-07-20T06:21:26Z"
            assignee_stations: 0
            assignee_updated_at: "2020-07-20T06:21:26Z"
            created_at: "2020-07-21T01:01:42Z"
            first_resolution_time_in_minutes:
              business: 0
              calendar: 0
            full_resolution_time_in_minutes:
              business: 0
              calendar: 0
            group_stations: 0
            id: 33
            initially_assigned_at: "2020-07-20T06:21:26Z"
            latest_comment_added_at: "2020-07-21T01:17:16Z"
            on_hold_time_in_minutes:
              business: 0
              calendar: 0
            reopens: 0
            replies: 1
            reply_time_in_minutes:
              business: 16
              calendar: 16
            reply_time_in_seconds:
              calendar: 960
            requester_updated_at: "2020-07-21T01:17:16Z"
            requester_wait_time_in_minutes:
              business: 0
              calendar: 0
            solved_at: "2020-07-20T06:21:26Z"
            status_updated_at: "2020-07-21T01:01:41Z"
            ticket_id: 1517
            updated_at: "2020-07-21T01:17:16Z"
            url: https://example.zendesk.com/api/v2/ticket_metrics/33.json
    TicketMetricsResponseExample:
      value:
        ticket_metrics:
          - agent_wait_time_in_minutes:
              business: 0
              calendar: 0
            assigned_at: "2020-07-20T06:21:26Z"
            assignee_stations: 0
            assignee_updated_at: "2020-07-20T06:21:26Z"
            created_at: "2020-07-21T01:01:42Z"
            first_resolution_time_in_minutes:
              business: 0
              calendar: 0
            full_resolution_time_in_minutes:
              business: 0
              calendar: 0
            group_stations: 0
            id: 33
            initially_assigned_at: "2020-07-20T06:21:26Z"
            latest_comment_added_at: "2020-07-21T01:17:16Z"
            on_hold_time_in_minutes:
              business: 0
              calendar: 0
            reopens: 0
            replies: 1
            reply_time_in_minutes:
              business: 16
              calendar: 16
            reply_time_in_seconds:
              calendar: 960
            requester_updated_at: "2020-07-21T01:17:16Z"
            requester_wait_time_in_minutes:
              business: 0
              calendar: 0
            solved_at: "2020-07-20T06:21:26Z"
            status_updated_at: "2020-07-21T01:01:41Z"
            ticket_id: 1517
            updated_at: "2020-07-21T01:17:16Z"
            url: https://example.zendesk.com/api/v2/ticket_metrics/33.json
          - agent_wait_time_in_minutes:
              business: 0
              calendar: 0
            assigned_at: "2020-07-20T06:21:26Z"
            assignee_stations: 0
            assignee_updated_at: "2020-07-20T06:21:26Z"
            created_at: "2020-07-20T06:21:27Z"
            first_resolution_time_in_minutes:
              business: 0
              calendar: 0
            full_resolution_time_in_minutes:
              business: 0
              calendar: 0
            group_stations: 0
            id: 34
            initially_assigned_at: "2020-07-20T06:21:26Z"
            latest_comment_added_at: "2020-07-20T06:21:26Z"
            on_hold_time_in_minutes:
              business: 0
              calendar: 0
            reopens: 0
            replies: 0
            reply_time_in_minutes:
              business: 0
              calendar: 0
            reply_time_in_seconds:
              calendar: 0
            requester_updated_at: "2020-07-20T06:21:26Z"
            requester_wait_time_in_minutes:
              business: 0
              calendar: 0
            solved_at: "2020-07-20T06:21:26Z"
            status_updated_at: "2020-07-20T06:21:26Z"
            ticket_id: 1511
            updated_at: "2020-07-20T06:21:27Z"
            url: https://example.zendesk.com/api/v2/ticket_metrics/34.json
    TicketRelatedInformationExample:
      value:
        followup_source_ids: []
        from_archive: false
        incidents: 7
        jira_issue_ids: []
        topic_id: null
    TicketResponseExample:
      value:
        ticket:
          assignee_id: 235323
          collaborator_ids:
            - 35334
            - 234
          created_at: "2009-07-20T22:55:29Z"
          custom_fields:
            - id: 27642
              value: "745"
            - id: 27648
              value: "yes"
          custom_status_id: 123
          description: The fire is very colorful.
          due_at: null
          external_id: ahg35h3jh
          follower_ids:
            - 35334
            - 234
          from_messaging_channel: false
          generated_timestamp: 1304553600
          group_id: 98738
          has_incidents: false
          id: 35436
          organization_id: 509974
          priority: high
          problem_id: 9873764
          raw_subject: '{{dc.printer_on_fire}}'
          recipient: support@company.com
          requester_id: 20978392
          satisfaction_rating:
            comment: Great support!
            id: 1234
            score: good
          sharing_agreement_ids:
            - 84432
          status: open
          subject: Help, my printer is on fire!
          submitter_id: 76872
          tags:
            - enterprise
            - other_tag
          type: incident
          updated_at: "2011-05-05T10:38:52Z"
          url: https://company.zendesk.com/api/v2/tickets/35436.json
          via:
            channel: web
    TicketSkipCreationExample:
      value:
        skip:
          created_at: "2015-09-30T21:44:03Z"
          id: 1
          reason: I have no idea.
          ticket:
            assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1443575048
            group_id: 98738
            has_incidents: false
            id: 123
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
          ticket_id: 123
          updated_at: "2015-09-30T21:44:03Z"
          user_id: 456
    TicketSkipResponseExample:
      value:
        skips:
          - created_at: "2015-09-30T21:44:03Z"
            id: 1
            reason: I have no idea.
            ticket:
              assignee_id: 235323
              collaborator_ids:
                - 35334
                - 234
              created_at: "2009-07-20T22:55:29Z"
              custom_fields:
                - id: 27642
                  value: "745"
                - id: 27648
                  value: "yes"
              description: The fire is very colorful.
              due_at: null
              external_id: ahg35h3jh
              follower_ids:
                - 35334
                - 234
              from_messaging_channel: false
              generated_timestamp: 1304553600
              group_id: 98738
              has_incidents: false
              id: 123
              organization_id: 509974
              priority: high
              problem_id: 9873764
              raw_subject: '{{dc.printer_on_fire}}'
              recipient: support@company.com
              requester_id: 20978392
              satisfaction_rating:
                comment: Great support!
                id: 1234
                score: good
              sharing_agreement_ids:
                - 84432
              status: open
              subject: Help, my printer is on fire!
              submitter_id: 76872
              tags:
                - enterprise
                - other_tag
              type: incident
              updated_at: "2011-05-05T10:38:52Z"
              url: https://company.zendesk.com/api/v2/tickets/35436.json
              via:
                channel: web
            ticket_id: 123
            updated_at: "2015-09-30T21:44:03Z"
            user_id: 456
          - created_at: "2015-10-01T21:44:03Z"
            id: 2
            reason: I am lost.
            ticket:
              assignee_id: 235323
              collaborator_ids:
                - 35334
                - 234
              created_at: "2009-07-20T22:55:29Z"
              custom_fields:
                - id: 27642
                  value: "745"
                - id: 27648
                  value: "yes"
              description: The fire is very colorful.
              due_at: null
              external_id: ahg35h3jh
              follower_ids:
                - 35334
                - 234
              from_messaging_channel: false
              generated_timestamp: 1304553600
              group_id: 98738
              has_incidents: false
              id: 321
              organization_id: 509974
              priority: high
              problem_id: 9873764
              raw_subject: '{{dc.printer_on_fire}}'
              recipient: support@company.com
              requester_id: 20978392
              satisfaction_rating:
                comment: Great support!
                id: 1234
                score: good
              sharing_agreement_ids:
                - 84432
              status: open
              subject: Help, my printer is on fire!
              submitter_id: 76872
              tags:
                - enterprise
                - other_tag
              type: incident
              updated_at: "2011-05-05T10:38:52Z"
              url: https://company.zendesk.com/api/v2/tickets/35436.json
              via:
                channel: web
            ticket_id: 321
            updated_at: "2015-10-01T21:44:03Z"
            user_id: 654
    TicketUpdateRequestExample:
      value:
        ticket:
          comment:
            body: Thanks for choosing Acme Jet Motors.
            public: true
          custom_status_id: 321
          status: solved
    TicketUpdateResponseExample:
      value:
        audit:
          events:
            - field_name: subject
              id: 206091192546
              type: Create
              value: My printer is on fire!
            - body: The smoke is very colorful.
              id: 206091192547
              type: Comment
            - field_name: status
              id: 206091192548
              type: Create
              value: open
            - field_name: custom_status_id
              id: 206091192549
              type: Create
              value: 123
        ticket:
          custom_status_id: 123
          id: 35436
          requester_id: 123453
          status: open
          subject: My printer is on fire!
    TicketsCreateRequestExample:
      value:
        tickets:
          - comment:
              body: The smoke is very colorful.
            priority: urgent
            subject: My printer is on fire!
          - comment:
              body: This is a comment
            priority: normal
            subject: Help
    TicketsResponseExample:
      value:
        tickets:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            custom_status_id: 123
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 35436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    TimeBasedExportIncrementalTicketsResponseExample:
      value:
        count: 2
        end_of_stream: true
        end_time: 1390362485
        next_page: https://{subdomain}.zendesk.com/api/v2/incremental/tickets.json?per_page=3&start_time=1390362485
        tickets:
          - assignee_id: 235323
            collaborator_ids:
              - 35334
              - 234
            created_at: "2009-07-20T22:55:29Z"
            custom_fields:
              - id: 27642
                value: "745"
              - id: 27648
                value: "yes"
            description: The fire is very colorful.
            due_at: null
            external_id: ahg35h3jh
            follower_ids:
              - 35334
              - 234
            from_messaging_channel: false
            generated_timestamp: 1304553600
            group_id: 98738
            has_incidents: false
            id: 35436
            organization_id: 509974
            priority: high
            problem_id: 9873764
            raw_subject: '{{dc.printer_on_fire}}'
            recipient: support@company.com
            requester_id: 20978392
            satisfaction_rating:
              comment: Great support!
              id: 1234
              score: good
            sharing_agreement_ids:
              - 84432
            status: open
            subject: Help, my printer is on fire!
            submitter_id: 76872
            tags:
              - enterprise
              - other_tag
            type: incident
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/tickets/35436.json
            via:
              channel: web
    TimeBasedExportIncrementalUsersResponseExample:
      value:
        count: 1
        end_of_stream: true
        end_time: 1601357503
        next_page: https://example.zendesk.com/api/v2/incremental/ticket_events.json?start_time=1601357503
        users:
          - active: true
            alias: Mr. Johnny
            created_at: "2009-07-20T22:55:29Z"
            custom_role_id: 9373643
            details: ""
            email: johnny@example.com
            external_id: sai989sur98w9
            id: 35436
            last_login_at: "2011-05-05T10:38:52Z"
            locale: en-US
            locale_id: 1
            moderator: true
            name: Johnny Agent
            notes: Johnny is a nice guy!
            only_private_comments: false
            organization_id: 57542
            phone: "+15551234567"
            photo:
              content_type: image/png
              content_url: https://company.zendesk.com/photos/my_funny_profile_pic.png
              id: 928374
              name: my_funny_profile_pic.png
              size: 166144
              thumbnails:
                - content_type: image/png
                  content_url: https://company.zendesk.com/photos/my_funny_profile_pic_thumb.png
                  id: 928375
                  name: my_funny_profile_pic_thumb.png
                  size: 58298
            restricted_agent: true
            role: agent
            role_type: 0
            shared: false
            shared_agent: false
            signature: Have a nice day, Johnny
            suspended: true
            tags:
              - enterprise
              - other_tag
            ticket_restriction: assigned
            time_zone: Copenhagen
            updated_at: "2011-05-05T10:38:52Z"
            url: https://company.zendesk.com/api/v2/users/35436.json
            user_fields:
              user_date: "2012-07-23T00:00:00Z"
              user_decimal: 5.1
              user_dropdown: option_1
            verified: true
    TrialAccountResponseExample:
      value:
        account:
          name: Sample Partner Account
          subdomain: partner12345
          url: https://partner12345.zendesk.com
    TriggerBulkUpdateRequestExample:
      value:
        triggers:
          - id: 25
            position: 5
          - active: false
            id: 26
          - category_id: "10027"
            id: 27
    TriggerDefinitionResponseExample:
      value:
        definitions:
          actions:
            - group: ticket
              nullable: false
              repeatable: false
              subject: status
              title: Status
              type: list
              values:
                - enabled: true
                  title: Open
                  value: open
                - enabled: true
                  title: Pending
                  value: pending
                - enabled: true
                  title: Solved
                  value: solved
                - enabled: true
                  title: Closed
                  value: closed
          conditions_all:
            - group: ticket
              nullable: false
              operators:
                - terminal: false
                  title: Is
                  value: is
                - terminal: false
                  title: Is not
                  value: is_not
                - terminal: false
                  title: Less than
                  value: less_than
                - terminal: false
                  title: Greater than
                  value: greater_than
                - terminal: true
                  title: Changed
                  value: changed
                - terminal: false
                  title: Changed to
                  value: value
                - terminal: false
                  title: Changed from
                  value: value_previous
                - terminal: true
                  title: Not changed
                  value: not_changed
                - terminal: false
                  title: Not changed to
                  value: not_value
                - terminal: false
                  title: Not changed from
                  value: not_value_previous
              repeatable: false
              subject: status
              title: Status
              type: list
              values:
                - enabled: true
                  title: New
                  value: new
                - enabled: true
                  title: Open
                  value: open
                - enabled: true
                  title: Pending
                  value: pending
                - enabled: true
                  title: Solved
                  value: solved
                - enabled: true
                  title: Closed
                  value: closed
          conditions_any:
            - group: ticket
              nullable: true
              operators:
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
              repeatable: false
              subject: custom_fields_20513432
              title: Happy Gilmore
              type: list
            - group: ticket
              nullable: true
              operators:
                - terminal: true
                  title: Present
                  value: present
                - terminal: true
                  title: Not present
                  value: not_present
              repeatable: false
              subject: custom_fields_86492341
              title: total_time_field
              type: list
    TriggerResponseExample:
      value:
        trigger:
          actions: []
          active: true
          category_id: "10026"
          conditions: {}
          created_at: "2012-09-25T22:50:26Z"
          description: Close and save a ticket
          id: 25
          position: 8
          raw_title: Close and Save
          title: Close and Save
          updated_at: "2012-09-25T22:50:26Z"
          url: http://{subdomain}.zendesk.com/api/v2/triggers/25.json
    TriggerRevisionResponseExample:
      value:
        trigger_revision:
          author_id: 3343
          created_at: "2020-05-28T06:41:43Z"
          id: 1
          snapshot:
            actions:
              - field: notification_target
                value:
                  - "510312"
                  - '{}'
            active: true
            conditions:
              all: []
              any:
                - field: current_tags
                  operator: includes
                  value: fire_bulk_1
            description: null
            title: bulk_test_trigger_1
          url: https://example.zendesk.com/api/v2/triggers/261303831/revisions/1.json
    TriggerRevisionsResponseExample:
      value:
        after_cursor: MTUwMTYwNzUyMi4wfHwxMzQ3NTMxNjcxfA==
        after_url: https://{subdomain}.zendesk.com/api/v2/triggers/{trigger_id}/revisions.json?cursor=MTUwMTYwNzUyMi4wfHwxMzQ3NTMxNjcxfA%3D%3D&limit=20
        before_cursor: fDE1MDE1NzUxMjIuMHx8MTM0NzM0MzAxMQ==
        before_url: https://{subdomain}.zendesk.com/api/v2/triggers/{trigger_id}/revisions.json?cursor=fDE1MDE1NzUxMjIuMHx8MTM0NzM0MzAxMQ%3D%3D&limit=20
        count: 1
        trigger_revisions:
          - author_id: 2
            created_at: "2016-08-15T16:04:06Z"
            diff:
              actions: []
              active: []
              conditions: {}
              description: []
              source_id: 1
              target_id: 2
              title: []
            id: 100
            snapshot:
              actions:
                - field: notification_target
                  value:
                    - "510312"
                    - '{}'
              active: true
              conditions:
                all: []
                any:
                  - field: current_tags
                    operator: includes
                    value: fire_bulk_1
              description: Notifies requester that a comment was updated
              title: Notify requester of comment update
            url: https://{subdomain}.zendesk.com/api/v2/trigger/123/revisions/100.json
    TriggerWithCategoryRequestExample:
      value:
        trigger:
          actions:
            - field: group_id
              value: "20455932"
          category_id: "10026"
          conditions:
            all:
              - field: status
                operator: is
                value: open
              - field: priority
                operator: less_than
                value: high
          title: Roger Wilco
    TriggersActiveResponseExample:
      value:
        count: 2
        next_page: null
        previous_page: null
        triggers:
          - actions: []
            active: true
            conditions: {}
            created_at: "2012-09-25T22:50:26Z"
            description: Close and save a ticket
            id: 25
            position: 8
            raw_title: Close and Save
            title: Close and Save
            updated_at: "2012-09-25T22:50:26Z"
            url: http://{subdomain}.zendesk.com/api/v2/triggers/25.json
          - actions: []
            active: true
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: status
                  operator: less_than
                  value: solved
            created_at: "2012-09-25T22:50:26Z"
            description: Assign a ticket with a priority tag
            id: 26
            position: 9
            raw_title: '{{dc.assign_priority_tag}}'
            title: Assign priority tag
            updated_at: "2012-09-25T22:50:26Z"
            url: http://{subdomain}.zendesk.com/api/v2/triggers/26.json
    TriggersResponseExample:
      value:
        count: 2
        next_page: null
        previous_page: null
        triggers:
          - actions: []
            active: true
            conditions: {}
            created_at: "2012-09-25T22:50:26Z"
            description: Close and save a ticket
            id: 25
            position: 8
            raw_title: Close and Save
            title: Close and Save
            updated_at: "2012-09-25T22:50:26Z"
            url: http://{subdomain}.zendesk.com/api/v2/triggers/25.json
          - actions: []
            active: false
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: status
                  operator: less_than
                  value: solved
                - field: custom_status_id
                  operator: includes
                  value:
                    - "1"
                    - "2"
            created_at: "2012-09-25T22:50:26Z"
            description: Assign a ticket with a priority tag
            id: 26
            position: 9
            raw_title: '{{dc.assign_priority_tag}}'
            title: Assign priority tag
            updated_at: "2012-09-25T22:50:26Z"
            url: http://{subdomain}.zendesk.com/api/v2/triggers/26.json
    TriggersSearchResponseExample:
      value:
        count: 2
        next_page: null
        previous_page: null
        triggers:
          - actions: []
            active: true
            conditions:
              all:
                - field: status
                  operator: less_than
                  value: solved
                - field: assignee_id
                  operator: is
                  value: "296220096"
              any:
                - field: status
                  operator: less_than
                  value: solved
            created_at: "2012-09-25T22:50:26Z"
            description: Close and save a ticket
            id: 25
            position: 9
            raw_title: Close and Save
            title: Close and Save
            updated_at: "2012-09-25T22:50:26Z"
          - actions: []
            active: true
            conditions: {}
            created_at: "2012-09-25T22:50:26Z"
            id: 28
            position: 9
            raw_title: '{{dc.close_and_redirect}}'
            title: Close and redirect to topics
            updated_at: "2012-09-25T22:50:26Z"
    TwitterChannelResponseExample:
      value:
        monitored_twitter_handle:
          created_at: "2010-05-13T22:07:08Z"
          id: 431
          screen_name: '@zendeskops'
          twitter_user_id: 67923318930
          updated_at: "2011-07-22T00:15:19Z"
    TwitterChannelTwicketStatusResponseExample:
      value:
        statuses:
          - favorited: true
            id: 834
            retweeted: false
            user_followed: true
    TwitterChannelsResponseExample:
      value:
        monitored_twitter_handles:
          - created_at: "2009-05-13T00:07:08Z"
            id: 211
            screen_name: '@zendesk'
            twitter_user_id: 67462376832
            updated_at: "2011-07-22T00:11:12Z"
          - created_at: "2010-05-13T22:07:08Z"
            id: 431
            screen_name: '@zendeskops'
            twitter_user_id: 67923318930
            updated_at: "2011-07-22T00:15:19Z"
    UpdateDeletionScheduleRequestExample:
      value:
        deletion_schedule:
          active: true
          conditions:
            all:
              - field: duration_since_last_update
                operator: greater_than
                value: P1Y
            any: []
          description: Delete tickets older than 1 year
          title: some schedule
    UpdateDeletionScheduleResponseExample:
      value:
        deletion_schedule:
          active: true
          conditions:
            all:
              - field: duration_since_last_update
                operator: greater_than
                value: P1Y
            any: []
          default: false
          description: Delete tickets older than 1 year
          id: 7772196094461
          title: some schedule
          url: https://{some domain}.zendesk.com/api/v2/deletion_schedules/7772196094461.json
    UpdateMacroResponseExample:
      value:
        macro:
          actions:
            - field: status
              value: solved
          active: true
          description: Sets the ticket status to `solved`
          id: 25
          position: 42
          restriction: {}
          title: Close and Save
    UpdateManyUsersRequestExample:
      value:
        user:
          organization_id: 1
    UpdateOrganizationResponseExample:
      value:
        organization:
          created_at: "2018-11-14T00:14:52Z"
          details: caterpillar =)
          domain_names:
            - remain.com
          external_id: null
          group_id: 1835962
          id: 4112492
          name: Groablet Enterprises
          notes: Something Interesting
          organization_fields:
            datepudding: "2018-11-04T00:00:00+00:00"
            org_field_1: happy happy
            org_field_2: teapot_kettle
          shared_comments: false
          shared_tickets: false
          tags:
            - smiley
            - teapot_kettle
          updated_at: "2018-11-14T00:54:22Z"
          url: https://example.zendesk.com/api/v2/organizations/4112492.json
    UpdateUserRequestExample:
      value:
        user:
          name: Roger Wilco II
    UpdateUserResponseExample:
      value:
        user:
          id: 9873843
          name: Roger Wilco II
    UserCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 102
    UserCreateResponseExample:
      value:
        user:
          custom_role_id: 123456
          email: roge@example.org
          id: 9873843
          name: Roger Wilco
          organization_id: 57542
          role: agent
          role_type: 0
    UserFieldCreateResponseExample:
      value:
        user_field:
          active: true
          created_at: "2013-02-27T20:35:55Z"
          description: This field describes the support plan this user has
          id: 75
          key: support_description
          position: 0
          raw_description: This field describes the support plan this user has
          raw_title: Support description
          regexp_for_validation: null
          title: Support description
          type: text
          updated_at: "2013-02-27T20:35:55Z"
          url: https://company.zendesk.com/api/v2/user_fields/75.json
    UserFieldResponseExample:
      value:
        user_field:
          active: true
          created_at: "2012-10-16T16:04:06Z"
          description: Description of Custom Field
          id: 7
          key: custom_field_1
          position: 9999
          raw_description: '{{dc.my_description}}'
          raw_title: Custom Field 1
          regexp_for_validation: null
          title: Custom Field 1
          type: text
          updated_at: "2012-10-16T16:04:06Z"
          url: https://company.zendesk.com/api/v2/user_fields/7.json
    UserFieldUpdateResponseExample:
      value:
        user_field:
          active: true
          created_at: "2013-02-27T20:35:55Z"
          description: This field describes the support plan this user has
          id: 75
          key: support_description
          position: 0
          raw_description: This field describes the support plan this user has
          raw_title: Support description
          regexp_for_validation: null
          title: Support description
          type: text
          updated_at: "2013-02-27T20:35:55Z"
          url: https://company.zendesk.com/api/v2/user_fields/75.json
    UserFieldsResponseExample:
      value:
        count: 1
        next_page: null
        previous_page: null
        user_fields:
          - active: true
            created_at: "2012-10-16T16:04:06Z"
            description: Description of Custom Field
            id: 7
            key: custom_field_1
            position: 9999
            raw_description: '{{dc.my_description}}'
            raw_title: Custom Field 1
            regexp_for_validation: null
            title: Custom Field 1
            type: text
            updated_at: "2012-10-16T16:04:06Z"
            url: https://company.zendesk.com/api/v2/user_fields/7.json
    UserIdentitiesResponseExample:
      value:
        identities:
          - created_at: "2011-07-20T22:55:29Z"
            id: 35436
            primary: true
            type: email
            updated_at: "2011-07-20T22:55:29Z"
            user_id: 135
            value: someone@example.com
            verified: true
          - created_at: "2012-02-12T14:25:21Z"
            id: 77136
            primary: false
            type: twitter
            updated_at: "2012-02-12T14:25:21Z"
            user_id: 135
            value: didgeridooboy
            verified: true
          - created_at: "2012-02-12T14:25:21Z"
            id: 88136
            primary: true
            type: phone_number
            updated_at: "2012-02-12T14:25:21Z"
            user_id: 135
            value: +1 555-123-4567
            verified: true
    UserIdentityCreateResponseExample:
      value:
        identity:
          created_at: "2012-02-12T14:25:21Z"
          id: 77938
          primary: false
          type: twitter
          updated_at: "2012-02-12T14:25:21Z"
          user_id: 13531
          value: cabanaboy
          verified: false
    UserIdentityResponseExample:
      value:
        identity:
          created_at: "2012-02-12T14:25:21Z"
          id: 77938
          primary: false
          type: twitter
          updated_at: "2012-02-12T14:25:21Z"
          user_id: 13531
          value: cabanaboy
          verified: false
    UserIdentityUpdateResponseExample:
      value:
        identity:
          created_at: "2011-07-20T22:55:29Z"
          deliverable_state: deliverable
          id: 35436
          primary: true
          type: email
          updated_at: "2011-07-20T22:55:29Z"
          user_id: 135
          value: someone@example.com
          verified: true
    UserPasswordRequirementsResponseExample:
      value:
        requirements:
          - must be at least 5 characters
          - must be different from email address
    UserRelatedResponseExample:
      value:
        user_related:
          assigned_tickets: 5
          ccd_tickets: 3
          organization_subscriptions: 1
          requested_tickets: 10
    UserRequestExample:
      value:
        user:
          custom_role_id: 123456
          email: roge@example.org
          identities:
            - type: email
              value: test@user.com
            - type: twitter
              value: tester84
          name: Roger Wilco
          organization:
            name: VIP Customers
          role: agent
    UserResponseExample:
      value:
        user:
          id: 35436
          name: Johnny Agent
    UsersCreateManyRequestExample:
      value:
        users:
          - email: roge@example.org
            name: Roger Wilco
            organization_id: 567812345
            role: agent
          - email: woge@example.org
            name: Woger Rilco
            role: admin
    UsersRequestExample:
      value:
        users:
          - custom_role_id: 123456
            email: roge@example.org
            identities:
              - type: email
                value: test@user.com
              - type: twitter
                value: tester84
            name: Roger Wilco
            organization:
              name: VIP Customers
            role: agent
          - email: woge@example.org
            external_id: account_54321
            name: Woger Rilco
            role: admin
    UsersResponseExample:
      value:
        users:
          - id: 223443
            name: Johnny Agent
          - id: 8678530
            name: James A. Rosen
    ViewCountResponseExample:
      value:
        view_count:
          fresh: true
          pretty: ~700
          url: https://company.zendesk.com/api/v2/views/25/count.json
          value: 719
          view_id: 25
    ViewCountsResponseExample:
      value:
        view_counts:
          - fresh: true
            pretty: ~700
            url: https://company.zendesk.com/api/v2/views/25/count.json
            value: 719
            view_id: 25
          - fresh: false
            pretty: '...'
            url: https://company.zendesk.com/api/v2/views/78/count.json
            value: null
            view_id: 78
    ViewCreateResponseExample:
      value:
        view:
          active: true
          conditions:
            all:
              - field: status
                operator: is
                value: open
              - field: priority
                operator: less_than
                value: high
            any:
              - field: current_tags
                operator: includes
                value: hello
          id: 9873843
          title: Roger Wilco
    ViewExecuteResponseExample:
      value:
        columns:
          - id: locale
            title: Locale
          - id: 5
            title: Account
        groups: []
        rows:
          - group: 1
            locale: en-US
            ticket: {}
        view:
          id: 25
    ViewExportResponseExample:
      value:
        export:
          status: starting
          view_id: 25
    ViewListTicketsResponseEXample:
      value:
        tickets:
          - id: 35436
            requester_id: 20978392
            subject: Help I need somebody!
          - id: 20057623
            requester_id: 20978392
            subject: Not just anybody!
    ViewPreviewResponseExample:
      value:
        columns:
          - id: subject
            title: Subject
        rows:
          - subject: en-US
            ticket: {}
    ViewResponseExample:
      value:
        view:
          active: true
          conditions: {}
          description: View for recent tickets
          execution: {}
          id: 25
          position: 3
          restriction: {}
          title: Tickets updated less than 12 Hours
    ViewUpdateResponseExample:
      value:
        view:
          active: true
          conditions: {}
          description: View for recent tickets
          execution: {}
          id: 25
          position: 3
          restriction: {}
          title: Roger Wilco II
    ViewsActiveResponseExample:
      value:
        count: 2
        next_page: null
        previous_page: null
        views:
          - active: true
            conditions: {}
            description: View for recent tickets
            execution: {}
            id: 25
            position: 3
            restriction: {}
            title: Tickets updated less than 12 Hours
          - active: true
            conditions: {}
            description: View for tickets that are not assigned
            execution: {}
            id: 23
            position: 7
            restriction: {}
            title: Unassigned tickets
    ViewsCountResponseExample:
      value:
        count:
          refreshed_at: "2020-04-06T02:18:17Z"
          value: 16
    ViewsResponseExample:
      value:
        count: 2
        next_page: null
        previous_page: null
        views:
          - active: true
            conditions: {}
            description: View for recent tickets
            execution: {}
            id: 25
            position: 3
            restriction: {}
            title: Tickets updated less than 12 Hours
          - active: false
            conditions: {}
            description: View for tickets that are not assigned
            execution: {}
            id: 23
            position: 7
            restriction: {}
            title: Unassigned tickets
    ViewsUpdateManyResponseExample:
      value:
        views:
          - active: true
            conditions: {}
            description: View for recent tickets
            execution: {}
            id: 123
            position: 8
            restriction: {}
            title: Tickets updated less than 12 Hours
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
security:
  - basicAuth: []
