Errors
Error envelope
Every error response uses the same shape:
JSON
{
"success": false,
"error": { "code": "validation_error", "message": "Validation failed", "fields": { "email": "Enter a valid email" } }
}fields is only present for validation_error.
Error codes
| HTTP status | code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or invalid bearer token. |
| 403 | forbidden | The member's role does not allow this action. |
| 403 | insufficient_scope | The token was not granted the required scope. |
| 400 | no_active_organization | The user has no active organization context. |
| 404 | not_found | The resource does not exist in your organization. |
| 422 | validation_error | Request body failed validation; see `error.fields`. |
| 409 | conflict | The request conflicts with the resource's current state. |
| 429 | rate_limited | Too many requests — see Rate Limits. |
| 400 | invalid_request | The request is malformed. |
| 400 | invalid_grant | OAuth2: the grant (e.g. refresh token) is invalid or expired. |
| 400 | invalid_client | OAuth2: unknown or unauthorized client. |
| 400 | unsupported_grant_type | OAuth2: the requested grant_type isn't supported. |
| 500 | internal_error | An unexpected server error occurred. |