Stop AI Agent Run
POST/api/support/agent/tickets/:ticket/ai/stop
Ask the AI agent to stop the session it is running on this ticket. The agent ends the session on its next check-in, leaves an internal note saying who stopped it, and confirms with Acknowledge AI Agent Stop, which clears work.stop_requested_at. The ticket stays with the AI agent — pause it, take it over or turn the AI off to keep it from starting again. Records an internal ai_stop_requested event; a stop already waiting for the agent's confirmation is not requested twice.
support:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Path parameters
ticket(integer) — the ticket id.
No request body. The response is the updated ticket in the agent shape (see Get Agent Ticket for every field, including the work control fields ai_paused, ai_paused_by, ai_paused_at, ai_disabled, stop_requested_at, stop_requested_by and pending_instructions).
Refused with a 422 (error: not_ai_owned) when the AI agent does not own the ticket.
Authentication: Bearer token with the support:write scope, or an authenticated session, from a caller with an active support role that can work tickets (the viewer role is read-only). No tenant context — this endpoint is central.
If this ticket was merged into another ticket, the request is refused with a 422 whose merged_into (id, number) names the live ticket — send the action there instead.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthorized
Response Headers
Forbidden
Response Headers
Not Found
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.