Skip to content

UpdateWhatsAppMessageTemplate

Source: src/AWS/SocialMessaging/UpdateWhatsAppMessageTemplate.ts

Runtime binding for social-messaging:UpdateWhatsAppMessageTemplate.

Updates an existing WhatsApp message template on the bound account — its category or component JSON. Edits re-enter Meta review.

The deploy-time half grants social-messaging:UpdateWhatsAppMessageTemplate on the bound WABA’s ARN and the runtime half injects the linked account id into every request. Provide the implementation with Effect.provide(AWS.SocialMessaging.UpdateWhatsAppMessageTemplateHttp).

// init — bind the operation to the linked WABA
const updateTemplate = yield* AWS.SocialMessaging.UpdateWhatsAppMessageTemplate(account);
// runtime
yield* updateTemplate({
metaTemplateId: "1234567890",
templateComponents: new TextEncoder().encode(
JSON.stringify([{ type: "BODY", text: "Order {{1}} delivered." }]),
),
});