API reference

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

GET
/v1/conversations

List conversations (paginated, filterable by status / channel / assignee / tag).

POST
/v1/conversations/:id/claim

Take over from the AI — flips handledBy=HUMAN and broadcasts agent:joined.

POST
/v1/conversations/:id/return-to-ai

Hand back to the AI — flips handledBy=AI, clears assignee.

POST
/v1/conversations/:id/resolve

Resolve a conversation. Triggers the CSAT survey for opted-in inboxes.

GET
/v1/conversations/:id/transcript/pdf

Stream a fully-formatted PDF transcript.

Messages

POST
/v1/messages

Send a message into a conversation. `privateNote: true` makes it agent-only and mirrors into the Notes panel.

POST
/v1/scheduled-messages

Queue a message to send at a future time.

Bots & AI

GET
/v1/agent-bots

List the org's deterministic bot flows.

POST
/v1/agent-bots

Create a bot. Body validates the flow graph (start node, edges, allowed node types).

POST
/v1/agent-bots/:id/runs

Start a run for a conversation. Returns pendingMessages + pendingActions.

Webhooks

POST
/v1/webhooks

Subscribe to events: message.created, conversation.resolved, contact.created, etc.

GET
/v1/webhooks/:id/deliveries

Inspect recent deliveries — status code, payload, retry attempts.

Channels

POST
/v1/widgets/:orgId/conversations/:id/messages

Public — visitor sends a widget message. Triggers AI auto-response when handler=AI.

POST
/v1/integrations/whatsapp/webhook

Meta WhatsApp Cloud webhook. Signed via X-Hub-Signature-256.

POST
/v1/integrations/twilio/sms

Twilio inbound SMS webhook.

Want the full OpenAPI spec?

The deployed API serves an OpenAPI document at /api/docs. Postman / Insomnia collections on request.

Request access