The ZBD API follows standard HTTP response codes for handling success and error requests.

If you are unfamiliar with HTTP requests, please read more here.

HTTP status codes

Below is an overview of HTTP status codes available in the standard, which ZBD API adheres by:

HTTP Response GroupStatus Code Range
Informational Responses100-199
Successful Responses200-299
Redirects300-399
Client Errors400-499
Server Errors500-599

Common response codes

These are the HTTP status codes most often returned by the ZBD API.

Status CodeDetailsResponse Description
200SuccessRequest was successful.
400Bad RequestEither incorrect or missing parameters provided for the Request.
401UnauthorizedRequest is not authorized. Make sure correct API Key is provided.
403ForbiddenRequest is forbidden. Make sure your IP is located in a region/country that ZBD services are available in.
404Not FoundThe requested endpoint/resource was not found.
422Missing ParameterThe requested endpoint expected a specific parameter to be provided.
429Rate LimitedToo many requests in short time-frame.
500Server ErrorSomething went wrong in the ZBD API servers.

Error messages

To help identify the issue with your API requests, the error JSON response returned will often include a message property that aims to be descriptive.

Example of an error message from the API:

{
  "success": false,
  "message": "Error creating Withdrawal Request: The \"amount\" property (in millisatoshis) is required.",
}