REST + webhooks.
Every dashboard action has a matching REST endpoint, versioned at /v1. Auth is JWT (bearer token) for the dashboard; per-org API keys for programmatic access. Webhooks carry signed payloads.
Base URL: https://agentiq.xonlabs.co.uk/api
Conversations
/v1/conversationsList conversations (paginated, filterable by status / channel / assignee / tag).
/v1/conversations/:id/claimTake over from the AI — flips handledBy=HUMAN and broadcasts agent:joined.
/v1/conversations/:id/return-to-aiHand back to the AI — flips handledBy=AI, clears assignee.
/v1/conversations/:id/resolveResolve a conversation. Triggers the CSAT survey for opted-in inboxes.
/v1/conversations/:id/transcript/pdfStream a fully-formatted PDF transcript.
Messages
/v1/messagesSend a message into a conversation. `privateNote: true` makes it agent-only and mirrors into the Notes panel.
/v1/scheduled-messagesQueue a message to send at a future time.
Bots & AI
/v1/agent-botsList the org's deterministic bot flows.
/v1/agent-botsCreate a bot. Body validates the flow graph (start node, edges, allowed node types).
/v1/agent-bots/:id/runsStart a run for a conversation. Returns pendingMessages + pendingActions.
Webhooks
/v1/webhooksSubscribe to events: message.created, conversation.resolved, contact.created, etc.
/v1/webhooks/:id/deliveriesInspect recent deliveries — status code, payload, retry attempts.
Channels
/v1/widgets/:orgId/conversations/:id/messagesPublic — visitor sends a widget message. Triggers AI auto-response when handler=AI.
/v1/integrations/whatsapp/webhookMeta WhatsApp Cloud webhook. Signed via X-Hub-Signature-256.
/v1/integrations/twilio/smsTwilio inbound SMS webhook.
Want the full OpenAPI spec?
The deployed API serves an OpenAPI document at /api/docs. Postman / Insomnia collections on request.