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 toPENDING (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.
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
WithPrefer: 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
Demo 1 — full update (representation)
Demo 1 — full update (representation)
Demo 2 — minimal (Prefer: return=minimal)
Demo 2 — minimal (Prefer: return=minimal)
200; data is omitted entirely rather than sent as null:Demo 3 — change category (REJECTED/PAUSED)
Demo 3 — change category (REJECTED/PAUSED)
Demo 4 — edit a limited-time offer (re-send the offer to keep it)
Demo 4 — edit a limited-time offer (re-send the offer to keep it)
limitedTimeOffer from this payload would remove the offer from the template — full-replace applies to it exactly as it does to the other components.Demo 5 — error: non-editable status (template PENDING) → 409
Demo 5 — error: non-editable status (template PENDING) → 409
Demo 6 — error: 24h edit limit → 429
Demo 6 — error: 24h edit limit → 429
Demo 7 — error: sending only body and breaking structure → 409
Demo 7 — error: sending only body and breaking structure → 409
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_001–WA_TPL_005 and WA_TPL_015–WA_TPL_020 (buttons), WA_TPL_006–WA_TPL_010 and WA_TPL_021 (header), WA_TPL_011–WA_TPL_014 (body).
The category rules (
WA_TPL_022–WA_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 whenlimitedTimeOffer is present.