# Send WhatsApp Template

> Send a pre-approved WhatsApp template message to a customer via the Revora API.

Developers · REST API

Send a pre-approved WhatsApp template message to a customer.

**POST** `/stable/open/whatsapp/send-template-message`

Base URL: `https://api.myalice.ai`. Authenticate every request with the
`X-Myalice-Api-Key` header.

## Body parameters

**`template_id` (string) — required**

The ID of the template. Find it in the Revora dashboard.

**`channel_id` (string) — required**

The ID of the WhatsApp channel. Find it in the Revora dashboard.

**`customer_phone` (string) — required**

Customer phone number with country code, e.g. `+628123456789`.

**`attributes` (object)**

Key–value pairs for the variables in the template body, keyed by position
(e.g. `{ "1": "John Doe" }`).

**`attachment` (object)**

A header media attachment. Provide exactly one of `image`, `audio`, `video`
or `document` as a publicly accessible URL — used only when the template
header is of that media type.

## Example

```bash cURL
curl -X POST "https://api.myalice.ai/stable/open/whatsapp/send-template-message" \
  -H "X-Myalice-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "102323213",
    "channel_id": "1022",
    "customer_phone": "+628123456789",
    "attributes": { "1": "John Doe" }
  }'
```

```json Response
{
  "id": "msg_7f1c…",
  "project_id": 343,
  "timestamp": "2026-07-02T09:30:00Z",
  "function_name": "send_template_message",
  "message": "Template message queued",
  "status": "ongoing",
  "extra": {
    "platform_id": 12570,
    "customer_id": 15157748,
    "customer_phone": "+628123456789",
    "template_id": "102323213",
    "success": true
  }
}
```

## Errors

**`400` (object)**

Unexpected error. Body: `{ "error": string, "code": string, "success": false }`.

**`401` (object)**

Unauthorized — missing or invalid API key. Body: `{ "detail": "Invalid api key provided." }`.

---
HTML: https://userevora.com/docs/developers/rest-api/send-whatsapp-template
