Call it
curl https://api.peume.com/v1/call/whatsapp-update-template \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"templateName": "your templateName",
"accountId": "your accountId"
}
}'const res = await fetch("https://api.peume.com/v1/call/whatsapp-update-template", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"templateName": "your templateName",
"accountId": "your accountId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/whatsapp-update-template",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"templateName": "your templateName",
"accountId": "your accountId"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: whatsapp-update-template.
Parameters
templateNameRequiredstringTemplate name (the family).
accountIdRequiredstringWhatsApp account ID
languagestringLanguage code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400.
componentsarrayUpdated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.
message_send_ttl_secondsintegerDelivery validity window in seconds: a message not delivered within it is dropped. Range by category: - AUTHENTICATION: 30 to 900. - UTILITY: 30 to 43200 (12h). - MARKETING: 43200 to 2592000 (30 days). -1 is not accepted here (Meta treats it as an empty edit); send a value in range. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. A TTL-only edit keeps an APPROVED template approved, no re-review. If Meta later recategorises the template, it clears the TTL (read it back to check).
