POST /api/v2/ticket_fields

Creates any of the following custom field types:

Custom field typeDescription
textDefault custom field type when type is not specified
textareaFor multi-line text
checkboxTo 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.
dateExample: 2021-04-16
integerString composed of numbers. May contain an optional decimal point
decimalFor numbers containing decimals
regexpMatches the Regex pattern found in the custom field settings
partialcreditcardA credit card number. Only the last 4 digits are retained
multiselectEnables users to choose multiple options from a dropdown menu. It contains one or more tag values belonging to the field's options.
taggerSingle-select dropdown menu. It contains one or more tag values belonging to the field's options. Example: ( {"id": 21938362, "value": ["hd_3000", "hd_5555"]})
lookupA field to create a relationship (see 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 in the Zendesk Help Center.

Allowed For

Field limits

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

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
ticket_field Object Yes

The writable attributes accepted when creating a ticket field.

ticket_field.sub_type_id Integer No

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

ticket_field.description String No

Describes the purpose of the ticket field to users

ticket_field.regexp_for_validation String No

For "regexp" fields only. The validation pattern for a field value to be deemed valid

ticket_field.required Boolean No

If true, agents must enter a value in the field to change the ticket status to solved

ticket_field.custom_field_options[] Array No

Required for a custom ticket field of type "multiselect" or "tagger"

ticket_field.custom_field_options[].name String No

The presentation name of the option

ticket_field.custom_field_options[].default Boolean No

Whether the option is selected by default

ticket_field.custom_field_options[].raw_name String No

The dynamic content placeholder, if present, or the name value if not

ticket_field.custom_field_options[].value String No

The tag value applied to the ticket when the option is selected

ticket_field.collapsed_for_agents Boolean No

If true, the field is shown to agents by default. If false, the field is hidden alongside infrequently used fields. Classic interface only

ticket_field.position Integer No

The relative position of the ticket field on a ticket. Note that for accounts with ticket forms, positions are controlled by the different forms

ticket_field.required_in_portal Boolean No

If true, end users must enter a value in the field to create the request

ticket_field.tag String No

For "checkbox" fields only. A tag added to tickets when the checkbox field is selected

ticket_field.relationship_target_type String No

Required for lookup fields. 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.

ticket_field.relationship_filter Object No

A filter definition that allows your autocomplete to filter results

ticket_field.relationship_filter.any[] Array No
ticket_field.relationship_filter.any[].field String No

The field the condition applies to

ticket_field.relationship_filter.any[].operator String No

The comparison operator for the condition

ticket_field.relationship_filter.any[].value No

The value or values to compare against. Accepts a string, an array of strings, or null. Intentionally left untyped: OpenAPI 3.0.3 cannot express a string | array | null union (there is no type: "null", and nullable requires a sibling type), so any narrower schema would wrongly reject one of the three valid forms. The permitted set is documented here rather than enforced by the schema.

ticket_field.relationship_filter.all[] Array No
ticket_field.relationship_filter.all[].field String No

The field the condition applies to

ticket_field.relationship_filter.all[].operator String No

The comparison operator for the condition

ticket_field.relationship_filter.all[].value No

The value or values to compare against. Accepts a string, an array of strings, or null. Intentionally left untyped: OpenAPI 3.0.3 cannot express a string | array | null union (there is no type: "null", and nullable requires a sibling type), so any narrower schema would wrongly reject one of the three valid forms. The permitted set is documented here rather than enforced by the schema.

ticket_field.raw_description String No

The dynamic content placeholder, if present, or the description value if not. See Dynamic Content

ticket_field.active Boolean No

Whether this field is available

ticket_field.raw_title String No

The dynamic content placeholder, if present, or the title value if not. See Dynamic Content

ticket_field.title_in_portal String No

The title of the ticket field for end users in the help center

ticket_field.title String Yes

The title of the ticket field

ticket_field.type String No

The type of the ticket field. Determines which additional attributes are relevant (for example custom_field_options is required for tagger and multiselect). Defaults to text when not specified. Editable only on creation.

Valid values:

  • "date"
  • "textarea"
  • "partial_credit_card"
  • "text"
  • "partialcreditcard"
  • "lookup"
  • "multi_lookup"
  • "checkbox"
  • "regexp"
  • "integer"
  • "tagger"
  • "decimal"
  • "multiselect"
ticket_field.editable_in_portal Boolean No

Whether this field is editable by end users in the help center

ticket_field.agent_description String No

A description of the ticket field that only agents can see

ticket_field.raw_title_in_portal String No

The dynamic content placeholder, if present, or the title_in_portal value if not. See Dynamic Content

ticket_field.visible_in_portal Boolean No

Whether this field is visible to end users in the help center

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.