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 CodeMeaning
200OK -- Everything worked as expected.
201Created -- The request succeeded, and a new resource was created as a result.
202Accepted -- The request has been received but not yet acted upon. We return this status code for requests that were accepted but are processed asynchronously.
204No Content -- The request succeeded, but the API doesn’t provide a response body.
400Bad Request -- The request was unacceptable, often due to missing a required parameter.
401Unauthorized -- No valid API key provided.
402Not enabled
404Not Found -- The requested resource doesn't exist.
409Confilict -- The request conflicts with the current state of the server.
410Gone -- 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.
429Too Many Requests -- You hit the rate limit for this endpoint (different endpoints have different rate limits).
500Server Error -- Something is wrong on Bespoke's end.
503Service Unavailable -- Something is wrong on Bespoke’s end leading to service unavailability.

Example Error Formats

{  
    "statusCode": 429,  
    "message": "Rate limit"  
}