Skip to main content

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

CategoryBase PathDescription
Authentication/api/authAuth endpoints and tokens
Bots/api/botsBot and integration management
Agents/api/agentsAgent definitions and usage
Keys/api/keysAPI key management
Users/api/usersUser management
Config/api/configConfiguration management
Webhooks/webhooksInbound 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:

TierRequests/minute
Free60
Pro300
EnterpriseCustom

Rate limit headers are included in all responses:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1700000000