---
title: "Send a template message"
method: POST
path: "/api/public/whatsapp/message/send/{phone}/template/{templateId}"
tags: ["WhatsApp Message"]
---

# Send a template message

`POST /api/public/whatsapp/message/send/{phone}/template/{templateId}`

Send a specific template message to a given phone number. Optionally group sends into a campaign by passing a "campaign" object ({ id, name? }): the id is your own campaign identifier and every message sent with the same id is attributed to the same campaign (created automatically on first use; name updates use last-write-wins).

## Path parameters

- `templateId` string, required
- `phone` string, required

## Query parameters

- `from-phone-number` string

## Headers

- `x-api-key` string, required

## Request body

- SendTemplateDto
  - `contactName` string
  - `email` string, email — Email of the contact
  - `variables` string[], required
  - `meta_data` object
  - `stageId` string
  - `autoAssign` boolean — Whether the sender should be auto-assigned to the contact
  - `toPhoneNumber` string
  - `agent_id` string, uuid — Agent ID to assign to the contact
  - `carouselVariables` object[] — Variables for carousel cards
    - `cardIndex` integer, required
    - `headerVariable` string, required
    - `bodyVariables` string[]
    - `buttonVariables` string[]
  - `campaign` object — Groups this send under a campaign. The id is your own identifier and is the campaign identity; name and intent are idempotent metadata that can be sent on every request or only once.
    - `id` string, required — Your own campaign identifier. It is the campaign identity: every message sent with the same id is grouped under the same campaign, across requests and days (get-or-create).
    - `name` string — Display name of the campaign. Sending it repeatedly is harmless; if it differs from the stored name, the stored name is updated (last write wins).
    - `intent` string — Campaign intent. Ideally one of the known values (OTP, promotion, sales_followup, lead_outreach, appointment_confirmation, feedback_request, invitation, reactivation, other), but any custom string is accepted. If omitted, Vambe infers it automatically from the template with AI.

## Response `201`

Message sent successfully.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized.

---

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