AI Agent Stopped Event
Documentation for the conversation.bot_disabled webhook event
The conversation.bot_disabled event is fired when the AI agent is switched off for a conversation, whoever switched it off.
Event Type
conversation.bot_disabledWhen It's Triggered
The AI can be switched off by any of several actors, and this event is sent for all of them:
- A team member flips the AI toggle in the inbox
- An automated workflow decides the AI cannot cope and hands over to a person
- Your own system calls the AI Agent Control API
- A customer's backend calls the Mobile Chat API
The event is sent once per change. Switching the AI off when it is already off sends nothing, so you will not see repeated events for one handover.
Use this event to:
- Open a ticket in your helpdesk the moment a conversation needs a person
- Alert an on-call agent that a customer is waiting
- Start measuring time-to-first-human-reply
Subscribing to This Event
Open Settings → Webhooks and check AI Agent Stopped in the events list. Only webhooks with conversation.bot_disabled selected receive these requests.
Webhook Payload Structure
{
"event": "conversation.bot_disabled",
"timestamp": "2026-09-10T09:14:03.250Z",
"data": {
"eventId": "6f1c2a9e-4b7d-4f0e-9a51-2d8c3e7b1a44",
"conversationId": "conv_abc123",
"platform": "MESSENGER",
"channelId": "104857362918273",
"platformUserId": "7430219856123047",
"customerName": "John Doe",
"botEnabled": false,
"reason": "customer_asked_for_human",
"actor": {
"source": "workflow",
"memberId": null,
"apiKeyId": null,
"orgApiKeyId": null,
"label": "Zapier: human handover"
},
"ticketId": "ticket_xyz789",
"threadOwnerAppId": null,
"inboxUrl": "https://<your-domain>/app/inbox/all/conv_abc123",
"at": "2026-09-10T09:14:03.118Z"
}
}Field Descriptions
Root Level
| Field | Type | Description |
|---|---|---|
event | string | Always "conversation.bot_disabled" for this event |
timestamp | string (ISO 8601) | When this delivery was sent — not when the change happened |
data | object | The event body, described below |
Data Object
| Field | Type | Description |
|---|---|---|
eventId | string (UUID) | Stable id for this change. Unchanged if a delivery is resent — use it to deduplicate |
conversationId | string | The conversation the AI was switched off for |
platform | string | Channel the conversation runs on. See Platforms |
channelId | string | null | Your Page id on Messenger; the account, number, app or widget id elsewhere. Route on this when you have several Pages |
platformUserId | string | The customer's id on that platform (the PSID on Messenger) |
customerName | string | null | Display name, when the platform gave us one |
botEnabled | boolean | Always false for this event |
reason | string | null | Why it was switched off, when the caller supplied one. Free text, e.g. "customer_asked_for_human" |
actor | object | Who switched it off. See Actor Object |
ticketId | string | null | The ticket this happened inside. null is normal — a conversation need not have an open ticket |
threadOwnerAppId | string | null | On Meta channels, the app that owns the thread. See Messenger Handover Protocol |
inboxUrl | string | null | Deep link to the conversation in the inbox |
at | string (ISO 8601) | When the change actually happened |
Actor Object
| Field | Type | Description |
|---|---|---|
source | string | Which kind of actor. See Actor Sources |
memberId | string | null | The team member, when source is manual |
apiKeyId | string | null | The Mobile Chat API key, when source is agent_api |
orgApiKeyId | string | null | The org API key, when source is org_api |
label | string | null | Free-text label the caller sent, e.g. a workflow name |
Enum Values
Actor Sources
| Source | Who it was |
|---|---|
manual | A team member flipped the toggle in the inbox |
workflow | An automated workflow handed the conversation to a person |
org_api | Your own system, via the AI Agent Control API |
agent_api | A customer's backend, via the Mobile Chat API |
ticket_close and auto_close are re-enable sources and never appear on this event. They are documented on the AI Agent Resumed Event.
Platforms
WEB, FACEBOOK, INSTAGRAM, MESSENGER, WHATSAPP, MOBILE, VOICE
Example Handler
app.post('/webhooks/conversations', (req, res) => {
const { event, data } = req.body;
res.status(200).end(); // answer within 30 seconds, then do the work
if (event === 'conversation.bot_disabled') {
// Your own API calls come back to you as events too — skip them.
if (data.actor.orgApiKeyId === process.env.OUR_API_KEY_ID) return;
if (alreadyHandled(data.eventId)) return; // see Idempotency below
openTicket({
externalId: data.conversationId,
channel: data.channelId,
customer: data.platformUserId,
name: data.customerName,
reason: data.reason,
link: data.inboxUrl,
handedOverAt: data.at,
});
}
});Ignore Your Own Changes
You receive events for changes your own API calls made. They carry actor.source: "org_api" and actor.orgApiKeyId equal to the apiKeyId your calls return. Skip those, or your system will react to itself and may switch the AI back on in a loop.
Idempotency
A delivery that fails is retried automatically, up to 6 attempts in all: 1 minute, 5 minutes, 15 minutes, 1 hour and 6 hours after the previous failure.
A delivery fails when your endpoint can't be reached, times out, or answers 408, 429 or 5xx; any other 4xx is a final answer and is not retried.
You can also resend a delivery by hand from the webhook's logs in Settings → Webhooks.
Every retry and resend carries the same data.eventId and a new timestamp, so deduplicate on data.eventId, never on timestamp.
Verifying the Signature
Every delivery carries an X-Webhook-Signature header: the hex HMAC-SHA256 of the raw request body. See webhook security for the full check, and the AI Agent Control API for a worked example.
Next Steps
- AI Agent Resumed Event — the matching on event
- AI Agent Control API — switch the AI off and on from your own system
- Getting Started Guide