Conventions
Product endpoint map, request conventions, pagination, conflicts, and errors.
Protected /v1 endpoints take Authorization: Bearer <access-token> and JSON request bodies. The API validates public request shapes, resolves caller and workspace context, then delegates to the domain services; it owns no product storage itself.
Core endpoint map
| Domain | Main endpoints |
|---|---|
| Playbooks | GET/POST /v1/playbooks, GET/DELETE /v1/playbooks/:id, Versions, ACL, star, share-token routes |
| Aliases | GET/PUT /v1/aliases, DELETE /v1/aliases/:alias |
| Cases | GET/POST /v1/cases, GET/PATCH /v1/cases/:id, assignee, ACL, close, reopen |
| Tasks | GET/POST /v1/tasks, update, assignee, close, reopen |
| Records | GET/POST /v1/records |
| Suggestions | GET/POST /v1/suggestions, get, update, resolve |
| Administration | workspaces, workspace members, projects, project members, credits, CLI and MCP tokens |
Tasks and Records are top-level resources carrying caseId; their APIs are not duplicated below /v1/cases/:id. This makes assigned-Task inboxes and cross-Case Record feeds first-class.
Context and pagination
Supported administrative endpoints take workspaceId as a query parameter. Product-domain routes resolve the actor context from the bearer credential. Never assume that a locally selected CLI workspace applies to a raw HTTP request.
List operations use pageSize and an opaque cursor. Preserve the cursor exactly; do not construct or decode it. Records use stable (createdAt, id) ordering and accept order=asc|desc. Record filters always intersect the caller's live Case access.
Mutations
Mutation bodies carry idempotencyKey. Reuse a key only for an identical request after a network failure or uncertain response. Case and Task mutations include expectedLockVersion; Playbook publication includes baseVersionId. A mismatch returns a conflict so the client can re-read and rebuild intent from fresh state.
Close Task and close Case requests may include new Records, allowing the state transition and final durable outputs to commit together.
Errors
| Status | Meaning |
|---|---|
400 |
malformed parameter, query, JSON, unsupported value, or request-schema validation failure |
401 |
missing, expired, or invalid bearer credentials |
402 |
insufficient credits in the resolved context |
403 |
authenticated but not authorized for the operation |
404 |
missing or intentionally hidden resource |
409 |
base Version, lock Version, lifecycle, or uniqueness conflict |
429 |
rate limited; back off before retrying |
5xx |
server or upstream failure |
Retry 429 and transient 5xx responses with bounded exponential backoff. Do not automatically retry validation, authorization, or conflict responses. For a conflict, read current state and obtain human or agent judgment before issuing a new mutation.