Ticket Fields
Create Ticket Field
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
post/api/v2/ticket_fields
Response
Created response
Example response
{
"ticket_field": {
"active": true,
"agent_can_edit": 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
}
}