Rate this page:


Verify Templates are in Beta!

This Verify feature is currently in the Beta maturity stage, which means that:

We're actively looking for early-adopter customers to try it out and give us feedback. That could be you!

Please note that templates are only supported with the SMS channel.

Templates are predefined and approved texts used to send a SMS Verification. Templates allow you to customize the text you send for verification.

Template types include:

Public Available for all Verify customers. More information and a list of public template text options found here.
Private Available on a case by case basis per customer. Please get in touch if one of our public templates does not suit your business need.

An account can have multiple public and private templates associated with it to accomodate various use cases like:

  • user authentication
  • account validation
  • password reset
  • ...and more!

Template translations and supported languages

Verify will automatically resolve a template message body's locale based on phone number country code or fallback to English. Using this automatic resolution is highly recommended. If you still must override locale, use the locale parameter. Learn more about supported languages here.

Template properties

Resource Properties in REST API format
sid<HJ> Not PII

A 34 character string that uniquely identifies a Verification Template.

sid<AC> Not PII

The unique SID identifier of the Account.

string Not PII

A descriptive string that you create to describe a Template.

object Not PII

An object that contains the different translations of the template. Every translation is identified by the language short name and contains its respective information as the approval status, text and created/modified date.

Get a list of available templates

Parameters in REST API format
get string Not PII

String filter used to query templates with a given friendly name

Example 1
        Returns public and private templates for your account

        Get a list of available templates

        Returns public and private templates for your account

        Template priority

        The message template used for an SMS verification is defined with the following priority order:

        1. A TemplateSid provided in the create Verification request.
        2. A DefaultTemplateSid set for the Verify Service.
        3. The Verify API default template text. In English that looks like: Your {Service Friendly Name} verification code is: 511198

        Start a Verification with a specific template

        To send a verification with a specified template, include the TemplateSid (starts with HJ) as a parameter.

        Example 2

              Add a default template to a Verification Service

              You can also define a default message template for a Service that will be used for all SMS verifications (unless you explicitly override it).

              The DefaultTemplateSid attribute of the service can be set both when the Service is created or when the Service is updated.

              Example 3
                    Example 4

                          If neither a TemplateSid is provided when starting a new Verification nor a DefaultTemplateSid attribute is set for the Service, the Verification will use the default translation for that template.

                          More details on how to start a Verification can be found in the Verification documentation.

                          Domain-bound codes

                          Use templates to support SMS domain-bound codes with the WebOTP API. You will need a custom template to support this use case, so reach out for access and our team can set it up.

                          123456 is your Example code.

                          Rate this page:

                          Need some help?

                          We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.


                                Thank you for your feedback!

                                Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                Refer us and get $10 in 3 simple steps!

                                Step 1

                                Get link

                                Get a free personal referral link here

                                Step 2

                                Give $10

                                Your user signs up and upgrade using link

                                Step 3

                                Get $10

                                1,250 free SMSes
                                OR 1,000 free voice mins
                                OR 12,000 chats
                                OR more