Send Bulk HSM
Campaigns
Bulk Send
Send templates in bulk to multiple recipients and check the status of your campaigns
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.Documentation Index
Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt
Use this file to discover all available pages before exploring further.
Template guidelines
The source file must be created following these specifications:File format
Only files with the.CSV extension are supported.
Header
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.
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:| phone_number | param_1 | param_2 | param_3 |
|---|---|---|---|
| PHONE_NUMBER | A12345 | $250.00 | December 1 |
| PHONE_NUMBER_2 | B67890 | $100.50 | December 2 |
| PHONE_NUMBER_3 | C22345 | $50.00 | December 3 |
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:- 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.
-
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-dataformat.
Body parameters
| Property | Type | Description | Required |
|---|---|---|---|
| campaignName | string | Name assigned to the campaign being sent. | Yes |
| elementName | string | Template name. Must have approved status by WhatsApp. | Yes |
| botId | string | Unique identifier of the bot sending the template. | Yes |
| params | array | Array of objects with the parameter number and the corresponding CSV column. If the template has no parameters, the array must be empty. | Yes |
| type | string | Template type: text, image, document, video. Defaults to text. | No |
| mediaUrl | string | Public URL of the media file. Required for image, video, or document templates. | Conditional |
| fileUrl | string | Public URL of the CSV file. Required if the file is not uploaded directly. | Conditional |
| file | file | Attached CSV file. Required if fileUrl is not used. | Conditional |
| buttonPayloads | array | Array of objects for quick reply buttons with workflows. | No |
| actions | object | Actions related to the template. | No |
| scheduledAt | date | Date and time in UTC when the campaign will be sent. | No |
Request examples
Send from public URL (JSON)
Send from public URL (JSON)
Send with attached file (multipart/form-data)
Send with attached file (multipart/form-data)
Send responses
200 - Successful response
200 - Successful response
400 - Bad Request
400 - Bad Request
401 - Unauthorized
401 - Unauthorized
422 - Unprocessable Entity
422 - Unprocessable Entity
params structure
Each element in theparams 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
Basic authentication using Base64 encoded clientId:clientSecret