Understanding error responses
The Username API uses the RFC 7807 Problem Details format for all error responses. This standardized format makes it easy to handle errors programmatically and provides clear, actionable error messages.Error response structure
All error responses follow this structure:A URI reference that identifies the problem type. This URI points to documentation explaining the error.
A short, human-readable summary of the problem type.
The HTTP status code for this occurrence of the problem (e.g., 400, 401, 429).
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem (usually the endpoint path).
Number of seconds to wait before retrying the request. Only included in 429 (Rate Limit Exceeded) responses.
Handling errors programmatically
All errors return a JSON response with the Problem Details format. You can handle errors by checking the HTTP status code and parsing the error response:Error code reference
For detailed information about each error code, see:- Invalid Input - 400 Bad Request
- Invalid API Key - 401 Unauthorized
- Account Deleted - 401 Unauthorized
- Request Quota Depleted - 402 Payment Required
- Rate Limit Exceeded - 429 Too Many Requests
- Service Unavailable - 503 Service Unavailable
Related documentation
- Troubleshooting - Common troubleshooting tips and solutions
- Quick start guide - Learn how to make your first API call