Use templates when you need to reach out first — order updates, OTP codes, appointment reminders — especially outside the 24-hour reply window. Each template is pre-approved by Meta. A template send needs more than name and language. Pass components that match how the template was built: body variables, optional header image or text, and button URL parameters when the template defines them.

Before you send

1

Create and approve the template

Create the template in the Wazapin app or sync from Meta on official channels. Status must be approved.GET /v1/templates lists templates for your workspace. See Channel support for official vs unofficial behavior.
2

Read the template structure

Open the template in the app and note:
  • Header — none, text ({{1}}), image, video, or document
  • Body — static text with {{1}}, {{2}}, … placeholders
  • Buttons — quick reply, URL (may include {{1}} in the link), copy code, etc.
Your components array must mirror these sections in order.
3

Build the components array

Each section becomes one object in content.template.components:Omit a section if the template has no variables in that part.

Request shape

All template sends use POST /v1/messages with type: "template" and a nested content.template object (Meta-compatible shape).
Do not use a flat shape like content.template_name at the top level — the API requires content.template.name and content.template.language.code.

Example: body variables only

Template body: Hi {{1}}, your order {{2}} is on the way.

Example: header image + body

Template with an image header and one body variable.

Example: header text variable

Template header text: Hello {{1}} — the header component lives inside content.template.components.

Example: dynamic URL button

Template with a URL button containing {{1}} in the path — button component nested in the same components array.
index is the zero-based button index in the template definition. sub_type matches the button type Meta approved (url, quick_reply, copy_code, etc.). List and sync templates with wazapin.templates.list() and wazapin.templates.sync(). See SDK templates (advanced).

Common mistakes

Endpoint

POST https://api.wazapin.com/v1/messages Authenticate with X-Api-Key. See Authentication.

Response

On success, the API returns 201 Created with a message record (status often starts as queued).
201 Created
Track delivery with Webhooks or GET /v1/messages/.