Error envelope
string
required
A short machine-readable identifier for the failure. Use this for branching logic — never the message.
string
required
A human-readable description of what went wrong. Safe to surface to developers, but not generally suitable for end users.
object
Optional structured context. The shape depends on the error code — for
validation_error this often includes the offending field name, expected type, etc.Error codes
Examples
unauthorized (401)
Returned when the Authorization header is missing, the key has been revoked, or the key format is invalid.
forbidden (403)
Returned when the key is valid but doesn’t have permission for the action — for example, a read-only key trying to POST.
not_found (404)
Returned when the resource doesn’t exist, or exists in a different workspace than the one your key belongs to.
bad_request (400)
Returned for malformed requests — invalid JSON, unsupported query parameters, missing Content-Type, etc.
validation_error (422)
Returned when the request is structurally valid but at least one field failed validation. The details object identifies the offending field.
conflict (409)
Returned when the request would violate a uniqueness constraint or otherwise conflict with the current state.
rate_limited (429)
Returned when you exceed the per-key request budget. The response includes Retry-After and X-RateLimit-* headers — see Rate Limits.

