Tickets

Tickets: 4 operations of the ChaosDesk REST API.

Retrieves the collection of Ticket resources.

GET/api/tickets

Lists tickets the caller may see. Page-based by default (page, itemsPerPage). For exports and syncs, use cursor pagination: send cursor= (empty) for the first page and follow links.next; results are ordered by id (creation order).

Parameters

pageintegerquery
The collection page number
itemsPerPageintegerquery
The number of items per page
numberintegerquery
number[]integer[]query
statusstringquery
status[]string[]query
prioritystringquery
priority[]string[]query
typestringquery
type[]string[]query
viastringquery
via[]string[]query
assigneestringquery
assignee[]string[]query
groupstringquery
group[]string[]query
requesterstringquery
requester[]string[]query
organizationstringquery
organization[]string[]query
brandstringquery
brand[]string[]query
exists[assignee]booleanquery
exists[group]booleanquery
created_at[before]stringquery
created_at[strictly_before]stringquery
created_at[after]stringquery
created_at[strictly_after]stringquery
updated_at[before]stringquery
updated_at[strictly_before]stringquery
updated_at[after]stringquery
updated_at[strictly_after]stringquery
solved_at[before]stringquery
solved_at[strictly_before]stringquery
solved_at[after]stringquery
solved_at[strictly_after]stringquery
order[number]"asc" | "desc"query
order[updated_at]"asc" | "desc"query
order[created_at]"asc" | "desc"query
order[status]"asc" | "desc"query
order[priority]"asc" | "desc"query
order[subject]"asc" | "desc"query
cursorstringquery
Opt into cursor pagination. Empty for the first page, then the opaque meta.after_cursor / meta.before_cursor value.
limitintegerquery
Cursor page size (1-100, default 25).

Responses

  • 200Ticket collection
  • 403Forbidden

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/tickets" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Creates a Ticket resource.

POST/api/tickets

Request body application/json

subjectstringrequired
commentCommentInput | nullrequired
requester_idstring | null (uuid)
requesterRequesterInput | null
assignee_idstring | null (uuid)
group_idstring | null (uuid)
organization_idstring | null (uuid)
brand_idstring | null (uuid)
problem_idstring | null (uuid)
form_idstring | null (uuid)
status"new" | "open" | "pending" | "hold" | "solved" | "closed" | null
custom_status_idstring | null (uuid)
Zendesk custom_status_id (wins over status).
priority"low" | "normal" | "high" | "urgent" | null
type"question" | "incident" | "problem" | "task" | null
due_atstring | null (date-time)
tagsstring[]
custom_fieldsCustomFieldInput[]
collaborator_idsstring[]

Responses

  • 201Ticket resource created
  • 400Invalid input
  • 403Forbidden
  • 422An error occurred

Example request

curl -X POST "https://yourcompany.chaosdesk.io/api/tickets" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"subject":"string","comment":"string"}'

Retrieves a Ticket resource.

GET/api/tickets/{id}

Parameters

idstringpathrequired
Ticket identifier

Responses

  • 200Ticket resource
  • 403Forbidden
  • 404Not found

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/tickets/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Updates the Ticket resource.

PATCH/api/tickets/{id}

Parameters

idstringpathrequired
Ticket identifier

Request body application/merge-patch+json

subjectstring
status"new" | "open" | "pending" | "hold" | "solved" | "closed"
custom_status_idstring (uuid)
Zendesk custom_status_id: the ticket's status becomes the custom status's category.
priority"low" | "normal" | "high" | "urgent"
type"question" | "incident" | "problem" | "task" | null
due_atstring | null (date-time)
assignee_idstring | null (uuid)
group_idstring | null (uuid)
requester_idstring (uuid)
organization_idstring | null (uuid)
problem_idstring | null (uuid)
form_idstring | null (uuid)
tagsstring[]
replaces all tags
additional_tagsstring[]
remove_tagsstring[]
custom_fieldsCustomFieldInput[]
add_collaborator_idsstring[]
remove_collaborator_idsstring[]
add_follower_idsstring[]
remove_follower_idsstring[]
commentCommentInput
macro_idsstring[]
macros applied to this draft (Zendesk macro_ids): their tag changes are allowed without ticket.edit_tags
time_spentinteger
Seconds the agent spent on this update (Zendesk Time Tracking app); App\TimeTracking\TimeTrackingHook.
versioninteger
Safe update: the ticket version the client last saw.

Responses

  • 200Ticket resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An error occurred

Example request

curl -X PATCH "https://yourcompany.chaosdesk.io/api/tickets/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/merge-patch+json" \
  -d '{"subject":"string","status":"string"}'