Skip to main content

API reference

Every HTTP operation of the gateway, 173 in all, rendered from the OpenAPI 3.1.0 document in the repository (download it). The web app uses the same API.

Calling it​

  • Address: the installation's public address, the one people open in the browser, followed by the path, for example https://agent.example.com/api/v1/conversations.
  • Sign-in: scripts send a personal API token as Authorization: Bearer <token>. A person creates one in Settings › API tokens; it acts as them, with their role. Each operation says what it accepts.
  • Origin: a request with an API token needs no Origin header. A browser session's writes must come from the installation's own origin.
  • Idempotency-Key: actions that create something, such as a task or a message, require this header. Send a new unique value for each action; repeating a request with the same key and body returns the first answer.
  • Errors: a refusal answers {"error": {"code", "message", ...}} with a stable code. A stable code for the refusal; clients map codes to their own words, and a code is never renamed. Any route may answer with the general codes: invalid_request, unknown_reference, body_too_large, unauthorized, forbidden, session_required, not_found, idempotency_key_reused, busy, rate_limited, upstream_unavailable, upstream_invalid, store_unavailable, secret_unavailable, timeout, restarting, files_unavailable, changes_unavailable. A route's own codes are named in its responses.
  • Events: a task's events are read as pages, or streamed as server-sent events; the frames are in the protocol reference.

A worked example: your first API call.

Groups​

GroupOperations
Tasks14
Workspaces and files24
Channels21
Agent teams6
Desktop4
API tokens3
Sign-in and accounts13
Profiles, keys and connectors15
Administration: models and engines9
Administration: shared keys11
Administration: internet access and limits10
Administration: environments and connectors14
Administration: usage and sandboxes3
Health2
Sandbox runtime24
Schemas