Enable Bot
info
Advanced API is available in the Business Plan
Enable a specific bot by updating its enabled
property to true.
POST
https://api.deadsimplechat.com/consumer/api/v2/bot/:botId/enable?auth=<YOUR_API_KEY>
Request
POST /consumer/api/v2/bot/:botId/enable
Path Parameters
Parameter | Description | Data Type |
---|---|---|
botId | Unique identifier of the bot to enable | 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 updated bot information:
Field | Description | Data Type |
---|---|---|
success | Indicates the success of the request | Boolean |
bot | The updated bot object | Object |
HTTP Status: 200 OK
Body:
{
"success": true,
"bot": {
"_id": "12345",
"name": "Sample Bot",
"enabled": true,
// ... other bot properties ...
}
}
Error Responses
Bot Not Found or Unauthorized Access:
HTTP Status:
401 Unauthorized
Body:
{
"success": false,
"message": "bot not found, or customer does not have permission to modify the bot"
}General Error:
HTTP Status:
400 Bad Request
Body:
{
"message": "Error message detailing what went wrong"
}
Code Examples
curl
curl -X POST "https://api.deadsimplechat.com/consumer/api/v2/bot/:botId/enable?auth=<YOUR_API_KEY>"
JavaScript (Fetch API)
fetch(`https://api.deadsimplechat.com/consumer/api/v2/bot/${botId}/enable?auth=${YOUR_API_KEY}`, {
method: 'POST'
})