KitoDeskDocs

Website chat widget

Public widget endpoints for visitor messaging on your site.

Overview

The website chat widget lets logged-out visitors message you from your site. It uses a public widget key shown in Settings → Integrations → Website chat - no user session is involved. These are the only client-side public endpoints.

Embed

<script src="https://app.kitodesk.com/widget.js" data-key="YOUR_WIDGET_KEY"></script>

POST /api/widget/:key/messages

Submits a visitor message. Creates or continues a webchat conversation for the visitor.

FieldRequiredTypeNotes
visitor_idyesstring, 4-80Your anonymous id for the visitor
bodyyesstring, 1-5000The message text
namenostring, up to 120Display name
curl -X POST https://api.kitodesk.com/api/widget/YOUR_KEY/messages \
  -H "Content-Type: application/json" \
  -d '{"visitor_id":"v-12345","body":"Where is my order?","name":"Ada"}'

Errors: 400 invalid body · 404 unknown widget key.

GET /api/widget/:key/messages

Polls for new messages in the visitor's latest webchat conversation. Query: visitor_id (required), since (ISO timestamp, optional).

Returns { "conversation_id": "...", "messages": [{ "body", "direction", "created_at", "content_type", "content" }] } or { "messages": [] }.

Errors: 404 unknown widget key.

Rate limits

/api/widget allows 60 requests per minute per client.

Was this guide helpful?