Skip to main content
POST
Send Individual HSM
The WhatsApp API allows companies to automate and personalize communication with their customers, enabling efficient, scalable interactions enriched with multimedia content. It is ideal for managing inquiries, sending notifications, and providing immediate responses through AI Agents.

Message sending configuration

Step 1: Define the Endpoint

To send messages, use the following API endpoint:

Step 2: Request Parameters

The key parameters for the request include:
  • Text: The message content.
  • Message type (type): Defines the type of template to be sent.
  • Template property: Template previously created and approved by META.
  • Media file: If the template requires a URL (image, document, etc.).
  • Bot ID: Unique bot identifier.
  • Parameters: Specific data for each send (name, order number, etc.).

Step 3: Send the request

Send the message using the POST method. Upon completing the send, you will receive a response that allows you to verify the delivery status.
Make sure to comply with WhatsApp policies to avoid restrictions.

Content restrictions

Remember that, to send messages through WhatsApp, you must use templates previously approved by META. Each template has specific limitations based on its format and content, such as message length or the type of information allowed. Make sure to review these restrictions before using them to ensure correct delivery. Keep in mind that:
  • URLs, emojis, and multimedia files are not allowed within authentication messages.
  • Parameters must have a maximum of 15 characters.

Request Body


Template types

In this section, we share request examples for the different template types. These examples provide a clear guide so you can easily substitute the values with your own data.
If a template name or a button within the JSON differs from the already approved template, even by an accent mark, the send will fail. Precision is key to ensuring functionality.

Common use cases

1. Personalized messages

Use templates with variables to send messages tailored to each user’s needs (for example, payment reminders or order updates).

2. Automation with Webhooks

Personalized interactions based on user responses, allowing for a more dynamic and efficient conversation. Campaign examples:
  • Personalized promotions: Exclusive offers based on customer preferences.
  • Payment reminders: Automatic notifications for invoice due dates.
  • Service quotes: Quick inquiries about insurance, loans, etc.

Advanced configuration

Phone number

Since this is an individual send, the phone number of the recipient must be in the correct format for the send to be successful. The + sign must be omitted, the country code must be included, and only numeric characters are allowed. Dashes or spaces are not accepted.
For users in Ecuador: The ”+” sign and the first 0 of the phone number must be omitted for it to be entered correctly.

Specific parameters

Depending on the campaign, you can use personalized data such as the message type or additional customer information.

Sending to recipients identified by BSUID

In addition to a phone number, destinations accepts a BSUID (Business-Scoped User ID): an identifier with the format CC.alphanumeric (e.g.: US.13491208655302741918) that Meta assigns when a user enables number privacy in WhatsApp, replacing their real phone number. If you already know a user’s BSUID —for example, because you received it in an incoming webhook—, you can use it directly to send them a template without needing their phone number.
BSUID cannot be used to send AUTHENTICATION (OTP) templates; that recipient must be sent as a phone number. If you send a BSUID for an AUTHENTICATION template, that specific recipient is skipped from the send —the rest of the batch continues normally— and if every recipient in the request fails resolution, the response is an empty array [].

Message personalization

Linking with Workflows

Each message can be associated with a specific workflow that defines how the user’s response should be handled. This is useful for creating more complex and targeted interactions, such as interactive menus or surveys.

Button configuration

You can use the following structure in the buttonPayloads field when your template includes quick reply buttons using workflows; this will allow you to activate additional flows within the conversation based on the action selected by the user.
In this case, each button must have the keys type, action, and skillId. The action key defines the text that will appear on the button, while skillId indicates the ID of the workflow that the button will activate.
To get the skillId of a workflow, hover over the workflow name in Brain Studio. A tooltip will appear showing the corresponding ID.
Redirect users to specific workflows based on their choice or interaction.Templates allow the following configurations:
To get the skillId of the workflow, hover over the workflow name in Brain Studio. A tooltip will appear showing the corresponding ID.

Cache Parameters

This function is used to save additional information in the cache for later use. It will depend on the desired configuration for the template. If a URL is sent, it can be used by a workflow to redirect that URL for marketing purposes. All parameters to be stored in cache must go in setMemoryParams with their respective key-value fields.
This configuration will be valid for 3 months.

API Responses


To facilitate testing and sending requests, we recommend using tools such as:
  • Postman
  • Insomnia
These tools allow you to make HTTP requests easily, test different configurations, and review API responses.

Frequently asked questions

There is currently no defined character limit per message; however, you should be mindful of the size of files that are part of the message, such as: image, video, or document. These are shared via mediaUrl.At Jelou, we have the following size and format limitations to follow:
  • DOCUMENT: Up to 15MB - Format: .pdf
  • VIDEO: Up to 15MB - Format: .mp4
  • IMAGE: Up to 5MB - Formats: .jpg, .jpeg, .png
Both the bulk and 1-1 send cURLs can be consumed in any HTTPS client such as Insomnia or Postman. Simply create an HTTPS request using the cURL (just paste it), then change the data and execute.Here is an example with basic-auth:

Authorizations

Authorization
string
header
required

Basic authentication using Base64 encoded clientId:clientSecret

Path Parameters

botId
string
required

The unique identifier of the bot

Body

application/json
elementName
string
required

Approved template name

destinations
string[]
required

Recipients: phone numbers with country code and no + sign, or BSUIDs (Business-Scoped User IDs)

mediaUrl
string<uri>

Public URL for media (required for image/video/document templates)

filename
string

Filename for document templates

type
enum<string>
default:text
Available options:
text,
hsm,
image,
document,
video,
catalog,
carousel
language
enum<string>
Available options:
en,
es,
pt
parameters
string[]

Template parameter values

buttonPayloads
object[]
actions
object
headerParameters
string[]
Maximum array length: 1
buttonParameters
object[]
ltoParams
object
cards
object[]
expirationTime
string

Expiration timestamp in milliseconds

campaignId
string

Response

HSM sent successfully

id
string
destination
string