Get All Bots
info
This API is available to all authenticated customers.
Retrieve a list of all bots associated with a specific customer.
GET
https://api.deadsimplechat.com/consumer/api/v2/bots?auth=<API_KEY>
Request
GET /consumer/api/v2/bots
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 a list of bots associated with the customer.
Field | Description | Data Type |
---|---|---|
success | Indicates if the operation was successful | Boolean |
bots | An array of bot objects | Array of Objects |
Bot Object
Field | Description | Data Type |
---|---|---|
isAllowedInAllChatRooms | Bot access to all chat rooms | Boolean |
enabled | Is the bot enabled | Boolean |
_id | Unique ID of the bot | String |
name | Name of the bot | String |
webhookURL | Webhook URL | String |
customer | ID of the customer associated with bot | String |
created | Date the bot was created | Timestamp |
HTTP Status: 200 OK
Body:
{
"success": true,
"bots": [
{
"isAllowedInAllChatRooms": false,
"enabled": true,
"_id": "653d69f2357917b517297b8d",
"name": "amazingbot",
"webhookURL": "https://your-webhook-url.com/handle-webhook",
"customer": "648e1fd181cea20bd8b1581b",
"created": "2023-10-28T20:07:14.598Z"
}
]
}
Error Responses
Invalid API Key:
HTTP Status:
401 Unauthorized
Body:
{
"message": "Invalid API Key"
}No API Key Specified:
HTTP Status:
400 Bad Request
Body:
{
"message": "Please specify API Key"
}Other Errors:
HTTP Status:
400 Bad Request
Body:
{
"message": "<Error Message>"
}
Code Examples
curl
curl "https://api.deadsimplechat.com/consumer/api/v2/bots?auth=<API_KEY>"
JavaScript (Fetch API)
fetch("https://api.deadsimplechat.com/consumer/api/v2/bots?auth=<API_KEY>")
.then(response => response.json())
.then(data => console.log(data));