Skip to content

Errors

The standard error envelope and what each status code means.

Last updated 2026-07-22

Every error returns the same JSON envelope, with an HTTP status that matches the type:

{
  "error": {
    "type": "validation_error",
    "code": "validation_error",
    "message": "One or more fields are invalid",
    "requestId": "b3f1…",
    "details": { "fieldErrors": { "customerId": ["Required"] } }
  }
}
  • type — a coarse machine category (below).
  • code — a stable slug you can branch on.
  • message — a human-readable sentence.
  • requestId — include this when contacting support.
  • details — optional structured context (e.g. field-level validation errors).

Status codes

StatustypeWhen
400invalid_requestMalformed request, bad params, missing Idempotency-Key
401authentication_errorMissing, invalid, revoked or expired key
403permission_errorThe key lacks the required scope
403tenant_suspendedThe account is suspended
404not_foundNo such resource in your company
409conflictIdempotency-Key reused with a different request
422validation_errorWell-formed but semantically invalid input
429rate_limitedToo many requests — see Retry-After
500internal_errorSomething went wrong on our side

Request ids

Every response carries an X-Request-Id header (echoed in error bodies as requestId). Log it — it's the fastest way for us to trace a request.