Menu

Expand
Rate this page:

Templates

Verify Templates are in Pilot

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

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

2. You'll need to contact sales to request access to the API.

Lastly, 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

The template message body can be translated to various languages with the locale parameter. Learn more about support languages here.

Template properties

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

A 34 character string that uniquely identifies a Verification Template.

account_sid
sid<AC> Not PII

The unique SID identifier of the Account.

friendly_name
string Not PII

A descriptive string that you create to describe a Template.

translations
object Not PII

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

Get a list of available templates

get
https://verify.twilio.com/v2/Templates
Parameters
Parameters in REST API format
friendly_name
Optional
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.

                          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 Community Forums or browsing the Twilio tag on Stack Overflow.

                                
                                
                                

                                Thank you for your feedback!

                                We are always striving to improve our documentation quality, and your feedback is valuable to us. Please select the reason(s) for your feedback or provide additional information about how we can improve:

                                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