Skip to main content

Orby API

Orby endpoints exposed by the Devotel CPaaS API Base path: /api/v1/orby Endpoint count: 11

title: “Errors worth branching on” description: “Per-endpoint failure templates matching the envelope — what actually fires, what to retry, what to surface to the operator.”

Errors worth branching on

These five failures cover the assistant turn (POST /api/v1/orby/sessions//messages), the heartbeat of every copilot chat. Each block below is a full { error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface for the same five classes. For the platform-wide decision table these branches plug into, see the error handling guide.

401 — Unauthorized

A 401 on this page is the bearer key failing before the route ran — it never means the resource is wrong. Rotate the key or re-mint the scoped token; retrying the same request changes nothing.

403 — Forbidden

A 403 means the key authenticated but the operation is gated by scope — check the key’s scopes on the developer page; a 403 is never a data-not-found shape.

422 — Schema

A 422 means the payload did not match the request schema — branch on error.details.field and open a new session and re-fire the same prompt against the fresh session id instead of blind-retrying the same body.

429 — Rate

The Retry-After header and error.details.retry_after are both set on every 429 — resend the SAME request after the lower of the two.

402 — Feature gate

Rotate the session or return control to the operator; do not re-fire immediately.

60-second retry matrix


Search the Orbit knowledge base

GET /api/v1/orby/kb/search
Hybrid search over the Orbit product-docs index. Pass query (required) plus an optional limit (default 10, max 50) and a section/category filter. Returns ranked results, each with doc_id, title, section, category, url, snippet, score, and last_updated_at. While the index is cold or reindexing the endpoint degrades to an empty result set with a kb_outage_hint instead of erroring. Available to any authenticated operator role. Operator-session auth only — API-key-authenticated requests are rejected.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get Orby knowledge-base index status

GET /api/v1/orby/kb/status
Super-admin only. Returns a health snapshot of the Orby docs index: collection name and shape, total and stale chunk counts, last reindex timestamp, current version, and in-process cache statistics. Operator-session auth only — API-key-authenticated requests are rejected.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List the operator’s Orby threads

GET /api/v1/orby/threads
Returns up to the 50 most recent Orby conversation threads for the authenticated operator (the dashboard ‘Past chats’ panel), each with id, title, metadata, and created_at / updated_at / archived_at timestamps. Operator-session auth only — API-key-authenticated requests are rejected.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

List an Orby thread’s messages

GET /api/v1/orby/threads/{id}/messages
Replays a thread’s persisted message log (oldest-first) so the dashboard can re-render conversation history on reload. Returns each message’s id, role, content, and created_at; responds 404 if the thread is not owned by the caller. Operator-session auth only — API-key-authenticated requests are rejected.
string
required
—
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get a pending Orby tool action

GET /api/v1/orby/tool-actions/{id}
Polls the status of a pending Orby tool action (the confirmation card polls this after approve to surface the result and cost). Returns the action’s tool, args, cost_estimate_cents, status, result, error_code / error_message, and created_at / expires_at / executed_at / cancelled_at. A pending row past its 5-minute window is lazily flipped to cancelled. Operator-session auth only — API-key-authenticated requests are rejected.
string
required
—
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Start or continue an Orby assistant turn (SSE stream)

POST /api/v1/orby/assistant
Runs one Orby operator-assistant turn and streams the result as Server-Sent Events (text/event-stream): router, status, token, tool_start, tool_pending, tool_end, refusal, clarify, response, and error frames. Send { message, thread_id?, page? } — omit thread_id to start a new thread. Rate-limited to 60 turns/min per operator. Operator-session auth only — API-key-authenticated requests are rejected.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Find the dashboard setting for a described task

POST /api/v1/orby/kb/find-setting
“Where do I configure X” helper — resolves a natural-language description to the dashboard settings that control it. Returns ranked matches, each with setting_path, dashboard_url, label, description, doc_url, snippet, and score. Degrades to an empty result with a kb_outage_hint while the knowledge base is initialising. Available to any authenticated operator role. Operator-session auth only — API-key-authenticated requests are rejected.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Trigger an Orby knowledge-base reindex

POST /api/v1/orby/kb/reindex
Super-admin only. Triggers a manual reindex of the Orbit docs corpus. Runs inline when the docs source is mounted on the pod, otherwise schedules the reindex for the background worker. Returns { scheduled, ran_inline, error }. Operator-session auth only — API-key-authenticated requests are rejected.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Create an Orby thread

POST /api/v1/orby/threads
Pre-allocates a new Orby conversation thread before the first user message (the FE pre-allocation flow). Accepts an optional title and page context and returns the new thread’s id, title, and created_at / updated_at timestamps. Operator-session auth only — API-key-authenticated requests are rejected.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Approve a pending Orby tool action

POST /api/v1/orby/tool-actions/{id}/approve
Approves and executes a pending Orby tool action that paused a turn on a confirmation gate (the tool_pending SSE event). Ownership is enforced on the original operator and organization, and the persisted arguments are re-validated and re-authorized before execution. Returns the pending action id, terminal status, and the executor result. The approval window expires 5 minutes after the gate was raised. Operator-session auth only — API-key-authenticated requests are rejected.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Reject a pending Orby tool action

POST /api/v1/orby/tool-actions/{id}/reject
Cancels a pending Orby tool action raised by a confirmation gate, marking it cancelled without executing it. Same ownership rules as approve. Returns the action id and status. Operator-session auth only — API-key-authenticated requests are rejected.
string
required
—
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the Idempotency-Replay: true response header.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.