Skip to main content
POST
Send Bulk HSM
Use this function to send templates in bulk to your customers. The API will handle delivery to recipients from a column-based file. Sending templates in bulk allows you to send a predefined template with different values related to each customer, so you can select dynamic information from a source such as a file, to automate and send your campaign easily.

Template guidelines

The source file must be created following these specifications:

File format

Only files with the .CSV extension are supported. The first row of the file must define the column names (header). Follow these rules for the header:
  • Avoid blank spaces in column names.
  • Do not use special characters or punctuation marks (e.g., !, $, %, &, *, etc.).
  • Use only letters, numbers, and underscores (_) if necessary.
Correct: phone_number, customer_name, order_amount Incorrect: phone number, customer-name!, order#amount

First column

The first column must contain the phone numbers of the recipients. It is mandatory to include the international code without the + symbol (for example, for a number in Ecuador, write PHONE_NUMBER).

Remaining columns

The other columns will be used for the dynamic values of the parameters (template personalization).

Example

If your template contains the following content:
The CSV file would be:
The CSV file must be encoded in UTF-8.

Send HSM from file


File upload options

There are two ways to provide the CSV file with recipient information:
  1. Using a public URL: You can provide the URL to the CSV file that is publicly available. In this case, the request body must be in JSON format.
  2. Uploading the file: Alternatively, you can attach the CSV file directly to the request. In this case, the request body must be in multipart/form-data format.

Body parameters


Request examples


Send responses


params structure

Each element in the params array is an object that contains:
  • param: Parameter number in the template (1, 2, 3…).
  • column: Name of the column in the CSV file from which values will be extracted.

buttonPayloads structure

For templates with quick reply buttons that activate workflows:

Authorizations

Authorization
string
header
required

Basic authentication using Base64 encoded clientId:clientSecret

Body

campaignName
string
required
elementName
string
required
botId
string
required
params
object[]
required
type
enum<string>
default:text
Available options:
text,
image,
document,
video
mediaUrl
string<uri>
fileUrl
string<uri>
buttonPayloads
object[]
actions
object
scheduledAt
string<date-time>

Response

Campaign created successfully

message
string[]
status
string