Text Message Template

The Text Message Template is the simplest but most widely used WhatsApp template type supported via SFTP. It is designed to deliver pre-approved, text-only messages to customers while maintaining strict compliance with WhatsApp’s policies. This format ensures that outbound WhatsApp communication is consistent, scalable, and capable of personalization through placeholders.

By uploading JSON files referencing a valid Text Message Template, organizations can automate WhatsApp notifications, alerts, and campaigns without direct interaction with the API or the platform interface. The SFTP service automatically validates the uploaded JSON against the approved template structure, replacing placeholders with dynamic values provided for each recipient.

Key features of Text Message Templates

  1. Template Body Only
    • Contains plain text without media components.
    • May include one or more placeholders ({{PlaceholderName}}, {{PlaceholderName}}, etc.) for personalization.
  2. Pre-approval Required
    • Templates must be created and approved in the Digital Engagement Platform or via the WhatsApp Business API before use.
    • The JSON must reference the template by its exact "templateName" and "templateLanguage".
    • You can not edit the template content in the request body because WhatsApp has approved the values of each parameter. You are only able to edit the value for placeholders in the body ("message").
  3. Dynamic Personalization
    • Placeholders in the template body can be replaced with recipient-specific values at runtime.
    • This allows a single approved template to serve thousands of personalized messages.
    • The personalized fields (placeholders) you set when creating the WhatsApp Text Message Template for each component are editable when you send the template.
    • Make sure these are examples and do not include any confidential or personal information.
    • Once the template is approved and ready to be sent, replace the placeholders included in the template with the actual (real) placeholder values.
  4. High-volume Automation
    • Particularly suited for enterprises managing bulk campaigns such as reminders, account updates, or promotional alerts.
    • By leveraging SFTP, organizations can integrate WhatsApp messaging into internal workflows without manual broadcast creation.

Sending WhatsApp Text Message Template

When sending Text Message Template via SFTP, the platform requires that files be uploaded in JSON format to the /whatsapp directory.

Let’s assume you have an approved WhatsApp Text Message Template with the following message body:

  • Hi {{name}}, your appointment is scheduled for tomorrow at {{time}}.

This template contains two placeholders in the message body:

  • {{name}} → the recipient’s name.
  • {{time}} → the appointment time.

As an example, we will send this text message template, which contains a body with two personalized fields (placeholders), by specifying the following parameters in the request body:

{
  "campaignName": "Appointment Reminder",
  "from": "580000000000",
  "message": "{{name}}, {{time}}",
  "template": {
    "templateName": "appointment_reminder",
    "templateLanguage": "en"
  },
  "placeholders": [
    "name",
    "time"
  ],
  "data": [
    {
      "to": "+581111111111",
      "placeholders": {
        "name": "Jorge",
        "time": "10:00 AM"
      }
    },
    {
      "to": "+582222222222",
      "placeholders": {
        "name": "Pablo",
        "time": "2:30 PM"
      }
    }
  ]
}

The parameters presented in the request body example when sending the WhatsApp Text Message Template are the following:

Parameter Required Description
campaignName Yes

Name of the campaign.

from Yes

Phone number of the sender.

Phone number provided during the WABA account setup will be used as the sender of the notification message.

Only accepts numeric characters. Do not include the "+" sign.

message No

It is required when the message body contains placeholders.

Enter the personalized fields (placeholders) included in the message body.

Must include the placeholders exactly as they were defined in the template creation process and in the same order.

If the message body does not contain placeholders, the "message" parameter must not be included in the request body.

Placeholders must be defined using the format {{PlaceholderName}}.

template Yes

Defines the WhatsApp template that will be used to send the message.

template.templateName Yes

Name of the template created in your WhatsApp Business Account.

template.templateLanguage Yes

Template Language you set when creating the template.

Currently the API supports 3 Languages: English, Spanish and Portuguese. Required if you want to send templates in languages other than English.

English: "en"

Spanish: "es"

Portuguese: "pt_BR", "pt_PT"

placeholders No

It is required when the body contains placeholders.

Array listing all placeholders defined in the message body

data Yes

Array that contains the recipients, each defined by their phone number in E.164 format, and provide the corresponding placeholder values.

data.to Yes

Destination address of the message. This is the cell phone number where you want to send your message to.

The destination address must be specified in E.164 format → (‘+’ and a country code). The plus sign prefix of the format is optional.

data.placeholders No

It is required when the body contains placeholders.

Set as parameter the placeholder you configured that is inside double curly braces {{...}} when creating the template. Then set the value of the placeholder parameter.

The placeholders must be correctly formatted in order of how the message was created.

For example, for a text message body like “Here is your {{code}}”, you would set the placeholder as "code": "34871".