> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prelude.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> The Prelude's V2 API error format and the various error codes returned.

## Codes

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

| Code                                 | Description                                                                                                                                                                 |
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `batch_size_exceeded`                | The batch size is too large. The maximum batch size is 1000.                                                                                                                |
| `blocked`                            | The verification attempt was blocked. This error only occurs when using the Supabase integration.                                                                           |
| `category_forbidden`                 | The message category is not allowed for marketing messages in the specified country.                                                                                        |
| `channel_not_enabled_in_region`      | The channel you're trying to use is not activated in the region you're trying to deliver the message. You can update the channels in the Dashboard from the route settings. |
| `custom_code_not_allowed`            | The custom\_code feature is not enabled on your account. Contact support for information.                                                                                   |
| `custom_size_conflict`               | Custom code and code size can't be set at the same time.                                                                                                                    |
| `document_not_supported`             | This template does not support document attachments. Remove the document object.                                                                                            |
| `document_required`                  | This template requires a document attachment. Provide a document object with url and filename.                                                                              |
| `email_verification_not_allowed`     | The email verification feature is not available to your account. Contact support for more information.                                                                      |
| `empty_batch`                        | The batch is empty. Provide at least one phone number.                                                                                                                      |
| `expires_at_in_past`                 | The `expires_at` parameter is in the past. Provide a future date.                                                                                                           |
| `expires_at_too_far_in_future`       | The `expires_at` parameter is too far in the future. Provide a date within the next day.                                                                                    |
| `feature_gated`                      | Your account does not have access to this feature. Contact support for more information.                                                                                    |
| `insufficient_balance`               | You do not have a sufficient balance to send this message. Top-up your account from the Dashboard.                                                                          |
| `internal`                           | An internal error occurred. Please try again later.                                                                                                                         |
| `invalid_app_realm`                  | Both platform and value are required for app realm.                                                                                                                         |
| `invalid_app_realm_platform`         | AppRealm platform must be "android" or "web".                                                                                                                               |
| `invalid_app_realm_value`            | The AppRealm value is invalid. Must be an 11 character base64 string for Android, or a valid origin domain for Web.                                                         |
| `invalid_api_key`                    | The provided API key is invalid. You can get your API key from the Dashboard.                                                                                               |
| `invalid_bearer_token`               | The provided bearer token is invalid.                                                                                                                                       |
| `invalid_callback_url`               | The provided callback URL is invalid.                                                                                                                                       |
| `invalid_code_size`                  | Code size must be between 4 and 8.                                                                                                                                          |
| `invalid_correlation_id`             | The provided correlation ID is invalid. Provide a string with a maximum length of 80 characters.                                                                            |
| `invalid_custom_code`                | The provided custom code is invalid.                                                                                                                                        |
| `invalid_customer_uuid`              | The provided customer UUID is invalid. This error only occurs when using the Supabase integration.                                                                          |
| `invalid_date_format`                | The date passed is not a valid RFC3339 date.                                                                                                                                |
| `invalid_default_sender_id`          | The template default Sender ID is invalid. Provide a valid Sender ID.                                                                                                       |
| `invalid_dispatch_id`                | The provided dispatch identifier is invalid. Must be a valid UUIDv7.                                                                                                        |
| `invalid_document_url`               | The provided document URL is invalid. Provide a valid HTTP or HTTPS URL.                                                                                                    |
| `invalid_email`                      | The provided email address is invalid.                                                                                                                                      |
| `invalid_integration`                | The provided integration is invalid.                                                                                                                                        |
| `invalid_line_type`                  | The provided phone number is not assigned to a mobile phone. Prelude only supports mobile phone numbers.                                                                    |
| `invalid_locale`                     | The provided locale is invalid. Locales should be a BCP-47 formatted string.                                                                                                |
| `invalid_method`                     | The provided method is invalid.                                                                                                                                             |
| `invalid_pagination_cursor`          | The provided pagination cursor is invalid.                                                                                                                                  |
| `invalid_pagination_limit`           | The `limit` parameter must be between 1 and 200.                                                                                                                            |
| `invalid_pagination_offset`          | The `offset` parameter must be a non-negative integer.                                                                                                                      |
| `invalid_phone_number`               | The provided phone number is invalid. Provide a valid E.164 phone number.                                                                                                   |
| `unassigned_phone_number`            | The provided phone number does not belong to a valid, assigned number range.                                                                                                |
| `invalid_preferred_channel`          | The provided preferred channel is invalid.                                                                                                                                  |
| `invalid_request`                    | The request is invalid. Check your request against the API documentation and try again.                                                                                     |
| `invalid_sender_id`                  | The provided sender ID is invalid.                                                                                                                                          |
| `invalid_subscription_config_id`     | The provided subscription configuration identifier is invalid.                                                                                                              |
| `invalid_subscription_state`         | The `state` parameter must be either SUB or UNSUB.                                                                                                                          |
| `invalid_template_id`                | The provided template ID is invalid. You can get your template ID from the Dashboard.                                                                                       |
| `invalid_template_variables`         | The provided template variables are invalid. Provide a JSON object with the required variables.                                                                             |
| `invalid_psd2`                       | The submitted `psd2` block is invalid. Required for codes issued under the `prelude:psd2` template.                                                                         |
| `invalid_variables`                  | The provided variables are invalid.                                                                                                                                         |
| `invalid_device_id`                  | The provided device ID is invalid.                                                                                                                                          |
| `invalid_os_version`                 | The provided OS version is invalid.                                                                                                                                         |
| `invalid_device_model`               | The provided device model is invalid.                                                                                                                                       |
| `invalid_device_platform`            | The provided device platform is invalid.                                                                                                                                    |
| `invalid_ja4_fingerprint`            | The provided JA4 fingerprint is invalid.                                                                                                                                    |
| `invalid_app_version`                | The provided app version is invalid.                                                                                                                                        |
| `invalid_device_type`                | The provided device type is invalid.                                                                                                                                        |
| `invalid_user_agent`                 | The provided user agent is invalid.                                                                                                                                         |
| `malformed_verification_target_type` | The provided verification target type is invalid.                                                                                                                           |
| `missing_api_key`                    | You forgot to include your API key. Add it to the Authorization header using Bearer authentication, like this: `Authorization: Bearer <API_KEY>`.                           |
| `missing_document_filename`          | The document filename is required. Provide a filename in the document object.                                                                                               |
| `not_implemented`                    | The requested feature is not implemented.                                                                                                                                   |
| `premature_retry`                    | This verification was retried too early. You can set the delay between retries from the Dashboard.                                                                          |
| `rate_limited`                       | Rate limit exceeded. Retry the request after the duration specified in the `Retry-After` header. Contact support if you need higher throughput.                             |
| `region_blocked_by_customer`         | This region is blocked for this account. You can change this in the Dashboard from the route settings.                                                                      |
| `region_missing_registration`        | This region needs additional registration. Contact support for information.                                                                                                 |
| `schedule_at_in_past`                | The `schedule_at` parameter is in the past. Provide a future date.                                                                                                          |
| `schedule_at_too_far_in_future`      | The `schedule_at` parameter is too far in the future. Provide a date within the next 90 days.                                                                               |
| `spending_limit_exceeded`            | The spending limit for a time period has been exceeded. You can set the spending limits from the Dashboard. `Retry-After: <seconds>` field will be provided in headers.     |
| `supabase_not_enabled`               | The Supabase integration is not enabled for this account.                                                                                                                   |
| `subscription_config_not_found`      | No subscription configuration was found.                                                                                                                                    |
| `subscription_status_not_found`      | No subscription status was found for the provided phone number.                                                                                                             |
| `suspended_account`                  | Your account is suspended. Contact support for more information.                                                                                                            |
| `template_not_found`                 | The provided template ID was not found.                                                                                                                                     |
| `template_not_registered_in_country` | The provided template is not registered in the requested country.                                                                                                           |
| `template_not_validated`             | The provided template has not been validated. Contact support for more information.                                                                                         |
| `too_many_attempts`                  | You have reached the maximum number of retries for this verification window. You can try again in a few minutes.                                                            |
| `too_many_checks`                    | You have reached the maximum number of checks for this verification window. You can try again in a few minutes.                                                             |
| `trusted_user_signal_not_allowed`    | The is\_trusted\_user signal is not allowed for this account. Contact us to discuss your use case.                                                                          |
| `force_challenge_not_allowed`        | The force\_challenge option is not allowed for this account. Contact us to discuss your use case.                                                                           |
| `unauthorized_sender_id`             | The provided sender ID is not authorized to send messages. Contact support for more information.                                                                            |
| `unsubscribed`                       | The provided phone number is unsubscribed.                                                                                                                                  |
| `unsupported_country`                | Prelude does not support sending messages to the provided country yet. Contact support for more information.                                                                |
| `impossible_code`                    | The provided code is impossible.                                                                                                                                            |

***
