Skip to content
Send templates

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.

This page covers the simplest case: a body-only template with text parameters. For richer variants — header media, dynamic URL buttons, Flow buttons, named parameters — see the dedicated pages below.

List templates already approved for your WhatsApp account:

Terminal window
curl https://api.kirimdev.com/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.kirimdev.com/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" }
]
}
]
}
}'

Positional parameters fill the {{1}}, {{2}}, … placeholders in the template body in declaration order.

Templates support three component types. Each takes a parameters array whose shape mirrors Meta’s Cloud API reference verbatim — Kirimdev does not re-shape it.

ComponentPurposeDedicated page
headerMedia or text shown above the bodyHeader media
bodyParameterised text contentThis page
button (per index)Dynamic URL, quick reply, copy codeButtons
button (sub_type: url)OTP / verification code (AUTHENTICATION)OTP
button (sub_type: flow)Trigger a Meta FlowFlow buttons

Parameters can be positional (default) or named — see Named parameters.

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