Manage WhatsApp message templates
manage_whatsapp_templatesCreate, list, and delete WhatsApp Business message templates required to message customers after the 24-hour window.
Instructions
Message templates of the profile's WhatsApp Business account. A template approved by Meta is the ONLY way to write to someone more than 24 h after their last message: send it with send_dm (platform 'whatsapp', template { name, language, components }). list (optional status APPROVED|PENDING|REJECTED|PAUSED|DISABLED, name, limit 1-200): each with id, name, status, category, language, components, quality_score, rejected_reason. create (name: lowercase letters, numbers and underscores; category UTILITY (default) | MARKETING | AUTHENTICATION; language, default 'en_US'; and either Meta's components list or the shorthand body text with {{1}}, {{2}}… variables plus examples (sample values Meta requires for them), header (text), footer and buttons [{ text, url? | phone_number? }], a button with neither is a quick reply): Meta reviews it, status PENDING until it is APPROVED or REJECTED (minutes to a day); MARKETING templates are billed higher by Meta, to the customer's own WhatsApp Business account. delete (name; every language of that template goes, cannot be undone). WhatsApp is available to every account: the profile needs its WhatsApp Business number connected (get_connect_link with platforms ['whatsapp']), otherwise the API answers 400 with how to connect it; 401 whatsapp_reauth_required means reconnect it. Needs the user's approval: call it first without confirmed to get a preview (nothing is sent), show the user exactly what will go out, and repeat the call with confirmed: true only after they approve.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>",
"user": "<user>"
},
"name": "manage_whatsapp_templates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | create shorthand: the body text, with {{1}}, {{2}}… for variables. | |
| name | No | Template name. Required for create and delete; a filter for list. | |
| user | Yes | Upload-Post profile name with WhatsApp connected. | |
| limit | No | list: templates per call (default 100). | |
| action | Yes | ||
| footer | No | create shorthand: footer (max 60 characters). | |
| header | No | create shorthand: text header (max 60 characters). | |
| params | No | Other API fields for this action, with the REST API's own names (snake_case) and shapes. Any other field of /api/uploadposts/dms/templates. Leave out what you do not want to change. | |
| status | No | list: only templates in this status (APPROVED, PENDING, REJECTED, PAUSED, DISABLED). | |
| buttons | No | create shorthand: up to 10 buttons { text (max 25), url? | phone_number? }; with neither it is a quick-reply button. | |
| category | No | create: default UTILITY. | |
| examples | No | create shorthand: one sample value per body variable, in order (Meta rejects variables without samples). | |
| language | No | create: template language code, e.g. 'en_US', 'es_ES' (default en_US). | |
| confirmed | No | Set to true only after the user has seen the preview this tool returns without it and approved it. Without it nothing is sent. | |
| components | No | create: Meta's components list (HEADER, BODY, FOOTER, BUTTONS) instead of the shorthand. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No |