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.
support:writeGrant 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 onstarted_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
- 201
- 401
- 403
- 404
- 409
- 422
- 429
Created
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Conflict
Response Headers
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.