---
title: "Start a conversation with a template"
method: POST
path: "/api/v1/chats/template-conversations"
tags: ["messages"]
---

# Start a conversation with a template

`POST /api/v1/chats/template-conversations`

## 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/template-conversations`
- Auth: HTTP bearer

Adds a contact by international phone number (E.164, leading `+`) and opens the conversation by sending an approved WhatsApp template. An existing contact with the same number is reused. Pass `whatsapp_number_id` when the business has more than one WhatsApp number. The business is taken from the `business-id` header.

## Headers

- `business-id` string, uuid, required

## Request body

- StartTemplateConversationRequest: Add a contact and open the conversation with an approved template. ``phone`` is any international number in E.164 form (leading ``+``). The business line to send from may be omitted only when the business has a single line.
  - `template_id` string, uuid, required
  - `variables` object: Body/button variable values, keyed '1','2',…
  - `phone` string, required: International phone number, E.164 with leading '+'
  - `name` string, nullable
  - `email` string, nullable
  - `whatsapp_number_id` string, uuid, nullable

## Response `201`

Successful Response

- StartTemplateConversationOut: Response for ``POST /chats/template-conversations``.
  - `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
  - `chat_id` string, uuid, required
  - `consumer_id` string, uuid, required

## 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)
