Skip to main content

REST API Endpoints

Complete reference for Mesachat REST API endpoints.

Tenants

MethodEndpointDescription
GET/api/bots/tenantsList all tenants
GET/api/bots/tenants/:tenantIdGet tenant with bots

Bots

MethodEndpointDescription
GET/api/botsList all bots
GET/api/bots/:tenantId/:botIdGet specific bot
POST/api/bots/:botId/integrationsCreate integration
PUT/api/bots/:botId/integrations/:idUpdate integration
DELETE/api/bots/:botId/integrations/:idDelete integration

Create Integration

curl -X POST https://api.mesa.chat/api/bots/my-bot/integrations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"integrationId": "telegram",
"integrationType": "telegram",
"enabled": true,
"credentials": {
"botToken": "...",
"botName": "my_bot"
}
}'

Agents

MethodEndpointDescription
GET/api/agentsList agent definitions and usage
GET/api/definitions/agentsGet agent definitions
GET/api/definitions/toolsGet tool definitions
GET/api/definitions/capabilitiesGet capability definitions

API Keys

MethodEndpointDescription
GET/api/keysList API keys (masked)
POST/api/keysCreate API key
PUT/api/keys/:idUpdate API key
DELETE/api/keys/:idDelete API key

Create API Key

curl -X POST https://api.mesa.chat/api/keys \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tenantId": "my-tenant",
"scopeType": "tenant",
"scopeId": "my-tenant",
"keyType": "byok",
"provider": "openai",
"apiKey": "sk-..."
}'

Users

MethodEndpointDescription
GET/api/usersList users
GET/api/current-userGet current user profile

Configuration

MethodEndpointDescription
GET/api/configGet configuration
PUT/api/configUpdate configuration

System

MethodEndpointDescription
GET/api/system/healthHealth check
GET/api/system/infoSystem information
GET/api/database/statusDatabase status
GET/api/migrations/statusMigration status