Skip to main content

Default Message Content

The default verification message sent by Prelude is:
12345 is your verification code.
We provide this template translated into 31 different locales. Prelude automatically detects the phone number’s locale and sends the message in the appropriate language. If the locale isn’t supported, the message defaults to English. You can override the locale by setting options.locale on the POST /v2/verification endpoint. You can read more about locales in our documentation. We strongly recommend starting the message with the code so it remains readable even when truncated (for example, on a watch or with large font sizes). For instance: “12345 is y…”. This layout has been battle-tested against many alternatives to optimize conversion and automated code detection. We’ve also registered this template worldwide to ensure optimal deliverability and minimize the risk of carrier filtering.

Customization Options

Prelude provides a few options to customize the verification message content sent to your users.
These options may not be available on channels other than SMS. Availability depends on the selected .

Brand Suffix

You can add a brand suffix to the verification message in your Dashboard.
12345 is your verification code for Acme Inc.

Best practices:

  1. Avoid setting a brand suffix that includes a link or text that could be interpreted as a link. Carriers may block messages that contain links.
  2. Do not include any special characters such as emojis. Some carriers may block messages that contain special characters, or you might be charged more for the message.
This feature is subject to prior approval. Contact our support team to enable it on your account free of charge.

Security Suffix

You can add a security suffix that reminds users not to share the verification code with anyone.
12345 is your verification code. Do not share it.
This feature is subject to prior approval. Contact our support team to enable it on your account free of charge.

Built-in Templates

For certain use-cases, we provide built-in templates that you can use to send verification messages.

PSD2

The Payment Services Directive 2 (PSD2) is a European regulation that aims to make online payments more secure. The Verify API provides a built-in template for sending verification codes for PSD2 transactions.
{
  "target": {
    "type": "phone_number",
    "value": "+33612345678"
  },
  "options": {
    "template_id": "prelude:psd2",
    "variables": {
      "description": "Fluffy Unicorn",
      "amount": "99999.99",
      "currency": "EUR",
      "recipient": "Rainbow LLC"
    }
  }
}

OTP code length

You can set the verification code length either:
  1. Through your Dashboard.
  2. By setting the options.code_size parameter on the POST /v2/verification endpoint.
The code length can be between 4 and 8 characters.
options.code_size
integer
The length of the verification code sent to your users.

Custom OTP codes

Although Prelude can generate a code for you, you can also generate your own custom OTP. This is useful when:
  1. You use a multi-provider setup where you can attribute which provider converted the user.
  2. You want to integrate Prelude effortlessly with an existing verification flow.
  3. You need to use alphanumeric characters in the code (subject to Prelude’s approval).
This feature is subject to prior approval. Contact our support team to enable it on your account free of charge.
If you just want to use codes of a variable length, you can simply use the options.code_size parameter on the POST /v2/verification endpoint.

How to use custom codes in your verification flow

To use a custom code for your verification flow, set the options.custom_code parameter to the code you want to use on the POST /v2/verification endpoint. The custom code must be a string of 4 to 8 numeric characters.
options.custom_code
string
The custom code you want to use. The code needs to be a string of 4 to 8 numeric characters.
Prelude will then send the message with this custom code to the user.

Caveats

To ensure optimal performance:
  1. Send a different custom code for each verification request or retry.
  2. Always call POST /v2/verification/check to verify the code when the user enters it.
Prelude uses the custom code to identify which provider converted the user. If you reuse the same custom code across multiple verification requests, Prelude will not be able to determine which provider converted the user and will not be able to attribute the conversion to a specific provider, which reduces the effectiveness of routing optimization for your account. You can read more about the multi-routing system here.

Alphanumeric custom codes

Prelude supports alphanumeric custom codes.
This feature is subject to prior approval. Contact our support team to enable it on your account free of charge.

Read more

More information about the various customization options for your verification messages: