API reference
API overview
Base path, authentication, and rate limits for the Relay API.
Base path
All endpoints live under /api/v1.
Authentication
Relay issues its own tokens: it does not share the identity service ChatPlotDB uses.
| Token | Lifetime |
|---|---|
| Access | Short-lived; sent as a bearer token |
| Refresh | Long-lived; exchanges for a new access token |
The public chat endpoint is the exception: it is reached by the widget from a visitor's browser, and is protected by allowed domains rather than a user token.
Rate limits
Limits are applied per-minute, with a tighter limit on chat than on general endpoints, since chat is the expensive path.
Exceeding a limit returns 429. Back off rather than retrying immediately.
Endpoint groups
| Group | Covers |
|---|---|
| Bots | CRUD, status, widget snippet |
| Chat | The public chat endpoint and its stream |
| Training | Sources, crawl, uploads, FAQs, reindex |
| Inbox | Conversations, replies, assignment, labels |
| Analytics | Metrics and export |
| Webhooks | Inbound channel deliveries |