Zendesk Ticket Fields API

The Ticket Fields API from Zendesk — 6 operation(s) for ticket fields.

Documentation

📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/targets/targets/
📖
Documentation
https://developer.zendesk.com/api-reference/sales-crm/resources/account/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/activity_stream/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/channel_framework/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/automations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/bookmarks/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brand_agents/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brands/
📖
Documentation
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/
📖
Documentation
https://developer.zendesk.com/api-reference/custom-data/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/custom_ticket_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/users/users/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/deletion_schedules/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/dynamic_content/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/email_notifications/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/group_sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/groups/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_import/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/job_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/oauth/oauth_tokens/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_subscriptions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/push_notification_devices/
📖
Documentation
https://developer.zendesk.com/api-reference/agent-availability/omnichannel_routing_queues/omnichannel_routing_queues/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/support_addresses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/lookup_relationships/lookup_relationships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/resource_collections/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/skill_based_routing/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_ratings/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_reasons/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/sessions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/sharing_agreements/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_skips/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/suspended_tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_form_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metrics/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/triggers/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/views/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/workspaces/

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

zendesk-ticket-fields-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: '1.0'
  title: Zendesk Account Account Settings Ticket Fields API
  description: Needs a description.
tags:
- name: Ticket Fields
paths:
  /api/v2/ticket_fields:
    get:
      operationId: ListTicketFields
      tags:
      - Ticket Fields
      summary: Zendesk Get  Api V2 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.\n Only accepts [active locale ids](/api-reference/ticketing/account-configuration/locales/#list-locales).\nExample: `locale=\"de\"`.\n"
        schema:
          type: string
      - name: creator
        in: query
        description: "Displays the `creator_user_id` and `creator_app_name` properties. If the ticket field is created\n by an app, `creator_app_name` is the name of the app and `creator_user_id` is `-1`. If the ticket field\n is not created by an app, `creator_app_name` is null\n"
        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: Zendesk Post  Api V2 Ticket_fields
      description: 'Creates any of the following custom field types:


        | Custom field type | Description                                                                                                                                                     |

        |-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|

        | text              | Default custom field type when `type` is not specified                                                                                                          |

        | textarea          | For multi-line text                                                                                                                                             |

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

        | date              | Example: 2021-04-16                                                                                                                                             |

        | integer           | String composed of numbers. May contain an optional decimal point                                                                                               |

        | decimal           | For numbers containing decimals                                                                                                                                 |

        | regexp            | Matches the Regex pattern found in the custom field settings                                                                                                    |

        | partialcreditcard | A credit card number. Only the last 4 digits are retained                                                                                                       |

        | multiselect       | Enables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging to the field''s options.                             |

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

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


        **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 (tagger) field option. The use of tags isn''t validated and can prevent editing in the future.


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


        #### Allowed For


        * Admins


        #### Field limits


        We recommend the following best practices for ticket fields limits. Creating more than these amounts can affect performance.


        * 400 ticket fields per account if your account doesn''t have ticket forms

        * 400 ticket fields per ticket form if your account has ticket forms

        '
      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: Zendesk Get  Api V2 Ticket_fields Ticket_field_id
      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: Zendesk Put  Api V2 Ticket_fields Ticket_field_id
      description: "#### Updating drop-down field options\n\nYou 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.\n\n**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.\n\nUse 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:\n\n```json\n{\"ticket_field\": {\n    \"custom_field_options\": [\n      {\"name\": \"Apple Pie\", \"value\": \"apple\"},\n      {\"name\": \"Pecan Pie\", \"value\": \"pecan\"}\n    ]\n  }\n}\n```\n\n#### Example Request\n\n```bash\ncurl https://{subdomain}.zendesk.com/api/v2/ticket_fields/{id}.json \\\n  -d '{\"ticket_field\": {\"custom_field_options\": [{\"name\": \"Apple Pie\", \"value\": \"apple\"}, {\"name\": \"Pecan Pie\", \"value\": \"pecan\"}]}}' \\\n  -H \"Content-Type: application/json\" -X PUT \\\n  -v -u {email_address}/token:{api_token}\n```\n\n#### Example Response\n\n```http\nStatus: 200 OK\n\n{\n  \"ticket_field\": {\n    \"id\":21938362,\n    \"type\":\"tagger\",\n    \"title\":\"Pies\",\n    ...\n    \"custom_field_options\": [\n      {\n        \"id\":21029772,\n        \"name\":\"Apple Pie\",\n        \"raw_name\":\"Apple Pie\",\n        \"value\":\"apple\",\n        \"default\":false\n      },\n      ...\n    ]\n  }\n}\n```\n\n#### Allowed for\n\n* Admins\n"
      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: Zendesk Delete  Api V2 Ticket_fields Ticket_field_id
      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: Zendesk Get  Api V2 Ticket_fields Ticket_field_id 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: Zendesk Post  Api V2 Ticket_fields Ticket_field_id Options
      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: Zendesk Get  Api V2 Ticket_fields Ticket_field_id Options Ticket_field_option_id
      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: Zendesk Delete  Api V2 Ticket_fields Ticket_field_id Options Ticket_field_option_id
      description: '#### Allowed for

        * Admins

        '
      responses:
        '204':
          description: No Content response
  /api/v2/ticket_fields/count:
    get:
      operationId: CountTicketFields
      tags:
      - Ticket Fields
      summary: Zendesk Get  Api V2 Ticket_fields Count
      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: Zendesk Put  Api V2 Ticket_fields Reorder
      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: ''
components:
  schemas:
    TicketFieldResponse:
      type: object
      properties:
        ticket_field:
          $ref: '#/components/schemas/TicketFieldObject'
    TicketFieldsResponse:
      type: object
      properties:
        ticket_fields:
          type: array
          items:
            $ref: '#/components/schemas/TicketFieldObject'
    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
    TicketFieldCountResponse:
      type: object
      properties:
        count:
          type: object
          properties:
            refreshed_at:
              type: string
              format: date-time
            value:
              type: integer
    CustomFieldOptionResponse:
      type: object
      properties:
        custom_field_option:
          $ref: '#/components/schemas/CustomFieldOptionObject'