Base URL
The Chief Public API is built on REST principles. Use HTTPS for every request.Authentication
Authenticate with a Personal Access Token (PAT) in theX-API-Key header. PATs are created in the Chief app under Settings → API tokens.
pat_ prefix followed by 32 characters. The full secret is shown only once at creation. Revoked or invalid keys return HTTP 401 with code publicapi.auth.invalid.
Project scoping
Every project-scoped endpoint also requiresX-Project-Id:
400 with code publicapi.tenancy.project.missing.
Response codes
Chief uses standard HTTP codes to indicate success or failure.See Errors for the error envelope and stable
code values.Error envelope
Every error response uses the same JSON shape:code for branching and analytics. Use humane for display copy.
Async operations
Chat endpoints are asynchronous in v1.POST /v1/chats and POST /v1/chats/{id}/messages return immediately with ids; poll GET /v1/chats/{id}/messages/{mid} until response is present. See the Chats guide.
Asset uploads use a three-step flow: create slot, PUT to blob storage, then complete. Poll GET /v1/assets/{id} until status is ready or failed. See the Assets guide.
FAQ
How does pagination work?
How does pagination work?
List endpoints for chats and assets use cursor-based pagination with
after_id, before_id, and limit. Pass the previous page’s last_id as after_id to move forward. See Pagination.How do I create or revoke API keys?
How do I create or revoke API keys?
PAT management is only available in the Chief UI (Settings → API tokens), not through the public
/v1 API.How does API versioning work?
How does API versioning work?
All public endpoints are under the
/v1 prefix. Breaking changes will ship under a new prefix when introduced.Can I call the API from a browser?
Can I call the API from a browser?
CORS preflight is supported for documented methods. For production, call the API from your backend so PATs never ship to clients.