Send a Meta-approved WhatsApp template
send_whatsapp_templateSend a Meta-approved WhatsApp template
Templates can be sent at any time, including outside the 24-hour
customer-service window. The template must be pre-approved by Meta
for the agent's WhatsApp Business Account; listWhatsAppTemplates
shows each template's status and what to fill in. Before queuing,
Mojeeb checks the name and language against the number's templates
(422 template_not_found or template_not_found_for_language). That
check accepts a template whatever its status, so one that isn't
approved fails at Meta instead. The check is skipped when Mojeeb can't
read the templates from Meta, and when the number has more than 100
templates and the name or language isn't among the 100 Mojeeb reads:
the send is then accepted (202) and Meta's verdict shows in its
status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | E.164 international phone number — leading `+`, country code, then 7–15 digits. No spaces, dashes, or parens. | |
| from | Yes | E.164 international phone number — leading `+`, country code, then 7–15 digits. No spaces, dashes, or parens. | |
| agent_id | Yes | ID of the Mojeeb agent to send from. | |
| template | Yes |