Tickets
Create a ticket type
Authorization
AuthorizationstringrequiredAn API token, sent as Bearer <token>.
Needs the settings:write ability
Body
application/jsonai_auto_fillbooleantrue to let the AI save its proposed values straight into every empty field of new tickets of this type; false to keep them as suggestions a teammate accepts, except for fields that have ai_auto on.
auto_resolve_daysintegerA number of days, such as 7.
Format: int32 · Minimum: 1 · Maximum: 90
auto_resolve_messagestringThe message sent in the ticket's conversation when a waiting ticket of this type is resolved on its own after auto_resolve_days, such as "We closed this as we did not hear back." At most 2000 characters. When updating, send null to send no message.
Maximum length: 2000
company_sharingbooleantrue to let verified customers also see tickets of this type opened by others in their own company; false to show each customer only their own.
customer_visiblebooleantrue to let customers open tickets of this type and see them; false to keep the type for the team only. A new type of kind customer starts with true, other kinds with false.
default_resolved_state_idstringId of the ticket state, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
Maximum length: 64
default_state_idstringId of the ticket state, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
Maximum length: 64
descriptionstringThe description of the ticket type, at most 500 characters.
Maximum length: 500
iconstringAn icon as one emoji, such as 📦.
Maximum length: 40
inbox_idstringId of the inbox, starting with inbox_, such as inbox_01jx2m8k4t. Find it with GET /inboxes.
Maximum length: 64
kindstringWhat the type is for: customer (a customer's request tied to a conversation), back_office (work for another team) or tracker (gathers many reports of one problem), such as "customer". It is set when the type is added and never changes; when updating, a value sent here is ignored.
Available options:customerback_officetracker
move_ticketsobject[] | nullWhen state_ids drops a state that still holds tickets of this type, where those tickets go: a list of objects with the dropped state and one of the kept states, such as [{"from_state_id": "tkts_...", "to_state_id": "tkts_..."}].
Maximum items: 100
Show child attributesHide child attributes
from_state_idstringrequiredId of a state that state_ids no longer lists, so the ticket type no longer uses it, but that still holds tickets of this type which must move. Starts with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
Maximum length: 64
to_state_idstringrequiredId of the state those tickets move to, one of the states state_ids keeps, starting with tkts_, such as tkts_01jx2m8k4t. Find it with GET /ticket-states.
Maximum length: 64
namestringThe name of the ticket type, at most 60 characters.
Maximum length: 60
reopen_daysintegerA number of days, such as 7.
Format: int32 · Minimum: 0 · Maximum: 90
state_idsstring[] | nullIds of ticket states, as a list, such as ["tkts_01jx2m8k4t"]. Find them with GET /ticket-states.
Maximum items: 100
team_idstringId of the team, starting with team_, such as team_01jx2m8k4t. Find it with GET /teams.
Maximum length: 64
Response 201
CreateddataobjectrequiredShow child attributesHide child attributes
ai_auto_fillbooleanrequiredTrue when the AI fills in fields on this type's tickets.
archived_atstring | nullrequiredWhen the type was archived: no new tickets can use it, old ones keep it. Null while it is in use.
Format: date-time
auto_resolve_daysinteger | nullrequiredDays a ticket waits on the customer before it resolves itself, 1 to 90. Null when tickets never resolve themselves.
Format: int32
auto_resolve_messagestring | nullrequiredMessage sent to the customer in the ticket's conversation when the ticket resolves itself, up to 2000 characters. Null when none is sent.
company_sharingbooleanrequiredTrue when everyone at the requester's company sees tickets of this type.
customer_visiblebooleanrequiredTrue when the messenger and customer portal show this type.
default_resolved_state_idstring | nullrequiredId of the resolved state tickets of this type move to by default, such as tkts_.... Null when none is set.
default_state_idstring | nullrequiredId of the state new tickets of this type start in, such as tkts_.... Null when none is set.
descriptionstringrequiredWhat this type is for, up to 500 characters. Empty when none is set.
fieldsobject[] | nullrequiredThe type's fields, each with its key, data type and when it is required.
Show child attributesHide child attributes
ai_autobooleanrequiredTrue when the AI may fill this field in by itself.
ai_hintstring | nullrequiredGuidance telling the AI how to fill this field, up to 500 characters. Null when none is set.
archived_atstring | nullrequiredWhen the field was archived: hidden from new work but kept on old tickets. Null while it is in use.
Format: date-time
currencystring | nullrequiredThree-letter uppercase currency code for a currency field, such as USD. Null when none is set.
data_typestringrequiredThe type of value the field holds: short_text, long_text, number, decimal, currency, boolean, date, single_choice, multiple_choice, file, member or company.
descriptionstringrequiredHelp text explaining the field, up to 300 characters. Empty when none is set.
editable_customerbooleanrequiredTrue when the customer may change this field's value.
idstringrequiredThe id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
keystringrequiredThe field's key within its type, lowercase letters, digits and underscores, such as order_number. Use it as the key in a ticket's fields object.
labelstringrequiredThe field's name as people see it, 1 to 80 characters.
objectstringrequiredThe kind of record this is, the same for every record of its kind, such as article.
optionsstring[] | nullrequiredThe choices of a single_choice or multiple_choice field, as a list of strings. Empty for fields without choices.
positionintegerrequiredThe field's place in its type's field order, lower first.
Format: int32
required_createbooleanrequiredTrue when a teammate must give this field a value to create a ticket.
required_create_customerbooleanrequiredTrue when a customer must give this field a value to create a ticket.
required_resolvebooleanrequiredTrue when the field must have a value before the ticket can be resolved.
show_whenobjectrequiredShow child attributesHide child attributes
equalsstring[] | nullValues of the other field under which this one shows. Left out when any value is enough.
fieldstringrequiredKey of the other ticket field that must have a value for this one to show.
type_idstringrequiredId of the ticket type the field belongs to, such as tktt_.... Send it wherever a ticket type is asked for.
visible_customerbooleanrequiredTrue when the customer sees this field on their ticket.
iconstringrequiredName of the type's icon, lowercase with dashes, such as ticket.
idstringrequiredThe id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
inbox_idstring | nullrequiredId of the inbox tickets of this type go to by default, such as inbox_.... Null when none is set.
kindstringrequiredWhat tickets of this type are: customer (a customer's request), back_office (work for another team) or tracker (many reports of one problem).
namestringrequiredThe type's name, 1 to 60 characters.
objectstringrequiredThe kind of record this is, the same for every record of its kind, such as article.
open_ticketsintegerrequiredHow many tickets of this type are open now.
Format: int64
positionintegerrequiredThe type's place in the workspace's order of types, lower first.
Format: int32
reopen_daysintegerrequiredDays a resolved ticket can still be reopened, 0 to 90.
Format: int32
state_idsstring[] | nullrequiredIds of the states this type may use, in its order, such as tkts_.... A ticket of this type can only move to one of these.
team_idstring | nullrequiredId of the team tickets of this type go to by default, such as team_.... Null when none is set.
tickets_by_stateobjectrequiredCount of this type's tickets in each state, trashed ones included, keyed by state id, such as {"tkts_...": 12}.
total_ticketsintegerrequiredHow many tickets of this type exist in all.
Format: int64
Response error
ErrorcodestringrequiredStable code for programs to tell errors apart, such as validation_failed or internal_error.
errorsobjectEach rejected field mapped to its messages. Only present when the input was invalid.
messagestringrequiredWhat went wrong, in words safe to show a person.