API reference
Errors
Look up what each HTTP status and error code means and how to respond to it.
A failed request returns an error envelope with a stable error.code. Branch on the code. Do not rely on the English wording of error.message.
Status and error codes
| Status | Condition | What to do |
|---|---|---|
400 | validation_error: a fee write references something you cannot use. error.details.missing lists each kind, id, and reason. | Fix the request. |
400 | invalid_cursor: a batch cursor was altered. | Fix the request. |
401 | Authentication is missing or invalid. | Check the active API key. |
402 | credit_insufficient: the account lacks credits. | Add credits or check your subscription. |
403 | forbidden: the operation is not available to your credential. | Use an operation that your role allows. |
403 | subscription_required: saving your own fee records needs an active subscription. Reading them stays available. | Activate a subscription. |
404 | resource_not_found | Check the path, the identifier, and coverage. |
405 | method_not_allowed | Check the HTTP method and the Allow header. |
409 | conflict: the record changed since you read it (for example, a stale expected_sequence), or a chain is still in use. | Reload, then retry. |
422 | validation_error: a field breaks its constraints. | Fix the field before you retry. |
422 | unsupported_currency | Use an official currency code. |
429 | rate_limited | Wait for the time in Retry-After. |
500 | internal_error | Keep the request ID and report persistent failures. |
503 | dependency_unavailable | Retry later with backoff. |
Validation details
Validation errors can include error.details.errors. Each entry has loc, msg, and type. The response does not have to echo your original input.
Billing on failure
Failed price requests do not consume credits. A successful response that your client lost is different. See polling and retries.
For the envelope that carries these codes, see response formats.