Errors & Status Codes
The API uses standard HTTP status codes and returns a consistent error object for failures.
HTTP status codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request — Invalid parameters or body |
| 401 | Unauthorized — Missing or invalid API key |
| 403 | Forbidden — Insufficient permissions |
| 404 | Not Found — Resource does not exist |
| 429 | Too Many Requests — Rate limit exceeded |
| 500 | Internal Server Error |
Error response format
Errors return a JSON object with an error field:
{
"error": {
"code": "invalid_request",
"message": "The request was invalid.",
"details": [
{ "field": "amount", "reason": "Must be a positive number" }
]
}
}Error codes
invalid_request— Invalid parameters or body (400)unauthorized— Missing or invalid authentication (401)forbidden— No permission for this resource (403)not_found— Resource not found (404)rate_limit_exceeded— Too many requests (429)internal_error— Server error (500)