Skip to main content

Start Autopilot Run

POST 

/api/support/agent/tickets/:ticket/ai/runs

Records the start of an AI agent session on a ticket it owns. The run is created with status pending. Cite its id as run_id on any approval card the session opens, and finish it with Finish Autopilot Run.

Required scope: support:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

The AI agent may only start a run on a ticket it owns — otherwise 409 not_owner (with the current owner), and the agent must abort.

Path parameters

  • ticket (integer) — the ticket id.

Request body (all optional)

  • run_number (integer, nullable, 1–100000) — the agent's own run count for this ticket; when omitted the desk assigns the next number (highest so far + 1)
  • model (string, nullable, max 64) — the model the session runs on
  • started_at (ISO-8601 timestamp, nullable) — when the session started; defaults to now

Responds 201 with the run. Each run has id, kind (always autopilot), status (pending while the session runs; done, failed or skipped once finished), model, output (the result summary object, or null), run_number (the per-ticket run count), started_at, finished_at, cost_usd (number, or null), outcome (the runner's short code for how the session ended, e.g. awaiting_reply_approval, session_error) and created_at. accepted and decisions are always null on autopilot runs.

Authentication: Bearer token with the support:write scope belonging to the AI agent's own account — any other caller, including support admins, gets a 403. No tenant context — this endpoint is central.

Request​

Responses​

Created

Response Headers
    Content-Type