Getting started with message templates

Learn about message templates and how to manage them


Using SMS message templates instead of crafting messages from scratch offers tangible benefits that can positively impact your communication strategy. For example, you can save time, maintain consistency, reduce errors, meet compliance requirements, and scale your messaging operations.

Falu Messaging allows you to create custom templates for use in the body of your messages.

Creating a message template

You can create a message template from your Dashboard or through the message_templates API endpoint.

Creating a template through the Dashboard

In your Dashboard under the Messaging menu, navigate to Templates >> Create Template.

images-messages-templates-create-template-dashboard

Fill in the template details in the next window.

  1. Provide an alias, a name or unique string identifier for the template. For more details, check out Using a template alias.
  2. Give the template a Description, for example, its purpose.
  3. Create the Template Body, which will be used in the body of your message. Refer to Template syntax for more details on the syntax of templates and how Falu interprets them.
  4. Preview your template before clicking on the Create Template button.

Creating a template through the API

You can also create a template by making the following POST API call to https://api.falu.io/v1/message_templates:

curl -X POST 'https://api.falu.io/v1/message_templates' \
     -H 'Content-Type: application/json' \
     -H 'X-Falu-Version: 2024-06-01' \
     -u "fskt_1234567890:" \
     --data '{
        "alias": "first-template",
        "description": "My first template",
        "body": " "
     }

Similar to when creating a template through the dashboard, make sure to provide the alias, description, and body parameters.

Viewing your message templates

You can view all previously created message templates associated with your account through your Dashboard or API.

View templates from the Dashboard

You can view all your message templates under the Messaging >> Templates menu.

images-messages-templates-view-templates-dashboard

Clicking on a particular template will reveal more details, including its unique template ID.

View templates through the API

You can also view all your templates by making a GET API call to https://api.falu.io/v1/message_templates:

curl -X GET 'https://api.falu.io/v1/message_templates' \
     -H 'Content-Type: application/json' \
     -H 'X-Falu-Version: 2024-06-01' \
     -u "fskt_1234567890:"

Deleting a message template

You can delete a template that you no longer require. This action can be accomplished through the Dashboard or API.

Deleting a template through the Dashboard

Navigate to view your templates and click on the delete icon under the Actions tab.

images-messages-templates-delete-template-dashboard

Delete a template through the API

Make a DELETE API call to https://api.falu.io/v1/message_templates:

curl -X DELETE 'https://api.falu.io/v1/message_templates/TEMPLATE_ID' \
     -H 'X-Falu-Version: 2024-06-01' \
     -u "fskt_1234567890:"