Status Codes

Learn what our error status codes mean

We use status codes to provide feedback on every action that you perform on our API. Whenever you run into a problem, these status codes help us to narrow down the problem and solve it quickly for you.

Bloc uses standard REST status codes to indicate successful or failed requests on our API.

In general, codes like 2xx indicate success; 4xx means an error based on the information provided (e.g. wrong API keys or missing customer credentials); 5xx indicates an error with our servers (and these are very rare).

Status codesTranslation
200, 201, 202Everything is alright.
400Bad request. Check your request body to ensure all required data is passed.
401Unauthorized. You may not be passing the right API keys. Check to confirm.
403You don’t enough permission to perform this operation.
404Not found. The resource you are looking for does not exist.
429Too many requests are being sent in a short period of time.
500, 502, 503, 504Completely our fault. Rarely happens.

Error 400

Here’s why you may get this response.

  • All the required information for a certain API request has not been provided.
  • You are submitting the wrong format for a particular variable. For example, you’re submitting an image url instead of a base64 string.

To solve it, please review your information and ensure that they are defined as required by the API documentation.

Error 401

401 errors happen when we can’t authenticate your connections for the following reasons.

  • Your API keys are wrong. Go back to the dashboard to copy again and paste it in your code. It’s less error prone to copy, instead of typing it in manually.
  • You are using the wrong API credentials. Make sure that you are using the right API keys for the right environment. Test credentials will not work on the live environment and vice versa.

Error 403

This happens when you are not authorized to access the requested resource. This typically occurs when you haven’t authenticated your account. To fix this, please complete your authentication. See here to read how.

A 403 error can also be returned if the API is undergoing maintenance or is temporarily unavailable. This only happens if the API server is down or if there’s a problem with your network connection.

If this happens, please contact the team about it for us to look into it immediately.

Error 404

This happens when you attempt to access an API endpoint URL that doesn’t correspond to any existing resource on the server.

For example, if you attempt to access a URL that does not exist, or that has been moved, deleted, the API will return a 404 error.

When this happens, check your URL and confirm with the API documentation to ensure that it is correct.

Error 429

This happens when you have sent too many requests within a time period. Typically, this exists to prevent excessive or abusive use of the API. This also exists to secure the API from hackers.

For example, if an API has a limit of 50 requests per hour, and you make more than 50 requests within an hour, you will get a 429 error. The only way to fix it is to wait before making any further requests.