Call it
curl https://api.peume.com/v1/call/whatsapp-update-template-by-id \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"templateId": "your templateId",
"accountId": "your accountId"
}
}'const res = await fetch("https://api.peume.com/v1/call/whatsapp-update-template-by-id", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"templateId": "your templateId",
"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-by-id",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"templateId": "your templateId",
"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-by-id.
Parameters
templateIdRequiredstringMeta template id (numeric).
accountIdRequiredstringWhatsApp account ID
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). The value -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, with no re-review. If Meta later recategorises the template, it clears the TTL (read it back to check).
