Skip to main content

Documentation Index

Fetch the complete documentation index at: https://dev.chief.bot/llms.txt

Use this file to discover all available pages before exploring further.

Every error from the Chief Public API uses the same JSON envelope:
{
  "code": "publicapi.auth.invalid",
  "humane": "The provided API key is invalid or has been revoked.",
  "statusCode": 401
}
FieldDescription
codeStable, dotted, lowercase identifier (domain.operation.reason). Use for i18n keys and analytics.
humanePlain English safe to show end users.
statusCodeMirrors the HTTP status code.
code values are additive. Existing codes are never reworded.

HTTP status reference

StatusMeaning
400Malformed request, validation failure, or missing tenancy header.
401Authentication failure.
404Resource does not exist or is outside the caller’s reach.
500Unexpected server error.

Documented error codes

CodeHTTPWhen
publicapi.auth.invalid401PAT is missing, malformed, or revoked.
publicapi.tenancy.project.missing400X-Project-Id is missing or malformed.
Additional operation-specific codes may appear in v1. Prefer HTTP status for broad handling and code when you need precise branching.

Validation errors

Invalid JSON bodies, unknown fields, or id shape mismatches typically return HTTP 400. Resource ids use fixed prefixes and lengths:
PrefixExample
chat_chat_d8aad64dib2c7m3ae7j0
message_message_d8aad64dib2c7m3ae7jg
asset_asset_d8aad64dib2c7m3ae7j1
label_label_d8aad64dib2c7m3ae7k0
project_project_d8a4td4dib27i4beefb0

Client recommendations

  • Log code and HTTP status for support and metrics.
  • Show humane to users when appropriate; do not parse it for control flow.
  • Retry 5xx with exponential backoff.
  • Do not retry 4xx unless you fix the request (for example, add a valid X-Project-Id).

Pagination errors

SituationTypical response
Both after_id and before_id setHTTP 400
limit outside 1–100HTTP 400
See Pagination for valid query parameters.