Update the ticket capture prompt or setting
PATCH/v1/agents/:agentId/ticket-capture
x-scope: "tickets:write"
Replaces the prompt, the disable_ai_on_ticket setting, or both; a field you leave out
keeps its value, and sending neither is 422 no_settings. The AI follows a new prompt on
its next replies, usually within a minute; a new setting applies to the next ticket the AI
opens. Sending what the agent already has changes nothing. With disable_ai_on_ticket
on, each new ticket the AI opens switches that conversation's AI off before the AI's reply
goes out; the reply then tells the customer a teammate will continue, and the conversation's
AI log records the switch with the ticket number as the reason. A ticket that was already
open, or one your team opens, leaves the AI as it is. Only prompt and
disable_ai_on_ticket are taken: the tool's switch can't be sent, and other fields are
ignored. Both can be changed while the tool is switched off, but the AI opens no tickets
until someone switches it back on in the dashboard. An agent without the tool is
404 ticket_capture_not_found.
Request
Responses
- 200
- 401
- 403
- 404
- 413
- 422
- 429
- 500
- 503
The prompt and the setting as they now are.
Response Headers
Correlation id for this request — paste into support tickets.
Authentication failed. Single code (invalid_api_key) covers every
sub-case: missing header, wrong scheme, malformed, unknown, revoked or
expired key. The message field disambiguates for humans debugging.
One exception: when the key could not be checked because of a server-side
fault, the status is still 401 but type is internal_error and code
is internal_server_error; retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.
Authenticated, but not allowed: insufficient_scope (the key lacks the scope in this
operation's x-scope) or agent_not_authorized (the key is limited to other agents).
Response Headers
Correlation id for this request — paste into support tickets.
ticket_capture_not_found when the agent has no Create Ticket tool, so no ticket capture
prompt; agent_not_found when the agent is not one of your company's agents.
endpoint_not_found when the agent id in the path isn't a UUID.
Response Headers
Correlation id for this request — paste into support tickets.
The request body is larger than 1 MB.
Response Headers
Correlation id for this request — paste into support tickets.
invalid_request_body when the body isn't valid JSON, a field has the wrong type or format, or a field breaks a limit in its schema; param names the field. A query parameter that doesn't parse is invalid_request_body too.
invalid_request for a rule beyond the format, such as a note that is only spaces or a
cursor this list didn't give out.
Response Headers
Correlation id for this request — paste into support tickets.
Per-key rate limit hit. Default is 60/min/key; an endpoint with an
x-rate-limit-per-minute of its own counts in a budget of its own
(today the WhatsApp template endpoints, sendBroadcast, retryBroadcast, inviteMember,
resendInvitation, uploadAttachmentMedia, importAttachmentMedia, createUpload and
importSavedReplyMedia, which share one that allows 10/min/key,
sendConversationMessage, which allows 20/min/key; putUploadContent takes no key and
allows the default 60/min per IP address), and its 429
reports that limit in X-RateLimit-Limit. Retry-After tells you when to retry;
X-RateLimit-Reset is the Unix timestamp of the next window.
Per-success-response
X-RateLimit-*headers are a known gap; on 2xx responses these headers are NOT currently emitted. Customers should rely on 429 +Retry-Afterfor backoff signals.
Response Headers
Correlation id for this request — paste into support tickets.
Seconds to wait before retrying.
The per-minute request limit of the endpoint called. Every key has the same limits today.
Remaining requests in the current window. 0 on rejection.
Unix timestamp at which the current window resets.
Unexpected server-side failure. Retry with exponential backoff. If
the failure persists, send us the correlation_id.
Response Headers
Correlation id for this request — paste into support tickets.
Mojeeb couldn't check access because of a temporary fault: the key's,
or on assignLead and assignConversation the teammate's. Nothing was
changed. Retry with backoff.
Response Headers
Correlation id for this request — paste into support tickets.