ReplyBrain Docs LLMs

Errors

Every error has the same shape:

{
  "error": {
    "code": "stale_revision",
    "message": "The resource changed. Read it again before retrying.",
    "request_id": "6c1f0e8e-0000-4000-8000-000000000004",
    "retryable": false,
    "details": { "current_etag": "\"3f1c…\"" }
  }
}

Branch on code, never on message. Quote request_id when you write to [email protected].

Status code Meaning, and what to do
400 invalid_request A missing or malformed field, a bad limit, a value the endpoint refuses. Fix the request.
401 unauthenticated No key, a wrong or revoked one; on the events endpoint, a missing or wrong signature.
403 policy_denied A missing scope (details.required_scope), a key that is not an organization secret key, a creator who left, or an authority that refuses the decision.
404 not_found Does not exist, or is outside this key's organization or bounds.
409 approval_required The action needs a valid approval of its current revision (details.action_revision, details.arguments_digest).
409 capability_unavailable Not possible for this resource: a connected case changed here, an outbound message on a managed case.
409 authority_mismatch The policy changed since the approver reviewed it (details.current_policy_revision).
409 idempotency_conflict The Idempotency-Key was used for another request, or a concurrent request with it was recorded. Read the resource, or use a new key for a new request.
409 invalid_state The record's state refuses the change (a run that already ended, a dispatched action).
409 send_in_progress A reply about this commitment is being sent. Retry shortly (retryable: true).
410 cursor_expired The cursor expired or belongs to another key or route. Lists: start again without a cursor. Events: see [[api-reference/conventions
412 stale_revision The resource changed since you read it (details.current_etag). Read it again.
413 invalid_request An event body over 256 KB.
422 reason_required Withdrawing a work commitment needs commitment.reason.
422 unattributed A work commitment's change needs a key a member created.
428 precondition_required A PATCH without If-Match.
429 rate_limited Wait Retry-After seconds (retryable: true).
5xx (none guaranteed) The write may have happened. Read the resource, or reconcile, before sending again with the same Idempotency-Key.
WARNING

A timeout or a 5xx after a write is not proof that nothing happened. Retry with the same Idempotency-Key: you get the recorded result if it did happen. A new key is a new command.