/v1/conversations/{conversation_id}/botbetaTurn the bot off or on for a conversation
- Needs
- Turn the chatbot on or off in conversations
(bots:write) - Plan
- Any plan with API access
- Limits
- 60 a minute per key
- Dry run
- Yes — every check runs with ?dry_run=true, nothing changes
- Undo
- Call it again with the opposite enabled.
Turns the chatbot off (enabled: false) or back on (enabled: true) for one conversation, the same switch as Chatbot Enabled in the inbox side panel. Use it when a person takes over a customer from the bot, and to hand the customer back.
Assigning a conversation never stops the bot: assign it, then turn the bot off. Off means no new customer message reaches the bot; the step the bot last reached stays, and a timed step that is already pending may still run. Sending the state the conversation is already in changes nothing (changed: false).
The answer says whether a bot will answer the customer's next message (will_answer) and why in plain words (why, why_code). A bot answers only when chatbots are on for the workspace, for the channel and for this conversation, and there is a bot to run. will_answer is null when it cannot be told for sure: the workspace and channel switches cannot be read yet, or the bot service cannot be asked with this key whether a bot is running or whether the default bot is switched on.
Try it
Protects against doing it twice if you retry: a retry with the same key gets the first answer back instead of running again.
Code and response
curl -X PUT 'https://api.wa-api.cloud/v1/conversations/77410/bot?dry_run=true' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"enabled": false
}'The code reads your key from $API_KEY.
Parameters
| Field | Type | What it is |
|---|---|---|
| conversation_idrequired | string · path | The conversation id.pattern ^\d{1,10}$Signed in? Pick one from your data with “My data”. |
Body
| Field | Type | What it is |
|---|---|---|
| enabledrequired | boolean | false turns the bot off for this conversation; true turns it back on. |
Headers
| Field | Type | What it is |
|---|---|---|
| Authorizationrequired | header | Bearer $API_KEY — your API key. |
| Api-Version | header | The API version to use, e.g. 2026-10-01. Default: the version your key is pinned to.one of: 2026-10-01 · pattern ^\d{4}-\d{2}-\d{2}$ |
| Idempotency-Key | header | Any unique string (8–128 characters). A retry with the same key returns the first answer instead of running twice. Kept 24 hours.pattern ^[A-Za-z0-9._:-]+$ · 8–128 characters |
Response 200
The conversation's bot switch after the call, whether a bot will answer now and why, the running and default bots, and pending timed steps.
| Field | Type | What it is |
|---|---|---|
| conversation_idrequired | string | |
| enabledrequired | boolean | The conversation's own bot switch: on = new customer messages may reach the bot. |
| will_answerrequired | boolean or null | Will a bot answer the customer's next message? Needs the workspace, channel and conversation switches on and a bot to run. null = cannot tell here yet (see why). |
| whyrequired | string | In plain words: why the bot will or will not answer. |
| why_coderequired | string | one of: answers, conversation_off, workspace_off, channel_off, settings_off, no_bot, bot_inactive, unknown |
| running_botrequired | object or null | The bot running in this conversation now (null: none, or not readable). |
| idrequired | string | |
| namerequired | string or null | |
| default_botrequired | object | The bot that starts when none is running. |
| idrequired | string or null | |
| namerequired | string or null | |
| sourcerequired | string | Where the default comes from: conversation (set for this conversation), channel, workspace; none = no default anywhere; unknown = cannot tell here yet.one of: conversation, channel, workspace, none, unknown |
| pending_timeoutsrequired | array of object or null | Timed bot steps still waiting to run (null: not readable). |
| botrequired | object or null | |
| idrequired | string | |
| namerequired | string or null | |
| atrequired | string or null | |
| changedrequired | boolean | false = it was already in that state; nothing was called. |
| notesrequired | array of string | |
| dry_run | boolean | true when this was a dry run: every check ran and nothing changed. |
Errors
Errors are application/problem+json. Branch on code.
| Status | Code | When |
|---|---|---|
| 400 | invalid_input | A field is missing or has the wrong format. |
| 401 | unauthenticated | The Authorization header is missing, the key is unknown, expired or revoked, or the request came from an address outside the key's IP allowlist (checked on every operation, before anything runs). |
| 403 | entitlement_required | The workspace's plan does not include API access ( |
| 403 | insufficient_scope | The key does not have the permission this operation needs. Checked before the body and headers: without the permission, this is the answer whatever was sent. The key does not have the bots:write scope. |
| 404 | not_found | No conversation with this id, or your key cannot see it (another workspace, or a channel you have no access to). Nothing was changed. |
| 409 | conflict | Also returned while a request with the same Idempotency-Key is still running. |
| 429 | rate_limited | The key or workspace went over its rate limit, or a service behind the API asked to slow down. Wait for |
| 503 | upstream_unavailable | A service behind the API is briefly unavailable. Safe to retry with backoff. |
| 504 | timeout | The change did not finish in time. Retry with the same Idempotency-Key: it never runs twice. |
Examples
A person takes over: turn the bot off
Request body
{
"enabled": false
}Response 200
{
"conversation_id": "77410",
"enabled": false,
"will_answer": false,
"why": "The bot is turned off for this conversation: new customer messages do not reach it.",
"why_code": "conversation_off",
"running_bot": null,
"default_bot": {
"id": "b1f0c2",
"name": null,
"source": "workspace"
},
"pending_timeouts": null,
"changed": true,
"notes": [
"No new customer messages reach the bot; the bot's last step stays, and a pending timed step may still run."
]
}Hand the customer back to the bot
Request body
{
"enabled": true
}Response 200
{
"conversation_id": "77410",
"enabled": true,
"will_answer": null,
"why": "A bot answers only if it is switched on: the one already running here if any, else \"b1f0c2\" (the workspace's default). Whether it is switched on cannot be checked here.",
"why_code": "unknown",
"running_bot": null,
"default_bot": {
"id": "b1f0c2",
"name": null,
"source": "workspace"
},
"pending_timeouts": null,
"changed": true,
"notes": []
}Operation path
The same operation is also at POST /v1/ops/inbox_set_conversation_bot, with every field in the JSON body.