API Error Codes
Regrettably, there are instances when requests to the API may not be successful. Failures can arise due to various factors. In such cases, the API responds with an appropriate HTTP Status Code, providing insight into the nature of the failure. Additionally, a JSON-formatted response body is included, offering supplementary details.
Bespoke's API uses the following HTTP codes:
Error Code | Meaning |
---|---|
200 | OK -- Everything worked as expected. |
201 | Created -- The request succeeded, and a new resource was created as a result. |
202 | Accepted -- The request has been received but not yet acted upon. We return this status code for requests that were accepted but are processed asynchronously. |
204 | No Content -- The request succeeded, but the API doesn’t provide a response body. |
400 | Bad Request -- The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorized -- No valid API key provided. |
402 | Not enabled |
404 | Not Found -- The requested resource doesn't exist. |
409 | Confilict -- The request conflicts with the current state of the server. |
410 | Gone -- The requested content has been permanently deleted from Bespoke’s server. This status code will occur for requested endpoints that no longer exist in our API. |
429 | Too Many Requests -- You hit the rate limit for this endpoint (different endpoints have different rate limits). |
500 | Server Error -- Something is wrong on Bespoke's end. |
503 | Service Unavailable -- Something is wrong on Bespoke’s end leading to service unavailability. |
Example Error Formats
{
"statusCode": 429,
"message": "Rate limit"
}