smartchat

save_template

Creates a WhatsApp message template as a draft. Nothing goes to WhatsApp until you submit it with create_template_submissions. Returns the template.

Tool namesave_template
Permissiontemplates:write
readOnlyHintfalse
destructiveHintfalse
idempotentHinttrue
openWorldHintfalse
REST callPOST /v1/templates, PATCH /v1/templates/{template_id}

#What it does

  • Changes data in your account. It does not send messages to contacts.
  • Safe to repeat with the same idempotency_key.

#Input

The tool takes one flat object. Path, query and body fields of the REST call are merged into it.

Create template (POST /v1/templates)

NameTypeRequiredDescription
namestringyesName of the template, at most 120 characters. length 1 to 120
purposestringnomarketing for offers and news. utility for neutral service messages. one of: marketing, utility; default "marketing"
textstringyesMessage text, at most 1024 characters. Placeholders: {{first_name}}, {{last_name}}, {{full_name}}, {{phone}}, {{email}}, {{date}}, {{time}}, {{amount}}, {{service}}, {{location}}. It must not start or end with a placeholder. length 1 to 1024
languagestringnoLanguage of the text, for example en or de. Default: the account language. length 2 to 10
footerstring or nullnoFooter line, at most 60 characters, no placeholder. Null removes it. up to 60 characters
buttonsarray of objectnoUp to 2 buttons. up to 2 items
buttons[].typestringyesquick_reply sends the label back as a reply. url opens a web address. one of: quick_reply, url
buttons[].textstringyesLabel on the button, no placeholder. At most 25 characters for quick_reply and 40 for url. length 1 to 40
buttons[].urlstringnoWeb address starting with https:// (only for type url). up to 2000 characters

Update template (PATCH /v1/templates/{template_id})

NameTypeRequiredDescription
template_idstringyesID of the template, from list_templates.
namestringnoNew name of the template. length 1 to 120
textstringnoMessage text, at most 1024 characters. Placeholders: {{first_name}}, {{last_name}}, {{full_name}}, {{phone}}, {{email}}, {{date}}, {{time}}, {{amount}}, {{service}}, {{location}}. It must not start or end with a placeholder. length 1 to 1024
languagestringnoLanguage of the text, for example en or de. Default: the account language. length 2 to 10
footerstring or nullnoFooter line, at most 60 characters, no placeholder. Null removes it. up to 60 characters
buttonsarray of objectnoUp to 2 buttons. up to 2 items
buttons[].typestringyesquick_reply sends the label back as a reply. url opens a web address. one of: quick_reply, url
buttons[].textstringyesLabel on the button, no placeholder. At most 25 characters for quick_reply and 40 for url. length 1 to 40
buttons[].urlstringnoWeb address starting with https:// (only for type url). up to 2000 characters

Arguments added by the MCP server (see Special arguments)

NameTypeRequiredDescription
idempotency_keystringnoOptional. Unique key, for example a UUID. Same key and arguments within 24 hours: first result. Without a key only an identical call within 1 minute counts as a repeat. up to 255 characters

#Result

The result has the same content as the REST answer. Lists have at most 50 items per page (default 20); use cursor for the next page.

Errors come back as a tool result with isError: true. The error codes are the ones in Errors.