Using a template alias
By default, all templates include an alias. If you wish to reference a template by an alias
instead of its id
, you can set the exact alias that you want to use and then reference that in your API call to send a message with the template. You can set a template's alias in the Falu dashboard or using the Message templates API.
A message template alias must be unique per workspace and mode (live/test) combination to allow you to reference the template just with an alias.
Setting an alias using the Falu dashboard
- Open the template you want to set an alias for.
- While viewing/editing the template, click on the
Alias
input and set the desired value to use when sending messages (e.g.otp_v2
).
Setting an alias using the Message Template API
You can set an alias during the creation of a template using the Create message template API or you can use the Update message template API for existing templates.
A message template alias only allows alphanumeric characters, hyphens (
-
) or underscores (_
). For example,otp-V2
is allowed butotp:V2
orOTP v2
are not allowed.
Using template alias when sending a message
You can use a message template alias when sending a message via the Send a message API or the Send bulk messages API.
For example: