Update message template

Updates a message template by its id.

A body that changes category or components must leave the merged template coherent:
AUTHENTICATION and its OTP button go together. Switching to or from AUTHENTICATION
therefore sends category and components in the same request; otherwise the API answers
400 AUTHENTICATION_COMPONENTS_MISMATCH before calling Meta.

A DRAFT or Error template is edited locally, without Meta. Optimistic lock (DEP-1): send
expectedUpdatedAt with the ISO 8601 updatedAt you read. If the stored version is a
different instant, or another write wins while this one is saved, the API answers 409
TEMPLATE_CHANGED and saves nothing. Without it, the local edit is saved unlocked. In any
other status expectedUpdatedAt is ignored and never sent to Meta.

The local edit of a DRAFT or Error template also takes waba: the template goes to the WABA
the form chose, as long as it belongs to the retailer. The submit sends it through that WABA.
A template that already has a metaId keeps its WABA: another one answers 409 WABA_LINKED_TO_META.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The ID of an existing template.

Body Params
recommendationAudit
object
boolean
Defaults to false

Saves a valid local DRAFT without sending it to Meta. Submit explicitly later.

string
length between 1 and 128

Tenant scoped idempotency key. Reuse for retries with the same payload; replays return the current saved template. Records do not expire during the pilot.

string

Optional completed evaluation belonging to the same retailer.

appliedSuggestions
array of strings

Applied suggestion IDs; requires evaluationId.

appliedSuggestions
string
required

The message template title.

string
enum
required

The category of the message template (the MessageTemplateType value; the enum name, e.g. AccountUpdate, is rejected).
ACCOUNT_UPDATE is Meta UTILITY. AUTHENTICATION is Meta's one-time passcode (copy code) category:
Meta writes the body, so the components carry no text. See components.

Allowed:
string
required

The language of the message template.
Example en_US, pt_BR.

components
array of objects
required

Array of template components. For standard templates, use HEADER, BODY, FOOTER, and BUTTONS.
For carousel templates, include a BODY component (main text) and a CAROUSEL component with cards.
Note: CAROUSEL and a HEADER with format GIF are only allowed for MARKETING category templates.

AUTHENTICATION templates take exactly one BODY (no text, optional add_security_recommendation),
at most one FOOTER (only code_expiration_minutes, 1-90) and exactly one BUTTONS with a single
{ "type": "OTP", "otp_type": "COPY_CODE", "text"?: string }. HEADER, media, CAROUSEL, URL buttons
and unknown keys are rejected; otp_type ONE_TAP/ZERO_TAP are not supported. An OTP button in any
other category is rejected.

components*
teams
array of objects
teams
teamGroups
array of objects
teamGroups
user
object
string
enum
Allowed:
string

ID of a message template from a partner.

date-time

ISO 8601 updatedAt of the version the client read. Locks the local edit of a DRAFT or Error template.

waba
object | null

On a DRAFT or Error template, an id other than the stored one moves the template to that WABA: it must belong to the retailer (400 WABA_NOT_ALLOWED otherwise), and id and name are saved from the retailer's WABA list, not from the body. Null, absent or the stored id keeps the stored WABA. A template that already has a metaId keeps its WABA (409 WABA_LINKED_TO_META for another id). Ignored in any other status.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json