WA Client
POST

Send Meta Template

Sends an official Meta-approved template. Components must match the template definition (body variables, dynamic URL buttons, media headers). Use this to message customers outside the 24-hour window.

API endpoint
https://waclient.com/api/send_meta_template
Utility — hello_world (no variables)
curl -X POST \
  'https://waclient.com/api/send_meta_template' \
  -H 'Content-Type: application/json' \
  --data '{
    "number": "20100981XXXX",
    "template_name": "hello_world",
    "language_code": "en_US",
    "components": [],
    "instance_id": "META68B6ED90CXXXX",
    "access_token": "EMCUH3NQQK8YXXXX"
}'
Response
{
    "status": "success",
    "message": "Success",
    "message_payload": {
        "messaging_product": "whatsapp",
        "contacts": [
            {
                "input": "20100981XXXX",
                "wa_id": "20100981XXXX"
            }
        ],
        "messages": [
            {
                "id": "wamid.HBgMMjAxMDA5ODEwMDAwFQIAERgSMDAwMDAwMDAwMDAwMDAwAA==",
                "message_status": "accepted"
            }
        ]
    }
}
AUTHENTICATION / OTP — body + URL button
curl -X POST \
  'https://waclient.com/api/send_meta_template' \
  -H 'Content-Type: application/json' \
  --data '{
    "number": "20100981XXXX",
    "template_name": "otp",
    "language_code": "en",
    "components": [
        {
            "type": "body",
            "parameters": [
                {
                    "type": "text",
                    "text": "123456"
                }
            ]
        },
        {
            "type": "button",
            "sub_type": "url",
            "index": "0",
            "parameters": [
                {
                    "type": "text",
                    "text": "123456"
                }
            ]
        }
    ],
    "instance_id": "META68B6ED90CXXXX",
    "access_token": "EMCUH3NQQK8YXXXX"
}'
Document header — public HTTPS link required
curl -X POST \
  'https://waclient.com/api/send_meta_template' \
  -H 'Content-Type: application/json' \
  --data '{
    "number": "20100981XXXX",
    "template_name": "invoice_with_pdf",
    "language_code": "en_US",
    "components": [
        {
            "type": "header",
            "parameters": [
                {
                    "type": "document",
                    "document": {
                        "link": "https://example.com/invoice.pdf",
                        "filename": "invoice.pdf"
                    }
                }
            ]
        },
        {
            "type": "body",
            "parameters": [
                {
                    "type": "text",
                    "text": "Alex"
                },
                {
                    "type": "text",
                    "text": "INV-9001"
                },
                {
                    "type": "text",
                    "text": "#ORD-2041"
                },
                {
                    "type": "text",
                    "text": "EGP 1,250.00"
                },
                {
                    "type": "text",
                    "text": "Jul 20, 2026"
                },
                {
                    "type": "text",
                    "text": "Bank transfer"
                }
            ]
        },
        {
            "type": "button",
            "sub_type": "url",
            "index": "0",
            "parameters": [
                {
                    "type": "text",
                    "text": "9001"
                }
            ]
        }
    ],
    "instance_id": "META68B6ED90CXXXX",
    "access_token": "EMCUH3NQQK8YXXXX"
}'
ParameterDescription
numberRecipient phone number with country code (e.g. 20100981XXXX)
chat_idAlternative to number — plain number or WhatsApp JID (Optional)
template_nameTemplate name registered in Meta
language_codeTemplate locale, e.g. en_US or en. Must match the approved language. (Optional)
componentsArray of send components. Alias: template_params
instance_idMeta Cloud instance ID
access_tokenYour access token

OTP tip — Body and URL button parameters must be the OTP code only (e.g. 123456). Do not paste Meta's full example URL into the button parameter — that returns (#100) Invalid parameter.

Media headers — Use a publicly reachable HTTPS link for DOCUMENT / IMAGE / VIDEO. Meta CDN example links (scontent.whatsapp.net) are not valid for sending; Graph may return accepted while the message never delivers.

On token errors the response includes relogin: true and connection_state: token_invalid.

Command Palette

Search documentation endpoints.

Esc