---
title: "Send a template message to a chat"
method: POST
path: "/api/v1/chats/{chat_id}/messages/template"
tags: ["messages"]
---

# Send a template message to a chat

`POST /api/v1/chats/{chat_id}/messages/template`

## Request

- Base URL: `https://api.izap.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.izap.ai/api/v1/chats/{chat_id}/messages/template`
- Auth: HTTP bearer

Sends an approved WhatsApp template into the conversation. This is the only way to reach a customer outside the 24-hour customer-service window. A rendered copy is stored so agents see what was sent.

## Path parameters

- `chat_id` string, uuid, required

## Request body

- ChatTemplateSendRequest: Send an approved template into an existing live-chat conversation.
  - `template_id` string, uuid, required
  - `variables` object: Body/button variable values, keyed '1','2',…

## Response `200`

Successful Response

- SendChatTemplateMessageOut: Response for ``POST /chats/{chat_id}/messages/template``.
  - `user_message` ChatMessageSummaryOut, required: A chat message as embedded in the send-message responses below.
    - `id` string, uuid, required
    - `content` string, nullable, required
    - `no_reply` boolean, required
    - `timestamp` string, date-time, required
    - `status` 'new' | 'queued' | 'sending' | 'sent' | 'failed' | 'delivered' | 'undelivered' | 'receiving' | 'received' | 'accepted' | 'scheduled' | 'read' | 'played' | 'cancelled', required
    - `error_code` integer, nullable, required
    - `error_reason` string, nullable, required
    - `message_sid` string, nullable
    - `receiver` string, nullable
    - `updated_at` string, date-time, nullable
    - `sender_user_id` string, uuid, nullable, required
    - `client_message_id` string, uuid, nullable

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The credential is valid but not authorized for this action.
- `404`: The resource, or the business named in the request, does not exist.
- `422`: Validation Error
- `default`: Unexpected error.

---

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