Error Handling & Error Codes
AuthSetu uses conventional HTTP response codes to indicate the success or failure of an API request.
Error Codes Table
| Status | Code | Description |
|---|---|---|
| `400` | `bad_request` | The request was malformed or missing required fields. |
| `401` | `unauthorized` | Missing or invalid API key or session token. |
| `403` | `forbidden` | The authenticated principal lacks necessary scopes. |
| `404` | `not_found` | The requested resource does not exist. |
| `429` | `rate_limit_exceeded` | You have sent too many requests in a given amount of time. |
| `500` | `internal_server_error` | An internal platform error occurred. |
Error Response Body
{
"data": null,
"error": {
"code": "invalid_parameter",
"message": "Field 'email' must be a valid email address.",
"docUrl": "https://authsetu.com/docs/backend-api/errors"
},
"requestId": "req_01J98ABC"
}