BotLedger

Error reference

Codes are stable and safe to branch on. Messages are human-facing and may be reworded. Every error body carries a request_id — quote it if you need help.

{
  "error": {
    "type": "idempotency_error",
    "code": "idempotency_key_reused",
    "message": "This Idempotency-Key was already used with a different request body.",
    "param": "Idempotency-Key",
    "doc_url": "https://botledger.co/developers/errors#idempotency_key_reused",
    "request_id": "req_d1d37e391e7f45b7bb47cb77"
  }
}
CodeStatusMeaning
missing_api_key401No API key was supplied. Send it as Authorization: Bearer bl_live_…
invalid_api_key401The key is unknown or has been revoked.
insufficient_scope403The key is valid but lacks the scope this endpoint requires.
agent_not_active403The agent is paused or retired. Retired agents keep their history and stop recording.
invalid_request400The body failed validation. The param field names the offending field.
missing_idempotency_key400POST /v1/decisions requires an Idempotency-Key header.
idempotency_key_reused409This key was already used with a different body. Use a new key for a different decision.
idempotency_request_in_flight409A request with this key is still processing. Retry shortly.
rate_limit_exceeded429Too many requests. Retry-After says how long to wait.
not_found404No such agent or record.
record_is_immutable409You tried to modify an official record. Record a new one instead.
provider_error502A broker or market data provider failed. The request was not recorded.
internal_error500Something failed on our side. The request was not recorded.