Update a ticket
PATCH/v2/helpdesk/tickets/{ticketId}
Change the status, priority, owner, team, subject or tags of a Helpdesk ticket by sending only the fields that change.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
Changes one or more fields of a ticket. Call it to mark a ticket solved when your own system finishes the work, to raise its priority, or to hand it to another team or member.
Request
PATCH /v2/helpdesk/tickets/{ticketId}
Path parameters:
| Name | Type | Required | Description |
|---|---|---|---|
ticketId |
string | Yes | The ID of the ticket, starting with tkt_. |
Body fields. Send only the ones you want to change, and at least one:
| Name | Type | Required | Description |
|---|---|---|---|
subject |
string | No | A new title. |
status |
string | No | open, pending, on_hold, solved or closed. |
priority |
string | No | low, normal, high or urgent. |
assigneeId |
string or null | No | The new owner, starting with usr_. null removes the owner. |
teamId |
string or null | No | The new team, starting with team_. null removes the team. |
tags |
array of strings | No | The full list of tags. It replaces the current tags, so send the tags to keep as well. |
Fields you leave out stay as they are. A change runs the same triggers as a change in the dashboard and sends the ticket.updated webhook, see the Webhooks guide.
Example request
curl -X PATCH https://api.askocto.co/v2/helpdesk/tickets/tkt_4m8x2q \
-H "Authorization: Bearer $OCTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "pending",
"priority": "urgent",
"tags": ["refund", "damaged", "replacement"]
}'
const response = await fetch("https://api.askocto.co/v2/helpdesk/tickets/tkt_4m8x2q", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
status: "pending",
priority: "urgent",
tags: ["refund", "damaged", "replacement"],
}),
})
const ticket = await response.json()
console.log(ticket.status, ticket.updatedAt)
Example response
A successful call returns 200 OK with the updated ticket.
{
"id": "tkt_4m8x2q",
"subject": "Damaged jacket in order A-1042",
"status": "pending",
"priority": "urgent",
"assigneeId": "usr_6k9d2r",
"teamId": "team_2c7h5v",
"contactId": "con_9a3f1k",
"tags": ["refund", "damaged", "replacement"],
"channel": "widget",
"createdAt": "2026-03-20T14:05:00Z",
"updatedAt": "2026-03-20T15:45:00Z"
}
Response fields
The response is the ticket as Get a ticket returns it, with updatedAt set to the time of the change. The contactId and channel of a ticket cannot be changed.
Setting the same values again succeeds and changes nothing. To write to the customer after a change, use Add a message to a ticket.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request |
The body is empty, a field has the wrong type or value, or contactId or channel is present. |
| 401 | unauthorized |
The API key is missing, malformed or deleted. |
| 404 | not_found |
The ticket, member or team does not exist in your workspace. |
| 409 | conflict |
The ticket was merged into another ticket and can no longer be changed. Update the ticket it was merged into. |
| 429 | rate_limited |
Too many requests. Wait for the number of seconds in the Retry-After header. |