Skip to main content

Worked request and response samples

Copy a request body as written, substitute your own ids, and compare the response envelope. Successful writes return { data, meta }; failures return Devotel Orbit’s { error, meta } envelope, shown once below under Error envelope.

List agents

GET /api/v1/agents/
Returns one page of agents, newest first. Pass status=active to hide drafts, or search to match on name. The meta.pagination.cursor value on the response feeds the next page’s cursor query parameter. Request

Get one agent

GET /api/v1/agents/{id}
Returns the full agent row, including generation settings (temperature, max_tokens), tools, and the bound knowledge_base_ids. The sample id below is the same one this page uses in every call. Request

Create an agent

POST /api/v1/agents/
Only name is required. Everything else — type, model, system_prompt, generation settings, tools, knowledge_base_ids — falls back to tenant defaults. Bind the agent to one or more knowledge bases with knowledge_base_ids and it grounds its answers on that content; every id is checked against your workspace at create time. Request

Deploy the agent

POST /api/v1/agents/{id}/deploy
Moves an agent out of draft onto one channel. channel is required — one of webhook, sms, whatsapp, voice, rcs. webhook_url is required when channel is webhook; phone_number is required for SMS / WhatsApp / voice deployments. Deploying flips status to active; there is also a matching POST /api/v1/agents/{id}/undeploy. Request

Define an eval dataset

POST /api/v1/agents/{agentId}/evals/datasets
Eval datasets are golden answer sets you score the agent against. name plus at least one rows entry are required; each row carries an input (the user turn) and expected_output (the answer you grade). row_count updates as rows come and go. Request

Run the eval

POST /api/v1/agents/{agentId}/evals/runs
Kicks off an asynchronous run; the response returns immediately with status: "pending" and the BullMQ worker processes each row against the agent. dataset_id and rubric_name are required. Check the run state with GET /api/v1/agents/{agentId}/evals/runs/{runId}. Request

Converse with the agent

POST /api/v1/agents/{id}/chat
Send a user turn. Only message is required. Pass the conversationId from a previous reply to keep the thread going — omit it and a new conversation is created for you, its id returned on the response. When the agent grounds an answer on a bound knowledge base, the reply carries matching citations naming the documents it quoted. Request

Error envelope

Most write failures return 422 with the offending field named in message. Creating or updating an agent re-checks every knowledge_base_ids entry against your workspace, so a detached id — one that was deleted, or copied from another tenant — fails fast here instead of silently weakening the agent’s answers.
422