{meta, error}
envelope with consistent structuremeta.requestId
for debuggingv1 Error Code | HTTP Status | v2 Error Type | v2 Category | Description |
---|---|---|---|---|
BAD_REQUEST | 400 | https://unkey.com/docs/errors/unkey/application/invalid_input | Application | Invalid request parameters or malformed input |
UNAUTHORIZED | 401 | https://unkey.com/docs/errors/unkey/authentication/key_not_found | Authentication | Missing or invalid authentication |
FORBIDDEN | 403 | https://unkey.com/docs/errors/unkey/authorization/forbidden | Authorization | Insufficient permissions for the requested action |
NOT_FOUND | 404 | https://unkey.com/docs/errors/unkey/data/key_not_found | Data | Requested resource does not exist |
CONFLICT | 409 | https://unkey.com/docs/errors/unkey/data/conflict | Data | Resource conflict (e.g., duplicate creation) |
PRECONDITION_FAILED | 412 | https://unkey.com/docs/errors/unkey/application/precondition_failed | Application | Required preconditions not met |
TOO_MANY_REQUESTS | 429 | https://unkey.com/docs/errors/unkey/application/rate_limited | Application | Rate limit exceeded |
INTERNAL_SERVER_ERROR | 500 | https://unkey.com/docs/errors/unkey/application/internal_error | Application | Unexpected server error |
DELETE_PROTECTED | 403 | https://unkey.com/docs/errors/unkey/authorization/delete_protected | Authorization | Resource cannot be deleted due to protection rules |
v1 Verification Code | v2 Error Type | Description | Migration Notes |
---|---|---|---|
VALID | N/A | Key is valid and verification successful | No error - successful response |
NOT_FOUND | https://unkey.com/docs/errors/unkey/data/key_not_found | Key does not exist or has been deleted | Same as HTTP 404 NOT_FOUND |
FORBIDDEN | https://unkey.com/docs/errors/unkey/authorization/forbidden | Key is not allowed to access this API | Same as HTTP 403 FORBIDDEN |
USAGE_EXCEEDED | https://unkey.com/docs/errors/unkey/data/usage_exceeded | Key has exceeded its usage limit | New specific error type in v2 |
RATE_LIMITED | https://unkey.com/docs/errors/unkey/application/rate_limited | Key has been rate limited | Same as HTTP 429 TOO_MANY_REQUESTS |
UNAUTHORIZED | https://unkey.com/docs/errors/unkey/authentication/unauthorized | Key authentication failed | Same as HTTP 401 UNAUTHORIZED |
DISABLED | https://unkey.com/docs/errors/unkey/authorization/key_disabled | Key has been disabled | New specific error type in v2 |
INSUFFICIENT_PERMISSIONS | https://unkey.com/docs/errors/unkey/authorization/insufficient_permissions | Key lacks required permissions | Enhanced RBAC error in v2 |
EXPIRED | https://unkey.com/docs/errors/unkey/data/key_expired | Key has expired | New specific error type in v2 |
meta.requestId
when contacting supporttype
URL for detailed documentation about specific errorserrors
array for field-specific validation failuresresponse.error
instead of direct error accessmeta.requestId
for logging and support requeststitle
, detail
, status
, and type
fieldserrors
array for detailed field-level feedback