create_template
Create a message template in the account library. Supports rich standalone cards (with image/media, title, text, and buttons), carousels, media, and plain text. For WhatsApp agents, creates the template as DRAFT first in the workspace so the user can review it before submitting to Meta.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique name of the template (lowercase, numbers, and underscores only). | |
| text | Yes | Main message content or card description. Supports placeholders like {{name}} or {{first_name}}. | |
| type | No | Template layout type: 'card' (rich standalone card with title/media/buttons), 'text' (plain text message), 'media' (standalone media with caption), or 'carousel' (multiple cards). If omitted, inferred from title/mediaUrl (defaults to 'card' if mediaUrl or title is provided, otherwise 'text'). | |
| title | No | Title for rich card templates. | |
| footer | No | Optional footer text (WhatsApp supports up to 60 characters). | |
| agentId | No | Agent ID or name this template belongs to. If omitted, uses active agent from context. | |
| content | No | Optional raw template content object (e.g. { richCard: { ... } }). If provided, used directly. | |
| category | No | Meta template category for WhatsApp agents (default 'MARKETING'). | MARKETING |
| language | No | Language code for WhatsApp templates, e.g. 'en_US', 'es_ES' (default 'en_US'). | en_US |
| mediaUrl | No | Optional media header URL (image/video/document). For card templates, this is the card's hero image/video. | |
| mediaHeight | No | Height of the media component in a rich card ('SHORT', 'MEDIUM', 'TALL'). Default: 'MEDIUM'. | MEDIUM |
| suggestions | No | Optional list of interactive suggestion buttons. | |
| submitToMeta | No | For WhatsApp agents: whether to submit immediately to Meta Graph API for approval. Defaults to false (draft-first mode). Only set to true if the user explicitly confirmed immediate submission. | |
| cardOrientation | No | Card orientation for rich card templates ('VERTICAL' or 'HORIZONTAL'). Default: 'VERTICAL'. | VERTICAL |