REST API: the rules every endpoint follows
Pagination, resending, concurrent changes, errors and long operations work the same on every endpoint. See the six rules with a sample request and response. The concept itself is defined in the glossary under webhook.
- Base path
- /api/v1
- Format
- JSON. Fields are camelCase, paths are lowercase, hyphenated and plural, and ids are opaque strings.
- Authentication
- Server integrations use a scoped service credential (OAuth client credentials) or an API key. The key stays on your server; it is never embedded in a browser, a client app or the query string of a webhook address.
- Contract
- OpenAPI 3.1.1
Six rules, the same on every endpoint
Each tab holds one rule and a request with its response. Ids, keys and values are samples. To receive events, see the webhooks page; for the overall picture, see the developers page.
Lists advance by cursor. limit defaults to 50 and tops out at 200. The response carries items, nextCursor and hasMore; no total is made up. Send nextCursor back as the cursor parameter to get the next page. The cursor is opaque and bound to your account, filter and sort order, so it does not work elsewhere.
GET /api/v1/tickets?limit=50HTTP/1.1 200 OKContent-Type: application/json { "items": [ { "id": "44444444-4444-4444-8444-444444444444", "tenantId": "11111111-1111-4111-8111-111111111111", "version": 1, "createdAt": "2026-12-02T12:00:00Z", "updatedAt": "2026-12-02T12:00:00Z", "reference": "SAMPLE-0001", "subject": "Late order", "status": "open", "priority": "high", "departmentId": "33333333-3333-4333-8333-333333333333" } ], "nextCursor": "opaque-cursor-sample", "hasMore": true}POST requests that create a business effect require an Idempotency-Key. The scope is account, identity, operation and key. The same key with the same body returns the same logical result. A different body gets 409 idempotency_conflict, and a first request still running gets 409 operation_in_progress with Retry-After. After a timeout, resend with the same key. The record is kept for at least 24 hours. The details are on the errors and idempotency page.
POST /api/v1/ticketsContent-Type: application/jsonIdempotency-Key: sample-key-0001 { "subject": "Late order", "description": "Synthetic test record.", "priority": "high", "departmentId": "33333333-3333-4333-8333-333333333333"}HTTP/1.1 201 CreatedContent-Type: application/json { "id": "44444444-4444-4444-8444-444444444444", "tenantId": "11111111-1111-4111-8111-111111111111", "version": 1, "createdAt": "2026-12-02T12:00:00Z", "updatedAt": "2026-12-02T12:00:00Z", "reference": "SAMPLE-0001", "subject": "Late order", "status": "open", "priority": "high", "departmentId": "33333333-3333-4333-8333-333333333333"}Changes to a resource are guarded by ETag and If-Match. A missing header returns 428 precondition_required, and a stale version returns 412 version_conflict. A client never overwrites someone else's change silently; it rereads the resource and merges. In the example the resource has meanwhile moved to version 3.
PATCH /api/v1/tickets/44444444-4444-4444-8444-444444444444Content-Type: application/jsonIf-Match: "2" { "subject": "Late order: new information"}HTTP/1.1 412 Precondition FailedContent-Type: application/problem+json { "type": "about:blank", "title": "Version conflict", "status": 412, "detail": "The resource changed after your read. Read the current version.", "instance": "/api/v1/tickets/44444444-4444-4444-8444-444444444444", "code": "version_conflict", "traceId": "0123456789abcdef0123456789abcdef"}Errors arrive as application/problem+json with type, title, status, detail, instance, code and traceId. Validation errors can add a per-field errors object. Build your logic on the stable code field, not on the detail text. Every status is listed on the error codes page.
POST /api/v1/ticketsContent-Type: application/jsonIdempotency-Key: sample-key-0001 { "subject": "Late order", "description": "Synthetic test record.", "priority": "maximum", "departmentId": "33333333-3333-4333-8333-333333333333"}HTTP/1.1 400 Bad RequestContent-Type: application/problem+json { "type": "about:blank", "title": "Invalid request", "status": 400, "detail": "The request could not be validated.", "instance": "/api/v1/tickets", "code": "invalid_request", "traceId": "0123456789abcdef0123456789abcdef", "errors": { "priority": [ "Must be low, normal, high or urgent." ] }}Long jobs are accepted with 202 and return an Operation id. Statuses are pending, running, succeeded, failed, cancelled and unknown. When progress is unknown, no percentage is invented. A cancel request does not promise that an outside effect is undone. An unknown result is no reason to start a new job; query the operation again.
POST /api/v1/flows/11111111-1111-4111-8111-111111111151/validateIf-Match: "1"Idempotency-Key: sample-key-0002HTTP/1.1 202 AcceptedLocation: /api/v1/operations/11111111-1111-4111-8111-111111111161Content-Type: application/json { "id": "11111111-1111-4111-8111-111111111161", "tenantId": "11111111-1111-4111-8111-111111111111", "resourceId": "11111111-1111-4111-8111-111111111151", "type": "flow.validate", "status": "pending", "progress": null, "problem": null, "result": null, "createdAt": "2026-12-02T12:00:00Z", "updatedAt": "2026-12-02T12:00:00Z"}The version lives in the path: /api/v1. Adding a response field is not a breaking change; a client ignores fields and values it does not know. A field on its way out is marked deprecated in the contract. In the example, outcome is only an alias that carries the same technical value as terminationReason; read businessOutcome for the business result.
GET /api/v1/calls/22222222-2222-4222-8222-222222222222HTTP/1.1 200 OKContent-Type: application/json { "id": "22222222-2222-4222-8222-222222222222", "tenantId": "11111111-1111-4111-8111-111111111111", "version": 4, "direction": "inbound", "state": "ended", "startedAt": "2026-12-02T12:00:00Z", "endedAt": "2026-12-02T12:00:00Z", "terminationReason": "completed", "businessOutcome": "solved", "outcome": "completed"}The response is trimmed to the relevant fields.
Resource families
These nine families cover call, recording and support data. Configuration resources such as flows, queues, numbers and the knowledge base follow the same rules. Every operation asks for its own permission, and that permission is narrowed again by an account and resource check.
| Family | Path | Operations | Permission |
|---|---|---|---|
| Calls | /api/v1/calls | List, read; transfer, hold, resume, hang up | calls.read, calls.control |
| Recordings | /api/v1/recordings | List, read; request a time-limited access address | recordings.read |
| Transcripts | /api/v1/transcripts | List, read | transcripts.read |
| Support tickets | /api/v1/tickets | List, create, read, update | tickets.read, tickets.write |
| Callbacks | /api/v1/callbacks | List, create, read, update | callbacks.read, callbacks.write |
| Webhook endpoints | /api/v1/webhook-endpoints | List, create, read, update; rotate the secret | webhooks.read, webhooks.write, webhooks.manage |
| Usage | /api/v1/usage | Read usage for a period | billing.read |
| Retention policy | /api/v1/retention-policy | Read, update | privacy.read, privacy.manage |
| Activity history | /api/v1/audit-events | List | audit.read |
Versioning and deprecation
The version is written in the path. The rules on the SDK side are on the SDK page.
- Added fields
- A field added to a response is not breaking. Your client should ignore fields and enum values it does not know, or keep them as raw values.
- Deprecated fields
- A field on its way out is marked deprecated in the contract. Call.outcome is one: a transition alias that carries the same technical value as terminationReason, not a business result.
- Breaking changes
- A breaking method change in an SDK is a major release. When the API major version changes, the three SDKs do not have to move on the same day; the compatibility matrix is kept open.
Contract file
The rules are defined in an OpenAPI file. The endpoint catalog is generated from the same definition.
- Canonical definition
- The OpenAPI 3.1.1 file is the canonical definition of the API. Every operation is written with a unique name and typed request and response.
- Examples
- The examples in the contract are synthetic. They carry no real customer key or phone number.
- SDKs
- The SDKs in three languages are tested with a client generated from the same contract and with the same sample data.