REST API

/ Open-source API route handlers. Implement chat against your agent; handoff routes create Desk tickets.

POST /api/v1/chat

Self-hosted: implement this handler to call your support agent. Return token deltas in SSE and set escalate: true on the final event when the handoff framework should open a ticket.

curl

curl -N -X POST https://yourwebsite.com/api/v1/chat \
  -H "Authorization: Bearer <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "YOUR_AGENT_PUBLIC_ID",
    "message": "Where is my order?",
    "sessionId": "sess_abc123"
  }'

Hosted request/response shapes: Intelligence → API Reference.

POST /api/v1/handoff/ticket

Create a Human Desk ticket directly. Supply conversationSummary, urgency, and transcript. See Desk Center → Connect your agent.