Skip to main content

Get Ticket AI Insights

GET 

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

Returns the latest AI state of a ticket in one object: the triage (classification, suggested type and priority, product area, summary, questions to ask, whether the text proves a bug), the documentation sections that may answer it, and the drafted reply with its withheld state. A drafted reply is only ever a suggestion — it reaches the customer only when an agent sends it. Compare Rerun AI Triage, which starts a new pass; this endpoint only reads.

Required scope: support:read

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

The triage shown is the newest triage run of any status; the draft is the newest completed draft (withheld drafts included).

Path parameters

  • ticket (integer) — the ticket id.

Response fields (data)

  • run_id (integer, nullable) — the draft run id, else the triage run id; use it with Record AI Feedback
  • triage_run_id, draft_run_id (integer, nullable)
  • status (string) — one of:
    • ready — a draft is available (draft.body is the literal NO_REPLY when the triage judged the ticket spam or noise)
    • withheld — the triage confirmed a bug and no release has shipped for the ticket yet, so the draft is held back (draft.withheld_reason = awaiting_deploy); it is released, regenerated as a "this shipped" reply, when a release is recorded
    • triaged — the triage finished but no draft could be produced
    • pending — the triage is still running
    • quarantined — the triage was skipped because the ticket text matched the prompt-injection screen; a human should read it
    • failed — the triage call failed (see error)
    • none — no AI pass has run for this ticket
  • model (string, nullable) — the model that produced the draft, else the triage
  • classification (object, nullable — null unless the triage finished):
    • classification (string) — one of: NEEDS_INFO, BUG_SUSPECTED, HOW_TO, FEATURE_REQUEST, BILLING, SPAM_OR_NOISE
    • type (string, nullable) — suggested ticket type: bug, question, feature_request, billing
    • priority (string, nullable) — suggested priority: low, medium, high, urgent
    • area (string, max 80) — a short product-area label
    • summary (string, max 500) — one sentence for the agent
    • questions[] (array of strings, up to 3) — what to ask the customer when information is missing
    • bug_confirmed (boolean) — true only when the ticket text itself shows a reproducible defect
  • suggestions (object, may be empty) — one entry per suggested ticket property, keyed by property (type, priority, group, assignee, tenant). Each carries value (the suggested value), label (a readable version of it), reason (one line, nullable), confidence (0–1, nullable), property, mode (show or auto_apply — a property set to hide never appears) and decision (null until an agent records one, then {accepted, by_user_id, at, reason} — see Record AI Feedback). A property whose suggestion matches what the ticket already says is not offered, and a run made before a property was suggested carries nothing for it
  • settings (object) — the desk-wide mode for each property, see Get AI Suggestion Settings
  • docs[] — up to 3 documentation matches: title, url, snippet (max 240 chars), score (0–1, best first)
  • draft (object, nullable) — id, body (string), withheld (boolean), withheld_reason (string, nullable — awaiting_deploy), accepted (boolean, nullable — what the agent recorded, see Record AI Feedback), release ({build, url, label}, nullable — set on a draft regenerated after a release), created_at
  • error (string, nullable) — why the triage was skipped or failed
  • created_at (ISO-8601, nullable) — when the draft (else the triage) was created

Authentication: Bearer token with the support:read scope, or an authenticated session, from a caller with an active support role (any role, including viewer). No tenant context — this endpoint is central.

Request

Responses

OK

Response Headers
    Content-Type