whatsapp_templates_write
Create, edit or delete WhatsApp message templates. New and edited templates go to Meta for review before they can be used. Placeholders are {{1}}, {{2}}… in order. Actions: create — submit a new template; give bodyText or components Needs: name, category, language. | update — replace the components (and optionally category) of an existing template Needs: templateId, components. | delete — delete a template by name (all languages unless templateId is given) Needs: name.
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>",
"agentId": "<agentId>",
"phoneId": "<phoneId>"
},
"name": "whatsapp_templates_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | compact (default) = light mode: long text is cut and bulky blobs are replaced by a size marker. full = complete API response. | |
| name | No | For create: lowercase letters, digits and underscores. For delete: the template name. | |
| action | Yes | ||
| agentId | Yes | ||
| phoneId | Yes | Meta WhatsApp phone number ID (from get_agent_channels), not the phone number. | |
| bodyText | No | For create: body text of a simple text-only template. | |
| category | No | ||
| language | No | For create: language code, e.g. "en_US", "ar". | |
| components | No | Meta template components (HEADER / BODY / FOOTER / BUTTONS) for create or update, when more than a plain body is needed. | |
| templateId | No | For update (required) and delete (optional). |