---
title: "TemplateMessage"
description: "An approved WhatsApp template. Can be sent at any time, no active chat window needed."
---

> Documentation Index
> Fetch the complete documentation index at: https://zacx.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Zacx Public API

An approved WhatsApp template. Can be sent at any time, no active chat window needed.

## Fields

- `TemplateMessage.wabaNumber` (string, required) — Your WhatsApp API number to send from, with country code.
  - example `"919705182126"`
- `TemplateMessage.recipient` (object, required)
  - `TemplateMessage.recipient.phoneNumber` (string, required) — The contact's phone number, with country code.
    - example `"919999999999"`
  - `TemplateMessage.recipient.name` (string, optional) — Optional display name, saved to the contact if it is new.
    - example `"Raj S"`
  - `TemplateMessage.recipient.email` (string, optional) — Optional email, saved to the contact if it is new.
    - format `email`
- `TemplateMessage.type` (unknown, required)
- `TemplateMessage.template` (object, required)
  - `TemplateMessage.template.name` (string, required) — The template name as approved in your workspace.
    - example `"confirmation"`
  - `TemplateMessage.template.language` (string, required) — Template language code.
    - example `"en"`
  - `TemplateMessage.template.header` (object, optional) — Only for templates whose header is not **None**. Pass `text` for a text header, `url` for an image, video, or document header, and `filename` for document headers.
    - `TemplateMessage.template.header.text` (string, optional) — Header text. Text-header templates only.
      - example `"Welcome"`
    - `TemplateMessage.template.header.url` (string, optional) — Public URL of the image, video, or document.
      - format `uri`; example `"https://example.com/header.jpg"`
    - `TemplateMessage.template.header.filename` (string, optional) — File name shown to the contact. Document-header templates only.
      - example `"invoice.pdf"`
  - `TemplateMessage.template.body` (array<string>, optional) — Values for the body variables `{{1}}`, `{{2}}`, … in order. Omit when the template has no variables.
    - example `["John","Premium Plan"]`
  - `TemplateMessage.template.buttons` (array<string>, optional) — Values for button variables, in button order. Only for templates with a dynamic button such as a **Visit website** URL.
    - example `["button1_param"]`


Source: https://zacx.io/api/schemas/TemplateMessage/index.md
