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.
support:readGrant 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 Feedbacktriage_run_id,draft_run_id(integer, nullable)status(string) — one of:ready— a draft is available (draft.bodyis the literalNO_REPLYwhen 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 recordedtriaged— the triage finished but no draft could be producedpending— the triage is still runningquarantined— the triage was skipped because the ticket text matched the prompt-injection screen; a human should read itfailed— the triage call failed (seeerror)none— no AI pass has run for this ticket
model(string, nullable) — the model that produced the draft, else the triageclassification(object, nullable — null unless the triage finished):classification(string) — one of: NEEDS_INFO, BUG_SUSPECTED, HOW_TO, FEATURE_REQUEST, BILLING, SPAM_OR_NOISEtype(string, nullable) — suggested ticket type: bug, question, feature_request, billingpriority(string, nullable) — suggested priority: low, medium, high, urgentarea(string, max 80) — a short product-area labelsummary(string, max 500) — one sentence for the agentquestions[](array of strings, up to 3) — what to ask the customer when information is missingbug_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 carriesvalue(the suggested value),label(a readable version of it),reason(one line, nullable),confidence(0–1, nullable),property,mode(showorauto_apply— a property set tohidenever appears) anddecision(nulluntil 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 itsettings(object) — the desk-wide mode for each property, see Get AI Suggestion Settingsdocs[]— 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_aterror(string, nullable) — why the triage was skipped or failedcreated_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
- 200
- 401
- 403
- 404
- 429
OK
Response Headers
Unauthorized
Response Headers
Forbidden
Response Headers
Not Found
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.