Docs / Reference
API
Everything answers { "data": … } or { "error": { "code", "message" } }. Bodies are JSON. Codes: bad_request 400, unauthorized 401, not_found 404, conflict 409, rate_limited 429, unavailable 503.
For the person (in the browser or app)
Take a session, then send it as Authorization: Bearer <session>. Sessions last an hour.
| Route | What it does |
|---|---|
POST /v1/sessions | { appKey, token } with your server’s token; or { appKey } for a visitor, or { appKey, visitorToken } to resume one. Answers { session, expiresIn }. |
GET /v1/widget/config?appKey= | The app’s name, colour and whether visitors may chat. Public. |
POST /v1/chat | { conversationId?, body, attachmentIds? }. Answers with server-sent events: request, text deltas, done with the saved message, or error. |
GET /v1/conversations | The person’s conversations, newest first, with unread. |
GET /v1/conversations/:id | One conversation and its messages; marks it read. |
POST /v1/files | A picture as the raw body (PNG, JPEG, WebP or GIF, up to 10 MB). Answers its id for attachmentIds. |
For your server (API key)
Send Authorization: Bearer sk_…. Never from a browser.
| Route | What it does |
|---|---|
GET /v1/owner/inbox | Proposals waiting, conversations handed over, open bugs. |
GET /v1/owner/conversations?status=waiting|open|all | Conversations, newest first. |
GET /v1/owner/conversations/:id | One conversation with its messages and proposals. |
POST /v1/owner/conversations/:id/messages | The team’s answer: { body, resolve?, attachmentIds? }. |
POST /v1/owner/conversations/:id/files | A picture for the team’s answer. |
POST /v1/owner/proposals/:id | { approve }. Approving runs the action’s execute once. |
PATCH /v1/owner/bugs/:id | { status: "closed" }. |
POST /v1/owner/bugs/:id/fix | Starts a fix run. |
GET, PUT /v1/owner/settings | Name, instructions, help text, actions, limits, webhook and alerts. Changes to instructions, help text or actions are live at once, as a new version. |
GET, PUT /v1/owner/draft | The draft: { instructions?, procedures?, knowledge?, actions? }. |
POST /v1/owner/draft/publish | { note? }. Makes the draft the next version. |
GET /v1/owner/versions, POST /v1/owner/versions/:n/restore | Versions, and making one live again. |
GET, PUT /v1/owner/scenarios | Saved scenarios; PUT replaces them all. |
POST /v1/owner/simulations/run | { target: "draft"|"live", names? }. Runs saved scenarios. |
POST /v1/owner/simulations | { scenarios }. Runs scenarios given in the request without saving them. |
GET /v1/owner/users/:id/export | Everything kept about one person, by your id for them. |
DELETE /v1/owner/users/:id | Deletes one person’s conversations, pictures and events. Call it when they delete their account. |
From your app and other services
| Route | What it does |
|---|---|
POST /v1/errors | An error report from the error reporter: { appKey, kind, frames, release?, codes? }. Any message is dropped. |
POST /v1/integrations/sentry/:appId | Sentry’s webhook, checked with the integration’s client secret. |
POST /v1/integrations/github | Dezzi’s GitHub App’s webhook: CI results on fixes, and uninstalls. |
POST /v1/billing/stripe | The payment provider’s webhook, for plans and payments. |
Dezzi calls you
Actions and webhook events are POSTs signed with your action signing secret: X-Support-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">. Refuse a timestamp more than five minutes off. See Actions and webhooks.
Limits
- 30 messages an hour per person; the app’s own daily cap, set in Settings.
- 40 pictures an hour per person, 4 to a message.
- Simulation runs a day by plan.
GET /v1/health answers 200 when the database and the minute’s schedule work.