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
Parameter | Description | Data Type |
---|---|---|
botId | The ID of the bot to disable | String |
roomId | The ID of the chat room | String |
Query Parameters
Parameter | Description | Data Type | Required |
---|---|---|---|
auth | Go to Dashboard -> Developer -> Private Key is your auth | String | Yes |
Responses
Success Response
A JSON object containing the following fields:
Field | Description | Data Type |
---|---|---|
success | Indicates if the operation was successful | Boolean |
message | Success message | String |
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'
})