Skip to main content

What it does

Edits the content (components) of an existing template. On Meta the edit is full-replace: the component set you send becomes the new state, and any component you don’t send is removed. After a successful edit the status returns to PENDING (re-review) and the local DB is synced. name and language cannot be changed. The response body is controlled via Prefer. Internally, the template’s current category is first fetched from Meta (for auth / standard component structure), then the edit is submitted.
Template update = PUT semantics: always send the full component set, or missing components are deleted (or you get a 409).
Golden rule: to preserve existing components, send the full set. Sending only body drops the other components and is rejected (see Demo 7). Editing is allowed only when the template is APPROVED, REJECTED, or PAUSED.

Endpoint

Headers

string
required
Secret key in Bearer sk_... format. See Secret Key authentication.
string
required
Always application/json.
string
return=representation (default) returns the updated template; return=minimal returns no body. The applied preference is reported via the Preference-Applied header.

Path parameters

string
required
Application ID.
string
required
The template’s Meta ID.

Request Body

name and language cannot be sent. The inner objects (header / body / footer / buttons) use the same schema as Create Template. Full-replace: send every component you want to keep (at minimum body).
object
required
Body component. Must always be sent (structurally required).
object | null
Header component (send it if you want to keep it).
Footer component.
array | null
Buttons (max 10).
integer | null
Message time-to-live.
object | null
Limited-time offer component (text, hasExpiration) — same schema as Create Template. Because editing is full-replace, an existing offer is removed if you do not send it again.
string | null
Category change: UTILITY, MARKETING, or AUTHENTICATION. Effective only for REJECTED/PAUSED; for APPROVED Meta rejects it; subject to review. See Template Category.
Limited-time offer on edit — the same rules as on create apply here: body.text is required, header.format is limited to NONE / IMAGE / VIDEO, footer.text cannot be sent, and there may be at most two buttons, each COPY_CODE or URL with only one COPY_CODE. See Limited-time offer rules. The MARKETING check runs only when you also send a category; if you omit it, Meta validates the offer against the template’s existing category. (carousel is not accepted on edit at all, so that rule never applies here.)

Response

With Prefer: return=representation (default), the response is { "data": {...}, "isSuccess": true } — the full template re-fetched from Meta after the edit (with components), status: "PENDING". With return=minimal, it is { "isSuccess": true }.
boolean
true when the update was accepted.
object | null
The updated template — the same fields as Get Template Detail: sourceId, name, language, category, status (PENDING right after a successful edit), components, qualityScore, rejectedReason, parameterFormat. components has the same shape as in Get Template Detail. With Prefer: return=minimal the key is omitted from the envelope altogether — the response is exactly { "isSuccess": true }, still with HTTP 200.

Examples

Still HTTP 200; data is omitted entirely rather than sent as null:
Dropping limitedTimeOffer from this payload would remove the offer from the template — full-replace applies to it exactly as it does to the other components.

Errors

object
Error details with code, group, and description; isSuccess is false.

Auth / tenant

Pre-fetch (while fetching the current template)

Request validation (422)

The button, header, and body rules are identical to Create Template: WA_TPL_001WA_TPL_005 and WA_TPL_015WA_TPL_020 (buttons), WA_TPL_006WA_TPL_010 and WA_TPL_021 (header), WA_TPL_011WA_TPL_014 (body).
The category rules (WA_TPL_022WA_TPL_033) and the name rule (WA_TPL_034) are not evaluated here: name cannot be sent, and the category-vs-component compatibility check only runs on create. Meta still enforces the equivalent rules on its side, so a category-incompatible edit comes back as a META_0xx error instead of a WA_TPL_0xx one.

Limited-time offer validation (422)

Returned only when limitedTimeOffer is present.

Update