Skip to main content
POST
/
platforms
/
whatsapp
/
accounts
/
{id}
/
send-template
Send a template message
curl --request POST \
  --url https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/send-template \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "components": [
    {
      "parameters": [
        {
          "text": "John",
          "type": "text"
        }
      ],
      "type": "body"
    }
  ],
  "language": "en_US",
  "template_name": "order_confirmation",
  "to": "15551234567"
}
'
{
  "contacts": [
    {
      "input": "15551234567",
      "wa_id": "15551234567"
    }
  ],
  "messages": [
    {
      "id": "wamid.HBgLMTU1NTEyMzQ1NjcVAgARGBI...",
      "message_status": "accepted"
    }
  ],
  "messaging_product": "whatsapp"
}

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.

messages
object[]

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

messaging_product
string

MessagingProduct is always "whatsapp".

Example:

"whatsapp"