Create a ticket

POST/v2/helpdesk/tickets

Open a Helpdesk ticket for a contact from your own system, with a subject, priority, owner, team, tags and an optional first message.

Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.

Creates a ticket in the Helpdesk. Call it when a request reaches you outside the agent, for example from a phone call, a form on your site or an internal tool, and your team should follow it up in the same queue.

Request

POST /v2/helpdesk/tickets

Body fields:

Name Type Required Description
subject string Yes A short title for the request.
contactId string Yes The customer, starting with con_.
status string No open, pending, on_hold, solved or closed. Defaults to open.
priority string No low, normal, high or urgent. Defaults to normal.
assigneeId string No The member who owns the ticket, starting with usr_.
teamId string No The team that handles it, starting with team_.
tags array of strings No Labels to add.
channel string No Where the request came from. Defaults to api.
message string No The first message of the thread, written as the customer.

When you leave out assigneeId and set a teamId, the ticket is assigned by the team's assignment rules, see Assignment algorithm. Triggers run on the new ticket, and the ticket.created webhook is sent.

Example request

curl -X POST https://api.askocto.co/v2/helpdesk/tickets \
  -H "Authorization: Bearer $OCTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Damaged jacket in order A-1042",
    "contactId": "con_9a3f1k",
    "priority": "high",
    "teamId": "team_2c7h5v",
    "tags": ["damaged"],
    "message": "The jacket arrived with a torn sleeve. I would like a replacement."
  }'
const response = await fetch("https://api.askocto.co/v2/helpdesk/tickets", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OCTO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    subject: "Damaged jacket in order A-1042",
    contactId: "con_9a3f1k",
    priority: "high",
    teamId: "team_2c7h5v",
    tags: ["damaged"],
    message: "The jacket arrived with a torn sleeve. I would like a replacement.",
  }),
})

const ticket = await response.json()
console.log(ticket.id, ticket.status)

Example response

A successful call returns 201 Created with the new ticket.

{
  "id": "tkt_4m8x2q",
  "subject": "Damaged jacket in order A-1042",
  "status": "open",
  "priority": "high",
  "assigneeId": "usr_6k9d2r",
  "teamId": "team_2c7h5v",
  "contactId": "con_9a3f1k",
  "tags": ["damaged"],
  "channel": "api",
  "createdAt": "2026-03-20T14:05:00Z",
  "updatedAt": "2026-03-20T14:05:00Z"
}

Response fields

The response is a ticket object. Its fields are described in the Helpdesk overview. In this example assigneeId was filled in by the assignment rules of the team. Add replies and notes with Add a message to a ticket.

Errors

Status Code When
400 invalid_request subject or contactId is missing, or status, priority, tags or another field has an invalid value.
401 unauthorized The API key is missing, malformed or deleted.
404 not_found The contact, member or team does not exist in your workspace.
429 rate_limited Too many requests. Wait for the number of seconds in the Retry-After header.

Something unclear or missing? Tell us and we will fix the page.