# Create a WhatsApp template

Submit a new WhatsApp message template for Meta approval. The template is validated locally and forwarded to Meta's template review process. Approval typically takes minutes but can take up to 24 hours.
Supports 11 template types — see the request examples for each type. The response includes the template ID and initial status (`pending`).
**Marketing templates (Cloud API):** If your template category is `MARKETING`, you should include a quick-reply opt-out button (e.g. "Stop promotions") as part of your template components. This is a Meta policy requirement — marketing templates without an opt-out mechanism risk rejection and can negatively impact your number's quality rating and messaging limits. Including an opt-out button reduces your block rate, which is the primary factor Meta uses to assess number quality.
**WhatsApp Lite:** Only text and media template types are supported. Interactive components (call-to-action buttons, carousel, authentication, flow) are not available on WhatsApp Lite.

Endpoint: POST /whatsapp-api-service/whatsAppTemplates/createTemplate
Version: 3.0.0
Security: apikeyAuth

## Security:

  - `apikeyAuth` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `template_name` (string, required)
    Example: seasonal_promo_2024

  - `language` (string, required)
    Example: en_GB

  - `category` (string, required)
    Enum: "AUTHENTICATION", "MARKETING", "UTILITY"

  - `number` (string, required)
    Example: +987654321

  - `allow_category_change` (boolean)
    Example: false

  - `components` (array, required)

  - `components.type` (string, required)
    Enum: "HEADER"

  - `components.format` (string, required)
    Enum: "TEXT", "IMAGE", "DOCUMENT", "VIDEO", "LOCATION"

  - `components.text` (string)
    Example: Order Confirmation {{1}}

  - `components.example` (object)

  - `components.example.header_text` (array)

  - `components.example.header_handle` (array)

  - `components.type` (string, required)
    Enum: "BODY"

  - `components.add_security_recommendation` (boolean)
    Example: false

  - `components.type` (string, required)
    Enum: "BUTTONS"

  - `components.buttons` (array, required)

  - `components.buttons.type` (string, required)
    The button type. Note two special cases:
- `COPY_CODE`
 — a
**coupon-code**
 button for MARKETING and UTILITY templates. The sample

code is supplied in
`example`
 at creation; the real code is sent as the button parameter.

This is distinct from an authentication one-time-passcode button, which is
`type: OTP`

with
`otp_type: COPY_CODE`
.
- `REQUEST_CONTACT_INFO`
 — a fixed-label button that asks the customer to share their phone

number (used to recover a number from a username/BSUID-only contact). Takes no
`text`
 and

no send parameter. Not permitted on AUTHENTICATION templates.
    Enum: "QUICK_REPLY", "URL", "PHONE_NUMBER", "OTP", "FLOW", "SPM", "COPY_CODE", "REQUEST_CONTACT_INFO"

  - `components.buttons.text` (string)
    Example: Visit Website

  - `components.buttons.url` (string)
    Example: https://example.com/offer/{{1}}

  - `components.buttons.phone_number` (string)
    Example: +27123456789

  - `components.buttons.otp_type` (string)
    Example: COPY_CODE

  - `components.buttons.autofill_text` (string)
    Example: Autofill

  - `components.buttons.package_name` (string)
    Example: com.example.myapp

  - `components.buttons.signature_hash` (string)
    Example: K8a72FAINcG

  - `components.buttons.flow_id` (string)
    Example: flow_abc123

  - `components.buttons.flow_action` (string)
    Example: navigate

  - `components.buttons.navigate_screen` (string)
    Example: WELCOME_SCREEN

  - `components.buttons.example` (array)

  - `components.type` (string, required)
    Enum: "CAROUSEL"

  - `components.cards` (array, required)

  - `components.cards.components` (array)

  - `components.type` (string, required)
    Enum: "FOOTER"

  - `components.code_expiration_minutes` (integer)
    Example: 5

  - `components.type` (string, required)
    Enum: "CALL_PERMISSION_REQUEST"

## Request examples:

  - `Text-only template` (unknown)

  - `Media header template` (unknown)

  - `Text header template` (unknown)

  - `Quick-reply buttons template (a call-to-action variant)` (unknown)

  - `Carousel template` (unknown)

  - `Auth copy code` (unknown)

  - `Auth one-tap` (unknown)

  - `WhatsApp Flow` (unknown)

  - `Static URL button` (unknown)

  - `Dynamic URL button` (unknown)

  - `Phone number button` (unknown)

  - `Coupon code button` (unknown)
    A `COPY_CODE` button that shares a promo code the customer can copy. Supported on MARKETING and
UTILITY templates. `example` carries a sample code for approval; the real code is supplied as
the button parameter at send time (see send example `15. Coupon Code`).

  - `Request contact info button` (unknown)
    A `REQUEST_CONTACT_INFO` button that asks a username (BSUID-only) customer to share their phone
number. The label is fixed by WhatsApp and cannot be customised, so no `text` is sent. Allowed
on MARKETING and UTILITY templates. The shared number arrives on the inbound webhook as a `contacts` message.

  - `Call permission request` (unknown)
    A `CALL_PERMISSION_REQUEST` component that asks the customer to allow your business to call them on
WhatsApp. WhatsApp adds its own "allow calls" prompt to the message, so the component carries only its
`type`. Allowed once per template, on MARKETING and UTILITY templates, and not on carousel templates.

  - `Mixed buttons (QR + static URL + phone)` (unknown)
    A single BUTTONS component combining quick-reply, URL, and phone-number
buttons. At send time these are emitted as one `button` message component
whose `parameters` array is positional in this template order — see send
example #10 (`CTA — Mixed Buttons`).

## Response 202:

  - `202` (unknown)
    Template submitted

## Response 202 fields (application/json):

  - `template_id` (string)
    Example: 1234567890123456

  - `template_name` (string)
    Example: seasonal_promo_2024

  - `status` (string)
    Example: APPROVED

  - `category` (string)
    Example: MARKETING

  - `language` (string)
    Example: en_GB

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `status` (string)
    Example: ERROR

  - `message` (string)
    Example: Invalid Parameters

  - `requestId` (string)
    Example: c3a1f8e2-4b6d-11ee-be56-0242ac120002

  - `timestamp` (string)
    Example: 2026-01-15T10:30:00Z

## Response 401:

  - `401` (unknown)
    Authentication failed — the API key sent in the `Authorization` header is missing,
invalid, or has been revoked.
**Verify your API key before changing anything else.** Check the key currently active
on your account either in the eCommunicate web UI (API key settings), or by calling
`POST /payless4messaging-service/WhatsApp/authenticate/retrieveApiKey` with your
account credentials — that endpoint needs no existing key, so it works while every
other call is returning `401`. Compare the result with the value your integration is
sending: pass the key on its own (no `Bearer` prefix), trimmed of whitespace, as a
36-character UUID.
Do not retry a `401` — it will fail identically until the key is corrected. See the
[Authentication guide](/guides/authentication#troubleshooting-a-401).

## Response 401 fields (application/json):

  - `status` (string)
    Example: ERROR

  - `message` (string)
    Example: Unauthorized user

  - `requestId` (string)
    Example: c3a1f8e2-4b6d-11ee-be56-0242ac120002

  - `timestamp` (string)
    Example: 2026-01-15T10:30:00Z

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `status` (string)
    Example: ERROR

  - `message` (string)
    Example: Forbidden

  - `requestId` (string)
    Example: c3a1f8e2-4b6d-11ee-be56-0242ac120002

  - `timestamp` (string)
    Example: 2026-01-15T10:30:00Z

