Update template
Authorizations
Your ps_ API key
Path Parameters
Id or name of the template to update.
Body
New template content: object { header?, body, footer?, buttons? } (recommended), the same JSON as a string, or plain text (auto-wrapped).
"{ \"body\": { \"text\": \"Oi {{nome}}!\" } }"
Optional header. TEXT: text with 0–1 variable (up to 60 chars). IMAGE/VIDEO/DOCUMENT: provide url (http/https) OR base64 (data URI); base64 is re-hosted server-side. No location header.
"{ \"type\": \"IMAGE\", \"url\": \"https://cdn.loja.com/promo.png\" }"
Optional footer, up to 60 chars, no variables.
"{ \"text\": \"Promoção por tempo limitado\" }"
Up to 10 buttons: QUICK_REPLY (≤ 10; text), URL (≤ 2; text + static url or dynamic with trailing {{1}}), PHONE_NUMBER (≤ 1; text + phone_number E.164), COPY_CODE (≤ 1; code in example). Quick-reply and CTA can coexist.
"[{ \"type\": \"QUICK_REPLY\", \"text\": \"Quero!\" }, { \"type\": \"URL\", \"text\": \"Comprar\", \"url\": \"https://loja.com/promo/{{link}}\" }]"
Required when variables exist: maps each variable used in body/header (and the dynamic URL) to a sample value. The COPY_CODE code goes in button.example, not here. Missing → 400 TEMPLATE_EXAMPLES_REQUIRED.
"{ \"nome\": \"Maria\", \"desconto\": \"15%\", \"link\": \"abc123\" }"
Template category (default UTILITY).
"MARKETING"
Template language (default pt_BR).
"pt_BR"
Response
Update template