Skip to content
API PlatformDevelopers
PUT/v1/conversations/{conversation_id}/botbeta

Turn 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

Path

The conversation id.

Body

`false` turns the bot off for this conversation; `true` turns it back on.

Protects against doing it twice if you retry: a retry with the same key gets the first answer back instead of running again.

Test mode (dry run): nothing will change
Turns test mode off for this page only. It switches back when you leave the page.

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

Parameters
FieldTypeWhat it is
conversation_idrequiredstring · pathThe conversation id.pattern ^\d{1,10}$Signed in? Pick one from your data with “My data”.

Body

Body fields
FieldTypeWhat it is
enabledrequiredbooleanfalse turns the bot off for this conversation; true turns it back on.

Headers

Headers
FieldTypeWhat it is
AuthorizationrequiredheaderBearer $API_KEY — your API key.
Api-VersionheaderThe 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-KeyheaderAny 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.

Response fields
FieldTypeWhat it is
conversation_idrequiredstring
enabledrequiredbooleanThe conversation's own bot switch: on = new customer messages may reach the bot.
will_answerrequiredboolean or nullWill 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).
whyrequiredstringIn plain words: why the bot will or will not answer.
why_coderequiredstringone of: answers, conversation_off, workspace_off, channel_off, settings_off, no_bot, bot_inactive, unknown
running_botrequiredobject or nullThe bot running in this conversation now (null: none, or not readable).
idrequiredstring
namerequiredstring or null
default_botrequiredobjectThe bot that starts when none is running.
idrequiredstring or null
namerequiredstring or null
sourcerequiredstringWhere 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_timeoutsrequiredarray of object or nullTimed bot steps still waiting to run (null: not readable).
botrequiredobject or null
idrequiredstring
namerequiredstring or null
atrequiredstring or null
changedrequiredbooleanfalse = it was already in that state; nothing was called.
notesrequiredarray of string
dry_runbooleantrue when this was a dry run: every check ran and nothing changed.

Errors

Errors are application/problem+json. Branch on code.

StatusCodeWhen
400invalid_input

A field is missing or has the wrong format. errors[] points at each field.

401unauthenticated

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).

403entitlement_required

The workspace's plan does not include API access (api_access).

403insufficient_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.

404not_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.

409conflict

Also returned while a request with the same Idempotency-Key is still running.

429rate_limited

The key or workspace went over its rate limit, or a service behind the API asked to slow down. Wait for Retry-After seconds (always sent).

503upstream_unavailable

A service behind the API is briefly unavailable. Safe to retry with backoff.

504timeout

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.