Working with Notify templates
Notify templates are pre-approved, AWS-managed message templates for sending OTP and verification messages. Templates are pre-validated across supported countries. You select from available templates but cannot create or modify them.
Template properties
- Template ID
A unique identifier for the template.
- Template type
The use case category. Currently,
CODE_VERIFICATIONis available.- Channels
The channels the template supports:
SMS,VOICE, or both.- Language code
The language of the template content (for example,
en,es,fr).- Supported countries
The countries where this template can be used.
- Tier access
Which tiers can use this template (
BASIC,ADVANCED, or both).- Variables
Placeholders in the template content that you provide values for at send time. Each variable has a name, type, and constraints. Variables with a source of
CUSTOMERmust be provided by you. Variables with a source ofSYSTEMare populated automatically.- Content
The message body with
{{variable}}placeholders.
Browsing templates
Template variables
Template variables are placeholders in the message content that are replaced with values you provide when sending a message. Each variable has the following metadata:
Type – The logical data type:
STRING,INTEGER, orBOOLEAN. All values are passed as strings in the API, regardless of type. For example, pass an integer value as"42"and a boolean as"true".Required – Whether the variable must be provided. Required variables without a default value cause an error if omitted.
Source – Either
CUSTOMER(you provide the value) orSYSTEM(automatically populated).Constraints – Validation rules such as maximum length, minimum/maximum value, or a regex pattern.
Setting a default template
You can set a default template on a Notify configuration. When you send a message without specifying a template ID, the default template is used. If no default template is set and no template ID is provided in the send request, the request fails.
To set or change the default template, see Managing Notify configurations.