---
title: "Send a WhatsApp template message"
method: POST
path: "/public/v1/whatsapp/send-template"
tags: ["WhatsApp"]
---

# Send a WhatsApp template message

`POST /public/v1/whatsapp/send-template`

## Request

- Base URL: `https://api.gurusup.com`
- URL: `https://api.gurusup.com/public/v1/whatsapp/send-template`
- Auth: API key in header `x-api-key`

Send an approved WhatsApp **template** message to a recipient.

**Authentication** — send your organization API key in the `x-api-key` header.

**Request fields**
- `to` — recipient phone number in international format, **digits only, no `+`, spaces or
  dashes** (e.g. `34622222222`). Required.
- `phone_number_id` — the Meta phone number ID to send from. Must be configured for your
  organization.
- `template_name` — name of an approved template (list them via
  `GET /public/v1/whatsapp/templates/{phone_number_id}`).
- `language_code` — Meta BCP-47 code that matches the template (e.g. `es`, `en_US`).
- `components` — template variables (header / body / buttons). **Required when the template
  has variables**; send the same structure the template defines.
- `text` — message body persisted as the conversation in GuruSup. Required, non-empty.

**Failures** return the envelope `{ "detail": "...", "error_code": "..." }`:
`422` request validation (e.g. blank `to`/`text`), `400` permanent error (fix and resend),
`429` rate limited (retry later), `503` transient WhatsApp/Meta error (safe to retry).

## Request body

- SendTemplateRequestPublic: Request to send a WhatsApp template message
  - `phone_number_id` union, required: Phone number ID from meta
    - string
    - integer
  - `to` union, required: Recipient phone number
    - string
    - integer
  - `template_name` string, required: Name of the approved template
  - `language_code` string, required: Meta BCP 47 language code (e.g. 'es', 'es_MX', 'en_US'). Must match exactly one of the languages returned by /public/v1/whatsapp/templates.
  - `components` object[], nullable: Template components (header, body, buttons)
  - `text` string, required: Message body persisted as the conversation in GuruSup. Required and non-empty.
  - `integration_metadata` object, nullable: Integration metadata
  - `origin` 'intentional' | 'automated' | 'proactive_followup'

## Response `200`

Template accepted by WhatsApp.

- unknown

## Other responses

- `400`: Permanent send failure — fix the request (unknown template, bad components, language mismatch).
- `422`: Request body validation failed (e.g. blank `to` or `text`).
- `429`: Rate limited by Meta — retry later.
- `503`: Transient WhatsApp/Meta error or temporary outage — safe to retry.

---

[API](https://skmtc.dev/gurusup/apis/gurusup-api.md) · [All operations](https://skmtc.dev/gurusup/apis/gurusup-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gurusup/apis/gurusup-api/revisions/8b3c86d4bf1e?raw)
