API conventions
Pagination
List endpoints take offset and limit query parameters and return the page in an envelope with
the total number of matching items:
offset defaults to 0. Iterate by adding the page size to offset until it reaches total.
Errors
Every error is a JSON object with a human-readable detail and a stable error_code you can branch
on:
error_code is specific where it helps (AGENT_NOT_FOUND, CALL_NOT_FOUND, CHAT_ALREADY_ENDED,
KEY_SCOPE_NOT_ALLOWED, RATE_LIMITED, …) and falls back to a generic code for the status
otherwise. Validation messages are sanitised: they name the field and the rule, never an internal
provider.
Rate limits
Limits are counted in a sliding window and answered with 429 and Retry-After:
The per-key limits are keyed on the public key, so two pages using the same key share them.
Caching
GET /v1/ai-agents/{agent_id}/widget-config returns an ETag and Cache-Control headers. Send
the tag back in If-None-Match to get 304 Not Modified while the configuration is unchanged, so a
widget can check for changes on every page load without re-downloading it.
CORS
Timestamps and identifiers
Timestamps such as created, updated and scheduled_date are ISO 8601 in UTC. Identifiers are
opaque strings; do not parse them.