# Hermoso: create_whatsapp_template · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/publish/create_whatsapp_template/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Publishing & scheduling](https://hermoso.ai/docs/reference/publish/) / create_whatsapp_template

# `create_whatsapp_template`

Create a WhatsApp message template destructive

Area: WHATSAPP BUSINESS · [Publishing & scheduling](https://hermoso.ai/docs/reference/publish/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## 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

`name` required `string` lowercase letters, digits and underscores only, e.g. "order_shipped" (max 512)

`language` required `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](https://hermoso.ai/docs/credits/).

## Related tools

- [list_whatsapp_templates](https://hermoso.ai/docs/reference/publish/list_whatsapp_templates/) WhatsApp message templates
- [delete_whatsapp_template](https://hermoso.ai/docs/reference/publish/delete_whatsapp_template/) Delete a WhatsApp message template
- [list_whatsapp_accounts](https://hermoso.ai/docs/reference/publish/list_whatsapp_accounts/) WhatsApp Business accounts and numbers
- [read_whatsapp_inbox](https://hermoso.ai/docs/reference/publish/read_whatsapp_inbox/) Read and answer WhatsApp messages
- [send_whatsapp_message](https://hermoso.ai/docs/reference/publish/send_whatsapp_message/) Send a WhatsApp message
- [send_whatsapp_broadcast](https://hermoso.ai/docs/reference/publish/send_whatsapp_broadcast/) Broadcast a WhatsApp template to many people
- [manage_whatsapp_number](https://hermoso.ai/docs/reference/publish/manage_whatsapp_number/) WhatsApp number settings, blocklist and groups
- [manage_whatsapp_flow](https://hermoso.ai/docs/reference/publish/manage_whatsapp_flow/) WhatsApp forms (Flows)
- [manage_whatsapp_calling](https://hermoso.ai/docs/reference/publish/manage_whatsapp_calling/) WhatsApp calls
- [manage_whatsapp_account](https://hermoso.ai/docs/reference/publish/manage_whatsapp_account/) WhatsApp account: notices, costs, catalog, ad conversions

[All 728 Publishing & scheduling tools](https://hermoso.ai/docs/reference/publish/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
