Enable Bot In Chat Room
info
Advanced API is available in the Business Plan
This endpoint allows you to enable a bot in a specific chat room.
POST
https://api.deadsimplechat.com/consumer/api/v2/bot/:botId/chatroom/:roomId/enable
Request
POST /consumer/api/v2/bot/:botId/chatroom/:roomId/enable
Query Parameters
Parameter | Description | Data Type | Required |
---|---|---|---|
auth | Go to Dashboard -> Developer -> Private Key is your auth | String | Yes |
Path Parameters
Parameter | Description | Data Type |
---|---|---|
botId | Unique identifier for the bot | String |
roomId | Unique identifier for the chat room | String |
Responses
Success Response
A JSON object containing the following fields:
Field | Description | Data Type |
---|---|---|
success | Indicates if the bot was successfully enabled in the chat room | Boolean |
botStatus | Object containing the new status of the bot | Object |
HTTP Status: 200 OK
Body:
{
"success": true,
"botStatus": {
"status": "ENABLED"
}
}
Error Responses
Invalid API Key or Unauthorized Access:
HTTP Status:
401 Unauthorized
Body:
{
"success": false,
"message": "bot not found, or you do not have permission to modify the bot"
}or
{
"success": false,
"message": "chatRoom not found or you do not have the permission to access"
}Server Error:
HTTP Status:
400 Bad Request
Body:
{
"message": "Error message describing the reason"
}
Code Examples
curl
curl -X POST "https://api.deadsimplechat.com/consumer/api/v2/bot/BOT_ID/chatroom/ROOM_ID/enable?auth=API_KEY"
JavaScript (Fetch API)
fetch(`https://api.deadsimplechat.com/consumer/api/v2/bot/${botId}/chatroom/${roomId}/enable?auth=${apiKey}`, {
method: 'POST'
})