zxn.uk Chat API

REST, webhooks, MCP and A2A. Machine-readable: openapi.json · llms.txt

Authenticate with Authorization: Bearer zxc_live_… (create a key in the app, Settings, Developers).

MCP: https://chat.zxn.uk/mcp (Streamable HTTP) · A2A: https://chat.zxn.uk/a2a/{site_public_key}

Account

GET/v1/meThe signed-in user and their workspaces
GET/v1/whoamiWho the credential is: a user, or an API key and its workspace and scopes
PATCH/v1/meUpdate my profile
POST/v1/devicesRegister a push device (upsert by token)
DELETE/v1/devices/{id}Forget a push device

Workspaces

POST/v1/workspacesCreate a workspace (caller becomes owner)
GET/v1/workspaces/{ws}Get a workspace
PATCH/v1/workspaces/{ws}Rename a workspace
DELETE/v1/workspaces/{ws}Delete a workspace (owner only)

Team

GET/v1/workspaces/{ws}/membersList members
PATCH/v1/workspaces/{ws}/members/meMy availability and notification settings
PATCH/v1/workspaces/{ws}/members/{user_id}Change a member role
DELETE/v1/workspaces/{ws}/members/{user_id}Remove a member (or leave)
GET/v1/workspaces/{ws}/invitesPending invites
POST/v1/workspaces/{ws}/invitesInvite someone by email (sends a join link and code)
POST/v1/invites/acceptAccept an invite

Sites

GET/v1/workspaces/{ws}/sitesList sites sites:read
POST/v1/workspaces/{ws}/sitesCreate a site (defaults filled) sites:write
GET/v1/workspaces/{ws}/sites/{site_id}Get a site sites:read
PATCH/v1/workspaces/{ws}/sites/{site_id}Update a site (any field except ids) sites:write
DELETE/v1/workspaces/{ws}/sites/{site_id}Delete a site and its conversations sites:write
GET/v1/workspaces/{ws}/sites/{site_id}/installInstall snippet and links sites:read

Conversations

GET/v1/workspaces/{ws}/conversationsList conversations, newest activity first conversations:read
GET/v1/workspaces/{ws}/conversations/{cv}Get a conversation conversations:read
PATCH/v1/workspaces/{ws}/conversations/{cv}Change status, assignee or turn the AI off conversations:write
POST/v1/workspaces/{ws}/conversations/{cv}/readMark read up to a seq (for me) conversations:read
POST/v1/workspaces/{ws}/conversations/{cv}/typingTell the visitor you are typing conversations:write

Messages

GET/v1/workspaces/{ws}/conversations/{cv}/messagesMessage history (newest last) or catch-up conversations:read
POST/v1/workspaces/{ws}/conversations/{cv}/messagesSend a reply or an internal note (idempotent on client_id). A reply turns the AI off. conversations:write

AI

POST/v1/workspaces/{ws}/conversations/{cv}/suggestAI draft of the next reply conversations:read
POST/v1/workspaces/{ws}/conversations/{cv}/summaryAI two-line summary conversations:read

Visitors

GET/v1/workspaces/{ws}/visitors/{vis}A visitor and their conversations conversations:read
PATCH/v1/workspaces/{ws}/visitors/{vis}Edit a visitor name or email conversations:write

Saved replies

GET/v1/workspaces/{ws}/saved-repliesList saved replies conversations:read
POST/v1/workspaces/{ws}/saved-repliesCreate a saved reply conversations:write
PATCH/v1/workspaces/{ws}/saved-replies/{id}Edit a saved reply conversations:write
DELETE/v1/workspaces/{ws}/saved-replies/{id}Delete a saved reply conversations:write

Realtime

GET/v1/workspaces/{ws}/eventsEvents since a seq (7-day window; 410 gone when older) conversations:read
GET/v1/workspaces/{ws}/socketWebSocket upgrade (token and since in the query)

Developers

GET/v1/workspaces/{ws}/api-keysList API keys
POST/v1/workspaces/{ws}/api-keysCreate an API key (secret shown once)
DELETE/v1/workspaces/{ws}/api-keys/{id}Revoke an API key
GET/v1/workspaces/{ws}/webhooksList webhooks
POST/v1/workspaces/{ws}/webhooksCreate a webhook (Standard Webhooks signing; secret shown once)
PATCH/v1/workspaces/{ws}/webhooks/{id}Edit a webhook (re-activating resets the failure count)
DELETE/v1/workspaces/{ws}/webhooks/{id}Delete a webhook
POST/v1/workspaces/{ws}/webhooks/{id}/testSend a ping

Widget

GET/v1/widget/configPublic site appearance and availability
POST/v1/widget/sessionStart or resume a visitor session
POST/v1/widget/messagesSend a visitor message (creates the conversation on the first one; idempotent on client_id)
GET/v1/widget/messagesPoll fallback: messages after a seq
POST/v1/widget/typingVisitor typing indicator
POST/v1/widget/identifyAttach name, email and custom attributes to the visitor
POST/v1/widget/handoffAsk for a person (AI stops, team is notified)
POST/v1/widget/ratingRate the conversation 1-5
DELETE/v1/widget/conversationThe visitor deletes their conversation
GET/v1/widget/socketVisitor WebSocket (site and visitor_token in the query)