Getting started
Errors
Status codes and the shape of error responses.
The API uses conventional HTTP status codes: 2xx means success, 4xx means something is wrong with the request and 5xx means something went wrong on our side.
Error responses
Errors come as JSON with the status code repeated and a human readable message:
{
"status": 404,
"error": "Customer not found"
}
When the request body does not validate, the response is a 422 with the offending fields and their messages under fields:
{
"status": 422,
"error": "Could not create customer. Some fields contain invalid data",
"fields": {
"email": ["The email field is required."]
}
}
Status codes
| Code | Meaning |
|---|---|
200 |
The request succeeded. |
201 |
The resource was created. |
204 |
The request succeeded and there is no content to return. |
401 |
The API key is missing or invalid. See authentication. |
403 |
Your plan does not include API access. |
404 |
The resource or endpoint does not exist, or belongs to another organization. |
422 |
The request body contains invalid data. |
429 |
Too many requests. See rate limits. |
5xx |
Something went wrong on our side. Retry later, and contact support if it persists. |