Skip to content
Sending & receiving

Send templates

Templates are pre-approved message structures you use to start a conversation, send transactional notifications, or re-engage past customers — anything outside the 24-hour customer service window.

List templates already approved for your WhatsApp account:

Terminal window
curl https://api.kirim.chat/v1/$PHONE_ID/templates \
-H "Authorization: Bearer $KIRIM_KEY"

Each template returns its name, language, status (approved / pending / rejected), and the parameterised body.

Terminal window
curl -X POST \
https://api.kirim.chat/v1/$PHONE_ID/messages \
-H "Authorization: Bearer $KIRIM_KEY" \
-H "Content-Type: application/json" \
-d '{
"messaging_product": "whatsapp",
"to": "+628123456789",
"type": "template",
"template": {
"name": "order_shipped",
"language": "id",
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Andi" },
{ "type": "text", "text": "INV-4521" }
]
}
]
}
}'

Templates support header, body, and button components. Each takes a parameters array whose shape mirrors Meta’s Cloud API reference verbatim — Kirim does not re-shape it:

ComponentParameter types
headertext, image, video, document (one per template)
bodytext (positional — fill {{1}}, {{2}} in order)
button (per index)text (quick reply), payload (URL / copy code)

Meta accepts language as either a bare string code ("id", "en_US") or an object { code, policy? }. Kirim accepts both — prefer the string form since policy was deprecated by Meta.