create_whatsapp_template
Create a WhatsApp message template destructive
Description
Submit a new WhatsApp message template for Meta’s review, or with edit:true change an existing one (see edit). This is the ONLY way a business can start a WhatsApp conversation: outside the 24-hour window that opens when a customer messages first, WhatsApp accepts approved templates and nothing else. CATEGORY IS NOT COSMETIC — MARKETING (anything promotional), UTILITY (a transactional follow-up to something the customer did) or AUTHENTICATION (a one-time passcode) decides both what Meta charges for the conversation and the policy the content is reviewed against, and Meta RE-CATEGORISES a template whose content does not match the claim; the reply reports the category Meta actually assigned, not the one requested. The name is lowercase letters, digits and underscores only. Language is never defaulted: en and en_US are different templates to Meta. Submitting does NOT make it sendable — it comes back PENDING and has to be re-read with list_whatsapp_templates. CAROUSEL TEMPLATES ARE SUPPORTED: add a “CAROUSEL” component whose “cards” array holds 2–10 cards, each card carrying its own HEADER (format IMAGE or VIDEO for a media carousel, PRODUCT for a catalog one), an optional card BODY of at most 160 characters — a different and far shorter limit than the message bubble’s 1024 — and up to 2 buttons. Meta requires every card to carry THE SAME components, and if any card has body text then all of them must. A MEDIA HEADER NEEDS AN UPLOADED ASSET: any IMAGE, VIDEO or DOCUMENT header — including every card header in a media carousel — must carry example: { header_handle: [ … ] } holding a handle from Meta’s Resumable Upload API, or Meta refuses the whole template with a bare “Invalid parameter”. Pass `mediaUrl` on that header (a public JPEG/PNG for IMAGE, MP4 for VIDEO, PDF for DOCUMENT) and Hermoso uploads it through Meta's Resumable Upload API and fills the handle; a header with neither is refused locally and by name. A TEXT header needs no handle, and a PRODUCT card carousel takes its pictures from a connected catalog. 0 credits.
Parameters
| Parameter | Type | Description |
|---|---|---|
wabaId | string | the WhatsApp Business Account id, from list_whatsapp_accounts. Optional when exactly one account is shared with this profile; required when several are, and refused by name for one that is not shared |
namerequired | string | lowercase letters, digits and underscores only, e.g. "order_shipped" (max 512) |
languagerequired | string | the language code, e.g. en_US, es_MX, pt_BR — Meta treats each as its own template |
category | "MARKETING" | "UTILITY" | "AUTHENTICATION" | MARKETING = promotional, UTILITY = transactional follow-up, AUTHENTICATION = one-time passcode. It sets the price and the review policy. Required to create; optional on an edit. |
components | object[] | Meta’s component array (leave it out only for a libraryTemplateName). A BODY is the only REQUIRED one: [{ type: "BODY", text: "Your order {{1}} has shipped." }]. Optional HEADER (text max 60), FOOTER (max 60) and BUTTONS (up to 10 in total). Body text max 1024. A carousel is { type: “CAROUSEL”, cards: [{ components: [{ type: “HEADER”, format: “IMAGE” }, { type: “BODY”, text: … }] }, …] } — 2–10 cards, all with the same components, card body max 160, up to 2 buttons each. AUTHENTICATION templates have their OWN shape (Meta presets the text): [{ type: "BODY", add_security_recommendation: true }, { type: "FOOTER", code_expiration_minutes: 10 }, { type: "BUTTONS", buttons: [{ type: "OTP", otp_type: "COPY_CODE", text: "Copy code" }] }] — no body `text` (refused, never dropped), expiry 1–90 minutes, otp_type COPY_CODE or ONE_TAP (ONE_TAP also needs supported_apps: [{ package_name, signature_hash }], up to 5). |
parameterFormat | string | POSITIONAL (default, {{1}}) or NAMED |
libraryTemplateName | string | make it from META'S TEMPLATE LIBRARY instead of components: the library template's exact name (list_whatsapp_templates library:true). Category must be UTILITY; pass no components |
libraryButtonInputs | object[] | the library template's buttons, in Meta's form, e.g. [{ type: "URL", url: { base_url: "https://shop.example/{{1}}", url_suffix_example: "https://shop.example/o/1" } }, { type: "PHONE_NUMBER", phone_number: "+15551234567" }]. Required when the library template has buttons |
libraryBodyInputs | object | optional library extras, e.g. { add_contact_number: true } |
edit | boolean | EDIT the existing template called name [language] instead of creating one: components REPLACE all of its components; category only if it is not APPROVED; only APPROVED, REJECTED or PAUSED templates, an approved one at most 10 times in 30 days and once a day, and it goes back to review. Needs confirm:true after a first call without it |
templateId | string | edit: the template id, instead of name + language |
ttlSeconds | number | edit: time to live, AUTHENTICATION 30–900, UTILITY 30–43200, MARKETING 43200–2592000; -1 is 30 days (not marketing) |
confirm | boolean | edit: true to make the change, after the user saw the new wording |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/create_whatsapp_template.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_whatsapp_template","arguments":{"name":"<string>","language":"<string>"}}}
CLI
hermoso call create_whatsapp_template --json '{"name":"<string>","language":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
list_whatsapp_templatesWhatsApp message templatesdelete_whatsapp_templateDelete a WhatsApp message templatelist_whatsapp_accountsWhatsApp Business accounts and numbersread_whatsapp_inboxRead and answer WhatsApp messagessend_whatsapp_messageSend a WhatsApp messagesend_whatsapp_broadcastBroadcast a WhatsApp template to many peoplemanage_whatsapp_numberWhatsApp number settings, blocklist and groupsmanage_whatsapp_flowWhatsApp forms (Flows)manage_whatsapp_callingWhatsApp callsmanage_whatsapp_accountWhatsApp account: notices, costs, catalog, ad conversions