Last updated

Responses Codes & Errors

Our API uses conventional HTTP response codes to indicate the success or failure of an API request. In general:

  • 2xx Success – The request was successfully processed.
  • 4xx Client Errors – The request was invalid or cannot be processed due to issues such as missing parameters, authentication failures, or invalid data.
  • 5xx Server Errors – The request could not be completed due to an issue on our end. These errors are rare, but if they occur, please try again later. If issue persist please contact our support.

Common Response Codes

Status CodeDescription
200 OKThe request was successful, and the response contains the expected data.
201 CreatedThe resource was successfully created.
204 No ContentThe request was successful, but there is no additional content to return.
400 Bad RequestThe request was invalid. This may happen if required parameters are missing or have incorrect values.
401 UnauthorizedAuthentication failed or the API token is invalid or missing.
403 ForbiddenThe request was valid, but the authenticated user does not have the necessary permissions.
404 Not FoundThe requested resource does not exist.
409 ConflictThe request could not be processed due to a conflict (e.g., attempting to create a duplicate resource).
422 Unprocessable EntityThe request was well-formed but contains semantic errors (e.g., validation errors on input data).
500 Internal Server ErrorAn unexpected error occurred on our servers. Try again later, and if the issue persists, contact support.

For error responses, the API returns a structured JSON object with details about the failure, including an error code and message to help diagnose the issue.

Expanding on Errors

Most times, when an API returns an error it will be paired with a ErrorType to describe further what may have caused the error.

Order specific ErrorTypes

Error Type Description
invalid_accountThe provided account is not valid. Double-check the account passed.
settings_restrictionYour Workspace restriction is restricting your request. More about restrictions here
insufficient_balanceWorkspace Account does not have sufficient balance for this transaction
order_no_payment_typePlease specifiy a payment type to process the order request with
invalid_amountAmount specified is not a valid amount.

General ErrorTypes

Error Type Description
invalid_fieldSome input values are not valid.
invalid_formatSome input value is not in the correct format
security_errorTrying to access a resource with unauthorized access.
server_errorSomething happened on our side. Please contact support if issue persists.