Skip to main content

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

ParameterDescriptionData Type
botIdUnique identifier of the bot to enableString

Query Parameters

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

Responses

Success Response

A JSON object containing the updated bot information:

FieldDescriptionData Type
successIndicates the success of the requestBoolean
botThe updated bot objectObject

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'
})