Skip to main content

Disable Bot in Chat Room

info

This API is available in all plans including free, premium, and business.

Disables a specified bot in a given chat room by botId and roomId. This endpoint is particularly useful when you want to manually control bot interactions in a specific room without disabling the bot entirely across all rooms.


POST
https://api.deadsimplechat.com/consumer/api/v2/bot/:botId/chatroom/:roomId/disable

Request

POST /consumer/api/v2/bot/:botId/chatroom/:roomId/disable

URL Parameters

ParameterDescriptionData Type
botIdThe ID of the bot to disableString
roomIdThe ID of the chat roomString

Query Parameters

ParameterDescriptionData TypeRequired
authGo to Dashboard -> Developer -> Private Key is your authStringYes

Responses

Success Response

A JSON object containing the following fields:

FieldDescriptionData Type
successIndicates if the operation was successfulBoolean
messageSuccess messageString

HTTP Status: 200 OK

Body:

{
"success": true,
"message": "Bot successfully disabled in the chat room"
}

Error Responses

  • Invalid API Key or Unauthorized Access:

    HTTP Status: 401 Unauthorized

    Body:

    {
    "success": false,
    "message": "Invalid API Key or Unauthorized Access"
    }
  • Bot or Chat Room Not Found:

    HTTP Status: 401 Unauthorized

    Body:

    {
    "success": false,
    "message": "Bot or chat room not found, or you do not have permission to modify"
    }

Code Examples

curl

curl -X POST 'https://api.deadsimplechat.com/consumer/api/v2/bot/<BOT_ID>/chatroom/<ROOM_ID>/disable?auth=<YOUR_API_KEY>'

JavaScript (Fetch API)

fetch(`https://api.deadsimplechat.com/consumer/api/v2/bot/${botId}/chatroom/${roomId}/disable?auth=${apiKey}`, {
method: 'POST'
})