REST API overview
Base URL, credentials, path layout, versioning, pagination, streaming and retry rules for the Center of Agentic REST API.
The REST API is the HTTP API that the web workspace itself uses. With a workspace API key you can list and inspect agents, run them, read receipts and audit entries, and read workspace metrics from your own systems. This page describes the rules that hold across operations. The reference pages document each operation.
Basics
| Item | Value |
|---|---|
| Base URL | https://centerofagentic.com/api |
| Transport | HTTPS |
| Format | JSON request and response bodies in UTF-8. Streaming operations respond with server-sent events. |
| Credential | Authorization: Bearer <key>. See Authentication. |
| Workspace | Taken from the credential. No parameter selects a workspace. |
| Field names | camelCase. The policy decision object embedded in a receipt keeps its own snake_case names. |
| Browser calls | The API sends no cross-origin (CORS) headers, so browsers block calls from pages on other sites. Call it from a server or a shell. |
A first request
List the agents in the key's workspace and keep three fields of each. Any key can do this, because a GET needs only the read scope.
curl -s https://centerofagentic.com/api/agents \
-H "Authorization: Bearer $COA_API_KEY" \
| jq '.agents[] | {id, name, status}'{
"id": "3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11",
"name": "Renewal brief writer",
"status": "published"
}How paths are organized
Paths follow the resource: a collection at /api/agents, one item at /api/agents/{id} and related resources and actions as sub-paths such as /api/agents/{id}/versions. Each area has a reference page.
| Area | Main paths | Reference |
|---|---|---|
| Agents | /api/agents, /api/agent-runtime/ticket, /api/models | Agents |
| Runs and conversations | /api/run, /api/conversations | Runs |
| Receipts, approvals and audit | /api/receipts, /api/approvals, /api/audit | Receipts |
| Workspace settings and keys | /api/me, /api/health, /api/tenant/… | Workspace |
| Integrations | /api/integrations/… | Integrations |
| Knowledge and skills | /api/knowledge, /api/skills | Knowledge and skills |
| Datasets, experiments and annotations | /api/datasets, /api/experiments, /api/annotations | Evaluations |
| Monitoring, alerts and webhooks | /api/dashboard, /api/metrics/…, /api/fleet/…, /api/governance-webhooks | Monitoring |
| Templates, domain packs and authoring | /api/templates, /api/domain-packs, /api/contributions, /api/builder/…, /api/assistant/… | Authoring |
| Missions and tasks | /api/missions. The task routes under /api/tasks are not part of the programmatic API. | Missions and tasks |
| External agents | /api/v1/external-agents, and the pilot operation routes under /api/v1/operations | External agents |
| Desktop app and device tokens | /api/desktop/me. The device-token routes under /api/desktop/tokens accept signed-in people only. | Desktop |
Versioning
The unversioned paths change together with the web workspace, and no deprecation policy is published for them. Write clients that ignore response fields they do not know, handle an unfamiliar error code by its HTTP status, and cover the calls you depend on with your own integration tests. The reference marks operations that are gated or in pilot.
The operations an API key can call are also published as one machine-readable file; see OpenAPI description.
Requests
- Send
Content-Type: application/jsonand a JSON object as the body ofPOST,PATCHandPUTrequests. - Filters and paging options go in the query string.
- Validation failures return
400with a code that names the problem, such asmissing_promptorinvalid_limit. - A synchronous run answers when the run is finished, which can take up to 60 seconds. Set client timeouts above that.
Extra headers for runs
Send X-CoA-Model-Request on every request that can call a model, such as starting a run, a stream or a conversation turn. Its value is the Unix time in milliseconds, a dot and a new UUID, for example 1795166043120.5f0c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11. It identifies the request for usage accounting. A background job ignores the header, because its usage is accounted to the job, so sending it there does no harm. Without it the request can be refused with 503 model_usage_request_identity_required before any model call.
An agent whose grantLifecycle is managed, the default for new agents, runs only after a workspace admin has activated a version of it, and every run needs a launch ticket. Request the ticket for the exact body you are about to send, then send that body with the X-CoA-Agent-Protocol and X-CoA-Agent-Ticket headers. Without them the run is refused with 426 agent_protocol_required. Run an agent walks through both calls.
Ids, timestamps and amounts
- Resource ids are UUID strings such as
3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11. Treat them as opaque. userIdfields hold a person's id at the sign-in provider, orapi-key:followed by a key id for work done with an API key.- Most timestamps, including
createdAton agents, receipts and audit entries, are ISO 8601 in UTC with millisecond precision, for example2026-11-20T09:14:03.120Z. A few date fields are not:updatedAton an agent, for example, can arrive as a JavaScript-style date string such asFri Nov 20 2026 09:14:03 GMT+0000 (Coordinated Universal Time). Parse dates with a date library, and do not sort or compare them as strings. - Costs are numbers in US dollars, as in
costUsd.nullmeans the value was not recorded. It does not mean zero.
Lists and pagination
There is no single paging scheme. Each list operation documents its own, and these are the patterns in use:
| Pattern | Example | How to page |
|---|---|---|
| Whole collection | GET /api/agents returns { agents } | Not paged. Every agent is returned, most recently updated first. |
| Recent window | GET /api/audit returns { entries, chain } | The 100 newest entries. There are no paging parameters. |
| Keyset with totals | GET /api/receipts returns { receipts, total, hasMore } | limit (default 100, at most 200), then createdBefore and beforeId taken from the last item of the previous page. |
| Opaque cursor | The MCP list tools return { items, nextCursor, truncated } | Pass nextCursor back as cursor. At most 50 items per page. A cursor is bound to the key and the filters and is refused if either changes. |
# Page 1: the 50 newest receipts with a deny decision
curl -s "https://centerofagentic.com/api/receipts?decision=deny&limit=50" \
-H "Authorization: Bearer $COA_API_KEY"
# Page 2: add createdAt and id of the last receipt on page 1
curl -s "https://centerofagentic.com/api/receipts?decision=deny&limit=50&createdBefore=2026-11-20T09:14:03.120Z&beforeId=7b2e4c1a-5d3f-4a68-8c90-1e2f3a4b5c6d" \
-H "Authorization: Bearer $COA_API_KEY"Keep the filters identical between pages and always send beforeId together with createdBefore. total counts every receipt that matches the filters, not only the page. Stop when hasMore is false. createdAt is rounded to the millisecond while receipts are ordered more finely, so a receipt written in the same millisecond as the last item of a page can be missing from the next page. When you need every receipt, compare the number you collected with total.
Streaming
POST /api/run/stream and POST /api/conversations/{id}/run/stream answer with server-sent events (Content-Type: text/event-stream) so that you can show model output as it arrives. Each event has a name and a JSON data line.
| Event | Data | Meaning |
|---|---|---|
meta | { decision, reasonCode, model } | The policy decision for the run, sent first. |
delta | { text } | A fragment of model output. Concatenate the fragments in order. |
done | { output, receipt } for a run, { message, steps, receiptId } for a conversation turn (receiptId is absent on some refusals). A refusal decided after meta, such as a budget refusal, can add decision, reasonCode and detail. | The run ended and its record is stored. The last event of a stream that did not fail. |
error | { detail }, sometimes with further fields | The run failed after the stream opened. The stream then closes. |
The example streams a run of an activated agent with a key that has the run scope. COA_LAUNCH_TICKET holds a launch ticket that was requested for exactly this body with the purpose run_stream. A ticket is valid for ten minutes and starts one run.
curl -N https://centerofagentic.com/api/run/stream \
-H "Authorization: Bearer $COA_API_KEY" \
-H "Content-Type: application/json" \
-H "X-CoA-Model-Request: $(date +%s)000.$(uuidgen)" \
-H "X-CoA-Agent-Protocol: agent-active-grants/1" \
-H "X-CoA-Agent-Ticket: $COA_LAUNCH_TICKET" \
-d '{"agentId":"3f1c2a9e-0b7d-4e55-9a51-6f2f1c0e8d11","prompt":"Summarize our returns policy in three bullet points."}'event: meta
data: {"decision":"allow","reasonCode":"ALLOWED","model":"openai/gpt-4o-mini"}
event: delta
data: {"text":"- Returns are accepted within 30 days"}
event: delta
data: {"text":" of delivery."}Problems found before the stream opens, such as a validation failure, a missing scope or a rate limit, are ordinary JSON error responses with an HTTP status. Once the stream is open the status is already 200: a failure arrives as an error event, and a policy denial arrives as meta with decision set to deny, followed by done. A refusal decided later, for example by a budget, arrives on done with decision set to deny although meta said allow, so read both. Runs has the details.
Idempotency and retries
GETrequests are safe to repeat.- There is no general idempotency key. Repeating a
POSTrepeats the work: a secondPOST /api/runruns again, can incur model cost again and writes a second receipt. - Launch tickets change this for activated agents. A ticket starts exactly one run, so repeating a request with a ticket that was already used does not run the agent again: it answers
200with{ replayed: true, root: { id, status } }and no output. A repeat sent with a new ticket is a new run. - The platform does not retry a model call on your behalf, and a client should not do it blindly either. After a timeout or a
5xxon a run, look for the receipt withGET /api/receiptsbefore sending the run again. - Most budget and accounting refusals carry
invoked.falsemeans the refused call was not sent to the model provider.truemeans the provider may have been called. See Errors. - A
429 rate_limitedrequest was refused before any model call. Wait for the time inRetry-After, then send it again. On the run and stream operations the refused request has already used its launch ticket, so request a new ticket for the retry. - A
409reports a conflict with current state. Read the resource again and decide again; do not replay the same request. - The external agent operation routes are the exception: they require an
Idempotency-Keyheader of 12 to 128 letters, digits and_,.,:or-. The same key with the same body returns the original operation, and the same key with a different body returns409 idempotency_conflict. These routes are a pilot and answer503 external_pilot_disabledunless Center of Agentic has enabled the pilot; see External agents.
Next steps
Something missing or unclear? Tell us and we will improve this page.