Send WhatsApp
Send a WhatsApp message to a phone number. Required: phone_number (international format e.g. +1234567890), message. Optional: from (sender name), lead_id, conversation_id for tracking. If the response indicates template_required: true (outside 24h reply window), use the whatsappTemplate tool with action create_template then send_template to deliver the message.
Input Schema
| Parameter | Type | Description |
|---|---|---|
| phone_number | string | Recipient phone in international format (e.g. +1234567890, no spaces) |
| message | string | Message text to send |
| from | string | Sender display name |
| lead_id | string | Lead UUID for tracking |
| conversation_id | string | Conversation UUID (used for 24h window check) |
| agent_id | string | Agent UUID for tracking |
| responseWindowEnabled | boolean | If true, skip template check and send as within 24h window |
REST Endpoint
POST /api/agents/tools/sendWhatsAppThe site_id field is required when calling via REST.
POST /api/agents/tools/sendWhatsApp
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"site_id": "YOUR_SITE_ID",
"phone_number": "+1234567890",
"message": "Hi! How can we help you today?",
"from": "Support Team",
"conversation_id": "CONVERSATION_UUID"
}Response (within 24h window):
{
"success": true,
"status": "sent",
"message_id": "...",
"within_response_window": true
}Response (outside 24h window):
{
"success": true,
"template_required": true,
"within_response_window": false,
"hours_elapsed": 36
}When template_required: true, use the whatsappTemplate tool to send the message via a template.
Last updated on