Conversations
WhatsApp templates
Check the approved templates available to send
List templates
GET
/v1/whatsapp-templates
Returns all WhatsApp templates configured for your account. Includes the Meta approval status.
Request example
curl https://recaudo.app/api/v1/whatsapp-templates \
-H "Authorization: Bearer sk_live_tu_secret_key" \
-H "Content-Type: application/json"
Response
{
"object": "list",
"data": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "recordatorio_pago",
"description": "Recordatorio de pago pendiente",
"content_type": "text",
"variables": ["nombre", "monto", "fecha_limite"],
"meta_template_status": "APPROVED"
},
{
"id": "98765432-10fe-dcba-9876-543210fedcba",
"name": "confirmacion_pedido",
"description": "Confirmación de pedido realizado",
"content_type": "text",
"variables": ["nombre", "numero_pedido"],
"meta_template_status": "APPROVED"
}
]
}
Templates must be approved by Meta (meta_template_status: "APPROVED") to be sent.
Send a template to a phone
POST
/v1/conversations/send-template-to-phone
Sends a Meta-approved template to any WhatsApp number, with or without a previous conversation. Use it for business-initiated notices: payment links, contract signing, reminders.
curl -X POST https://recaudo.app/api/v1/conversations/send-template-to-phone \
-H "Authorization: Bearer sk_live_tu_secret_key" \
-H "Content-Type: application/json" \
-d '{
"phone": "+5215511112222",
"template_name": "payment_link_message2",
"variables": ["Ana López", "https://recaudo.app/pay/abc123", "Plan Previsión", "$1,983.45"],
"phone_number_id": "opcional: UUID o meta_phone_number_id de la línea"
}'
{
"object": "conversation_message",
"data": { "id": "9b1f…", "status": "sent", "external_id": "wamid.HBgN…" },
"conversation_id": "01a1…",
"from": { "phone_number_id": "fa8a…", "phone_number": "+5212202110494" }
}
- variables: positional, as a list ["Ana", "..."] or an object {"1": "Ana"}. Identify the template with template_id or template_name.
- phone_number_id (optional): sending line. If omitted, it goes out through the line of the template's WhatsApp account.
- Status: subscribe your webhook to conversation.message.status_updated (delivered, read, failed) and conversation.message.received (replies and buttons).
- 422 errors with error.code: template_not_found, invalid_phone_number, template_line_mismatch, no_sending_line, send_failed.
Was this page helpful?
Thanks for letting us know.