Create Template
Checks if a message requires a template (24h window rule) and creates one if necessary.
POST /api/agents/whatsapp/createTemplate
Request Body
{
"phone_number": "+1234567890",
"message": "Hello, your order is ready.",
"site_id": "123e4567-e89b-12d3-a456-426614174000"
}| Parameter | Type | Required | Description |
|---|---|---|---|
phone_number | string | Yes | Recipient’s phone number. |
message | string | Yes | The message content to send. |
site_id | string | Yes | The UUID of the site. |
conversation_id | string | No | UUID of the conversation context. |
message_id | string | No | UUID of the message (for tracking). |
Response
Returns whether a template is required and, if so, the created template ID and status.
- If within 24h window:
template_required: false - If outside 24h window:
template_required: true,template_id: "..."
Last updated on