Skip to content
Documentation menu

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

ItemValue
Base URLhttps://centerofagentic.com/api
TransportHTTPS
FormatJSON request and response bodies in UTF-8. Streaming operations respond with server-sent events.
CredentialAuthorization: Bearer <key>. See Authentication.
WorkspaceTaken from the credential. No parameter selects a workspace.
Field namescamelCase. The policy decision object embedded in a receipt keeps its own snake_case names.
Browser callsThe 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.

Shell
curl -s https://centerofagentic.com/api/agents \
  -H "Authorization: Bearer $COA_API_KEY" \
  | jq '.agents[] | {id, name, status}'
Output
{
  "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.

AreaMain pathsReference
Agents/api/agents, /api/agent-runtime/ticket, /api/modelsAgents
Runs and conversations/api/run, /api/conversationsRuns
Receipts, approvals and audit/api/receipts, /api/approvals, /api/auditReceipts
Workspace settings and keys/api/me, /api/health, /api/tenant/…Workspace
Integrations/api/integrations/…Integrations
Knowledge and skills/api/knowledge, /api/skillsKnowledge and skills
Datasets, experiments and annotations/api/datasets, /api/experiments, /api/annotationsEvaluations
Monitoring, alerts and webhooks/api/dashboard, /api/metrics/…, /api/fleet/…, /api/governance-webhooksMonitoring
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/operationsExternal 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/json and a JSON object as the body of POST, PATCH and PUT requests.
  • Filters and paging options go in the query string.
  • Validation failures return 400 with a code that names the problem, such as missing_prompt or invalid_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.
  • userId fields hold a person's id at the sign-in provider, or api-key: followed by a key id for work done with an API key.
  • Most timestamps, including createdAt on agents, receipts and audit entries, are ISO 8601 in UTC with millisecond precision, for example 2026-11-20T09:14:03.120Z. A few date fields are not: updatedAt on an agent, for example, can arrive as a JavaScript-style date string such as Fri 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. null means 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:

PatternExampleHow to page
Whole collectionGET /api/agents returns { agents }Not paged. Every agent is returned, most recently updated first.
Recent windowGET /api/audit returns { entries, chain }The 100 newest entries. There are no paging parameters.
Keyset with totalsGET /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 cursorThe 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.
Paging through denied runs
# 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.

EventDataMeaning
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 fieldsThe 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.

Shell
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."}'
Start of the stream
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

  • GET requests are safe to repeat.
  • There is no general idempotency key. Repeating a POST repeats the work: a second POST /api/run runs 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 200 with { 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 5xx on a run, look for the receipt with GET /api/receipts before sending the run again.
  • Most budget and accounting refusals carry invoked. false means the refused call was not sent to the model provider. true means the provider may have been called. See Errors.
  • A 429 rate_limited request was refused before any model call. Wait for the time in Retry-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 409 reports 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-Key header 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 returns 409 idempotency_conflict. These routes are a pilot and answer 503 external_pilot_disabled unless Center of Agentic has enabled the pilot; see External agents.

Next steps

Something missing or unclear? Tell us and we will improve this page.