Skip to main content

📡 REST API Reference

All API endpoints are prefixed with /api/ and require authentication via session cookie. All requests and responses use Content-Type: application/json.


Conversations

EndpointMethodDescription
/api/conversationsGETList conversations (filters: status, channel_type, tag, search, page)
/api/conversations/{id}GETGet conversation (resets unread_count)
/api/conversationsPOSTCreate conversation
/api/conversations/{id}/statusPOSTUpdate status
/api/conversations/{id}/tagsPOSTAdd tag
/api/conversations/{id}/tags/{tag}DELETERemove tag
/api/conversations/{id}/assignPOSTAssign agent

Messages

EndpointMethodDescription
/api/conversations/{id}/messagesGETList messages
/api/conversations/{id}/messagesPOSTSend message

AI Suggest

EndpointMethodDescription
/api/ai-suggest?conversation_id={id}GETGet AI reply suggestion

Contacts

EndpointMethodDescription
/api/contactsGETList contacts
/api/contacts/{id}GETGet contact
/api/contactsPOSTCreate contact
/api/contacts/{id}PATCHUpdate contact
/api/contacts/{id}DELETEDelete contact (admin)

Channels (Admin only)

EndpointMethodDescription
/api/channelsGETList channels
/api/channelsPOSTCreate channel
/api/channels/{id}PATCHUpdate channel
/api/channels/{id}DELETEDelete channel

Automations (Admin only)

EndpointMethodDescription
/api/automationsGETList automations
/api/automationsPOSTCreate automation
/api/automations/{id}/togglePOSTToggle active/inactive
/api/automations/{id}DELETEDelete automation

Analytics

EndpointMethodDescription
/api/analytics?days=30GETGet analytics data

Agents (Admin only)

EndpointMethodDescription
/api/agentsGETList agents
/api/agentsPOSTCreate agent
/api/agents/{id}/rolePOSTUpdate role
/api/agents/{id}DELETEDelete agent

Settings

EndpointMethodDescription
/api/settings/workspaceGETGet workspace settings
/api/settings/workspacePOSTUpdate workspace (admin)
/api/settings/passwordPOSTChange password

Error Format

{"error": "Human-readable error message"}
CodeMeaning
200Success
201Created
400Bad Request
401Unauthenticated
403Forbidden
404Not Found
409Conflict
500Internal Error