POST /api/v2/ticket_fields
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) 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
- 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
Servers
- https://{subdomain}.{domain}.com
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 |
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 |
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 |
|
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 |
|
ticket_field.raw_description |
String | No |
The dynamic content placeholder, if present, or the |
ticket_field.active |
Boolean | No |
Whether this field is available |
ticket_field.raw_title |
String | No |
The dynamic content placeholder, if present, or the |
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 Valid values:
|
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 |
ticket_field.visible_in_portal |
Boolean | No |
Whether this field is visible to end users in the help center |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.