Error Messages

Error Messages

Request errors are returned as HTTP status codes. The following table lists the possible error codes and their meaning.

The type will give you a general idea of why the operation failed, whereas the errorCode describes the issue in more detail. Below we list the error_codes for the API, segmented by their corresponding error_type.

Http Error Codes

400 - Bad Request

{
  "code": "404",
  "error": "Bad Request",
  "message": "
    The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
    It could be invalid JSON, missing required fields, or other issues."
}

401 - Unauthorized

Empty body, or you have the wrong API key, secret, or project.

402 - Payment required

{
  "code": "402",
  "error": "Payment required",
  "message": "You have reached 0 balance on your account please make a payment."
}

404 - Not found

{
  "code": "404",
  "error": "Not found",
  "message": "The resource is not found, not available, or does not exist."
}

422 - Unprocessable Content (Invalid parameters)

{
  "code": "422",
  "error": "Invalid parameters",
  "message": "The request could not be understood by the server due to malformed syntax.
     The client SHOULD NOT repeat the request without modifications."
  details: {
    fieldViolations: [
      {
        field: "to",
        description: "The (+15551) is not a valid phone number"
      }
    ]

  }

429 Rate limit exceeded

Rate limit exceeded, please back off and try again later. If you need higher rate please contact support.

500 - Internal Server Error

Probably no body, but if there is a body it will look like this:

{
  "code": "500",
  "error": "Internal service error",
  "message": "Most likely a temporary issue, please try again later. If the problem persists, please back of on this request and contact support."
}

Error object

Please note that the response code is probably the most important part of the response, but the error object will contain more information about the error. Not all errors return this object, and the details object is not always present.

code
integer <int32>

HTTP status code or error code

status
string

Response status name.

message
string

A developer-facing error message

Array of objects (ErrorDetail)

Details of the errors

Array
type
string
Default: "BadRequest"

The request was malformed on one or more properties.

{
  • "code": 400,
  • "status": "INVALID_ARGUMENT",
  • "message": "Bad request.",
  • "details": [
    • {
      }
    ]
}