Prelude uses conventional HTTP statuses to indicate the success or failure of a request:

  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an error that failed given the information provided (e.g. required parameter was omitted or an authentication failed).
  • Codes in the 5xx range indicate an error with Prelude’s servers (these are rare).

Codes

Below is a list of possible error codes, along with additional information about how to resolve them.

CodeDescription
expires_at_in_pastThe expires_at parameter is in the past. Provide a future date.
expires_at_too_far_in_futureThe expires_at parameter is too far in the future. Provide a date within the next day.
insufficient_balanceYou do not have a sufficient balance to send this message. Top-up your account from the Dashboard.
internalAn internal error occurred. Please try again later.
invalid_api_keyThe provided API key is invalid. You can get your API key from the Dashboard.
invalid_callback_urlThe provided callback URL is invalid.
invalid_correlation_idThe provided correlation ID is invalid. Provide a string with a maximum length of 64 characters.
invalid_date_formatThe date passed is not a valid RFC3339 date.
invalid_line_typeThe provided phone number is not assigned to a mobile phone. Prelude only supports mobile phone numbers.
invalid_phone_numberThe provided phone number is invalid. Provide a valid E.164 phone number.
invalid_requestThe request is invalid. Check your request against the API documentation and try again.
invalid_sender_idThe provided sender ID is invalid.
invalid_template_idThe provided template ID is invalid. You can get your template ID from the Dashboard.
invalid_template_variablesThe provided template variables are invalid. Provide a JSON object with the required variables.
invalid_localeThe provided locale is invalid. Locales should be a BCP-47 formatted string.
invalid_device_idThe provided device ID is invalid.
invalid_os_versionThe provided OS version is invalid.
invalid_device_modelThe provided device model is invalid.
invalid_app_versionThe provided app version is invalid.
invalid_device_typeThe provided device type is invalid.
missing_api_keyYou forgot to include your API key. Add it to the Authorization header using Bearer authentication, like this: Authorization: Bearer <API_KEY>.
suspended_accountYour account is suspended. Contact support for more information.
template_not_foundThe provided template ID was not found.
template_not_registered_in_countryThe provided template is not registered in the requested country.
unauthorized_sender_idThe provided sender ID is not authorized to send messages. Contact support for more information.
unsupported_countryPrelude does not support sending messages to the provided country yet. Contact support for more information.
region_blocked_by_customerThis region is blocked for this account.
region_missing_registrationThis region needs additional registration. Contact support for information.
premature_retryThis verification was retried too early. You can set the delay between retries from your Dashboard.
spending_limit_exceededThe spending limit for a time period has been exceeded. You can set the spending limits from your Dashboard.

code
string
required

The error code.

message
string
required

A human-readable message describing the error.

type
string
required

The error type.

request_id
string

A string that identifies this specific request. Report it back to us to help us diagnose your issues.