API Reference
Mesachat exposes a REST API for programmatic access to all platform features.
Base URL
https://api.mesa.chat
For self-hosted deployments, use your backend URL (e.g., http://localhost:3001).
API Categories
| Category | Base Path | Description |
|---|---|---|
| Authentication | /api/auth | Auth endpoints and tokens |
| Bots | /api/bots | Bot and integration management |
| Agents | /api/agents | Agent definitions and usage |
| Keys | /api/keys | API key management |
| Users | /api/users | User management |
| Config | /api/config | Configuration management |
| Webhooks | /webhooks | Inbound webhook handlers |
Quick Example
# List all bots for a tenant
curl -H "Authorization: Bearer $TOKEN" \
https://api.mesa.chat/api/bots?tenantId=my-tenant
Response Format
All API responses follow a consistent format:
{
"data": { ... },
"error": null
}
Error responses:
{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Bot not found"
}
}
Rate Limiting
API requests are rate-limited per tenant. Current limits:
| Tier | Requests/minute |
|---|---|
| Free | 60 |
| Pro | 300 |
| Enterprise | Custom |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1700000000