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

StatusConditionWhat to do
400validation_error: a fee write references something you cannot use. error.details.missing lists each kind, id, and reason.Fix the request.
400invalid_cursor: a batch cursor was altered.Fix the request.
401Authentication is missing or invalid.Check the active API key.
402credit_insufficient: the account lacks credits.Add credits or check your subscription.
403forbidden: the operation is not available to your credential.Use an operation that your role allows.
403subscription_required: saving your own fee records needs an active subscription. Reading them stays available.Activate a subscription.
404resource_not_foundCheck the path, the identifier, and coverage.
405method_not_allowedCheck the HTTP method and the Allow header.
409conflict: the record changed since you read it (for example, a stale expected_sequence), or a chain is still in use.Reload, then retry.
422validation_error: a field breaks its constraints.Fix the field before you retry.
422unsupported_currencyUse an official currency code.
429rate_limitedWait for the time in Retry-After.
500internal_errorKeep the request ID and report persistent failures.
503dependency_unavailableRetry 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.