Skip to content

API overview

Any client - a web frontend, a mobile app, a script - drives a deployed agent over the Sectr HTTP API. See the full reference for complete details.

The journal is the only source of truth. A session is an append-only event log; every “live” view - including the chat stream - is a tail of that journal. This makes reconnecting (Last-Event-ID) trivially correct and produces a fully auditable and debuggable transcript.

Area Endpoints Auth
Sessions POST /sessions, GET /sessions/{sessionId}, POST /sessions/{sessionId}/input user token (end users), invocation key (backend), or platform key
Streaming GET /sessions/{sessionId}/events (SSE) same as the session’s
Approvals POST /sessions/{sessionId}/approval, GET /approvals decide: user token (own sessions) / keys; inbox: platform key
AG-UI POST /ag-ui/{app}/{route} (run), GET /ag-ui/{app}/{route} (reconnect, ?threadId=) user token or invocation key

Browser clients authenticate with a user token, which your backend mints with its invocation key via POST /tokens; see authentication.

Area Endpoints Auth
Projects GET /apps, GET /apps/{appId}, GET /apps/{appId}/deployments platform key
Deployments POST /deployments, POST /deployments/{deploymentId}/activate platform key
Secrets PUT /secrets/{key}, GET /secrets, DELETE /secrets/{key} platform key
API keys GET /api-keys, POST /api-keys, DELETE /api-keys/{keyId} platform key
  • Prod: https://api.sectr.dev
  • Locally, sectr dev serves the same API from its gateway, printed at server startup (https://local.sectr.dev:8420 by default)
  1. Authentication — which key class you need
  2. Send a message — create a session, add turns
  3. Stream a session — the SSE tail + resumption
  4. Approve or deny from your UI
  5. AG-UI endpoint — CopilotKit and other AG-UI clients
  6. Limits — concurrency, rate limits, and the 429 codes