Skip to main content
POST
Send a template message

Authorizations

Authorization
string
header
required

Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...

Path Parameters

id
string
required

Connected account ID (sapi_acc_...)

Body

application/json

Recipient, template name, language, and components

components
object[]

Components carries header/body/button variable substitutions. Each component matches WhatsApp's template component schema (type + parameters).

language
string

Language is the BCP-47 code matching the template's approved language (e.g. en_US, fr_FR).

Example:

"en_US"

template_name
string

TemplateName is the approved template name to send.

Example:

"order_confirmation"

to
string

To is the recipient phone number in E.164 format without the leading "+".

Example:

"15551234567"

Response

Message accepted by WhatsApp

contacts
object[]

Contacts maps the input phone number to its canonical WhatsApp ID.

message_id
string

MessageID is the SocialAPI message ID for the send, matching the "id" field on the dm.status.* webhooks for this message. Empty when WhatsApp returned no wamid or no canonical wa_id, since an ID built from half the pair would collide across conversations.

Example:

"sapi_dm_TT974YVQH4RAHNN2HY2DJSNY9111D7LMTP1XXPCVQVL"

messages
object[]

Messages contains one entry per delivered message, with its platform ID.

messaging_product
string

MessagingProduct is always "whatsapp".

Example:

"whatsapp"