API overview
Everything the dashboard does, it does through this API. If you want to automate chatbot creation, bulk-load content, or pull leads into your CRM, this is how.
Creating chatbots, training them and embedding the widget are all done from the dashboard with no code. This section is for automation.
Base URL
https://apimesh.byteleaps.tech/api
Every path in this section is relative to that.
Response envelope
Every response uses the same shape.
Success:
{
"success": true,
"data": {
"chatbot": { }
}
}
The data object contains one or more named keys — chatbot, chatbots,
messages, sources — depending on the endpoint. Each endpoint page documents
what it returns.
Some endpoints that perform an action return a message instead of data:
{
"success": true,
"message": "Chatbot and all related data deleted successfully"
}
Error:
{
"success": false,
"error": {
"message": "Chatbot not found"
}
}
Unexpected server errors also carry a correlation id:
{
"success": false,
"error": {
"message": "Internal Server Error",
"errorId": "3f2b9a1c-..."
}
}
Quote that errorId when reporting a problem — it identifies the exact failure in
the server logs.
Status codes
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad request — validation failed, unsupported file type, file too large |
401 | Not authenticated, or an invalid/revoked widget key |
403 | Authenticated but not allowed — wrong owner, or domain not authorised |
404 | Not found |
429 | Rate limit exceeded, or message allowance used up |
500 | Server error |
Two kinds of authentication
The API has two distinct halves.
Dashboard endpoints manage your account: creating chatbots, adding data sources, reading leads. They authenticate with a session cookie and act on your behalf.
Widget endpoints are what the embedded widget calls: sending a message, fetching config. They authenticate with a widget key sent in a header, and are scoped to a single chatbot.
Request bodies
Send JSON with Content-Type: application/json, except for file uploads which
use multipart/form-data.
Request bodies are limited to 1 MB. File uploads have their own, much larger limits — see Data sources.
Rate limits
All endpoints are rate-limited, with different allowances for authentication, chat, ingestion and everything else.
Reference
| Section | Covers |
|---|---|
| Authentication | Registering, signing in, sessions, widget keys |
| Chatbots | Create, read, update, delete; status, history, leads |
| Data sources | Adding and managing training content |
| Widget keys | Generating and revoking embed keys |
| Widget chat | The endpoints the widget itself calls |
| Rate limits | Limits, 429 handling, size caps |
| Widget config | window.ChatbotConfig reference |