Skip to main content
POST
Send an approved WhatsApp template to a number. Customer and conversation will be created if not

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
phone_number
string | null

Number of WhatsApp user to send template to. Must be in E.164 format. Only required when not using the customer_id field.

Example:

4915224367929

customer_name
string

Name of WhatsApp user. Customer will be created with that name if not already exists.

customer_id
integer | null

If you already have a customer ID, you can directly use it here instead of providing a phone number. This is useful when dealing with WhatsApp customers that have not shared a phone number yet. When you do not have the phone number, you would not be able to send a template to that customer. When customer ID is given, the phone number field is ignored.

agent_id
integer

ID of WhatsApp agent to use for sending the message.

template_name
any

Name of template to send.

template_language
any

Language of template to send.

Example:

"de"

template_components
object[]

Array of objects describing how to fill variables within the specified template. If there are no variables, set this to an empty array. Format is defined by WhatsApp. See components under https://developers.facebook.com/docs/whatsapp/cloud-api/guides/send-message-templates

placeholders
object | null

Optional key-value object with the values for placeholders when used to fill variables from components. Used as is, no delimiters are added. Example: when you call this endpoint and one of your components contains a custom placeholder like $my_custom_placeholder$, you can then fill this object with {"$my_custom_placeholder$": "my value"}.

from_automation
boolean | null
default:false

Indicates if the message was sent by an automation. A "new-agent-message" webhook will be triggered if set to true.

assign_bot_id
integer | null

Optional ID of bot which will be assigned to the conversation. Existing running bot will be stopped and a new one will be started.

assign_user_id
integer | null

Optional ID of user the conversation will be assigned to.

assign_folder_id
integer | null

Optional ID of folder the conversation will be assigned to.

assign_tag_id
integer | null

Optional ID of tag the profile will be assigned to.

assign_group_id
integer | null

Optional ID of tag the profile will be assigned to.

Response

200 - application/json

Success

data
object

A message within a conversation.