GuidesMessaging
REST API
Messaging — REST API
All routes are under /api/v1/messaging and authenticate with the admin JWT (Authorization: Bearer <jwt>). Identifiers are slugs; access is graded per provider (see Frontend Integration).
Every endpoint below is a direct link into the interactive API reference — click it to see the full request/response schema and try the call live.
Sessions
- GET
/messaging/sessions/lookup - GET
/messaging/sessions/admin-sessions - GET
/messaging/sessions/lookup/{providerId}/{sessionName}— Lookup chats by rawchat.provider_idwithin a specific session. - GET
/messaging/sessions/{sessionSlug}/chats/{chatSlug}/profile— Get profile data for a chat - GET
/messaging/sessions/{providerType}— List sessions for a provider type - DELETE
/messaging/sessions/{providerType}— Bulk delete sessions - POST
/messaging/sessions/{providerType}— Create new session - DELETE
/messaging/sessions/{providerType}/{slug}— Delete a single session along with all its chats and messages - GET
/messaging/sessions/{providerType}/{slug}— Get session by slug - PATCH
/messaging/sessions/{providerType}/{slug}— Update session display name - POST
/messaging/sessions/{providerType}/connect— Quick connect: create an unnamed WAHA session and return its QR code in a - POST
/messaging/sessions/{providerType}/{slug}/status— Change session status (start/stop/restart/logout) - POST
/messaging/sessions/{providerType}/{slug}/qr— Get QR code for session - POST
/messaging/sessions/{providerType}/{slug}/admins— Attach admins to session - POST
/messaging/sessions/{providerType}/{slug}/objects— Attach objects to session - POST
/messaging/sessions/{providerType}/{slug}/toggle-default— Toggle default session (set as default if not, unset if already default) - PATCH
/messaging/sessions/{providerType}/{slug}/toggle-auto-mark-read— Toggle auto mark read setting
Chats
- GET
/messaging/chats/status— Get paginated status updates grouped by contact (WhatsApp-style) - GET
/messaging/chats/all— Get all chats across all providers - GET
/messaging/chats/record/{objectSlug}/{dataSlug}— Cortex Chat tab: list every chat linked to a CRM record. - GET
/messaging/chats/{slug}— Get a specific chat by slug - DELETE
/messaging/chats/{slug}— Delete a chat - POST
/messaging/chats/sync/history— Sync chats from WAHA API - PUT
/messaging/chats/{slug}/read— Mark chat as read - PUT
/messaging/chats/{slug}/unread— Mark chat as unread - PUT
/messaging/chats/{slug}/archive— Archive/unarchive chat - PUT
/messaging/chats/{slug}/star— Toggle star status of a chat - PUT
/messaging/chats/{slug}/pin— Toggle pin status of a chat (max 3 pinned) - PUT
/messaging/chats/{slug}/answered— Toggle the "Answered" marker of a chat (Mark as Answered / unmark). - POST
/messaging/chats/link-all— Link all unlinked chats to CRM records - POST
/messaging/chats/{sessionSlug}— Create a new chat with phone number - GET
/messaging/chats/id/{id}— Find chat by ID
Messages
- GET
/messaging/messages/latest— Get latest messages from default session - GET
/messaging/messages/{chatSlug} - GET
/messaging/messages/{chatSlug}/search - GET
/messaging/messages/message/{slug}— Get a specific message by slug - POST
/messaging/messages/message/{slug}/retry— Retry a failed or errored message - POST
/messaging/messages/send/{chatSlug}/{type}— Send a unified message (derives session from chat) - PUT
/messaging/messages/{slug}/ack— Update message acknowledgment status - PATCH
/messaging/messages/{slug}/edit— Edit message - DELETE
/messaging/messages/{slug}— Delete a message - PUT
/messaging/messages/{slug}/played— Mark a voice message as played - PUT
/messaging/messages/{chatSlug}/read— Mark chat messages as read (unified - derives session from chat) - POST
/messaging/messages/sync/history— Sync messages history from WAHA
Labels
- GET
/messaging/labels— List paginated labels for a session from the local DB. - POST
/messaging/labels/sync— Sync labels from WAHA into the local DB. - POST
/messaging/labels/chats/{chatSlug}/labels— Assign labels to a chat (replaces existing labels). - DELETE
/messaging/labels/chats/{chatSlug}/labels/{labelSlug}— Remove a single label from a chat. - PATCH
/messaging/labels/{labelSlug}/tag-mapping— Map a label to a tag option value.
Calls
- GET
/messaging/calls— Get all calls across all providers (unified)