Chatbot Operations

Pause or resume the bot in a conversation

Toggle or set the bot control state for a conversation. When bot control is -1, the bot does not respond to user messages. When bot control is 1, the bot responds to user messages. This endpoint only works for conversations originating from WhatsApp, Instagram, Messenger, WhatsApp Web API, Telegram or LINE.

post/bot-control

Request

  • Base URL: https://api.chat-data.com/api/v2
  • URL: https://api.chat-data.com/api/v2/bot-control
  • Auth: HTTP bearer

Request body

chatbotIdstring required

The unique identifier of the chatbot.

conversationIdstring required

The unique identifier of the conversation.

botControl1 | -1

If provided, sets the bot control state to this value (1 for on, -1 for off). If omitted, the current state is toggled.

botOffMinsinteger

How many minutes the bot should remain off; 0 keeps it off until the next bot control call. Only applies when botControl is set to -1; in every other case the stored value is reset to 0.

Example request

{
  "botControl": -1,
  "botOffMins": 30
}

Response

Successful response.

status'success' required

Example response

{
  "payload": {
    "botControl": -1,
    "botOffMins": 30
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.