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 6). Editing is allowed only when the template is APPROVED, REJECTED, or PAUSED.

Endpoint

Headers

Authorization
string
required
Secret key in Bearer sk_... format. See Secret Key authentication.
Content-Type
string
required
Always application/json.
Prefer
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

app_id
string
required
Application ID.
source_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).
body
object
required
Body component. Must always be sent (structurally required).
header
object | null
Header component (send it if you want to keep it).
Footer component.
buttons
array | null
Buttons (max 10).
messageSendTtlSeconds
integer | null
Message time-to-live.
category
string | null
Category change (Template Category). Effective only for REJECTED/PAUSED; for APPROVED Meta rejects it; subject to review.

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 }.
isSuccess
boolean
true when the update was accepted.
data
object | null
The updated template (TemplateResponseModel): sourceId, name, language, category, status, components, qualityScore, rejectedReason, parameterFormat. null when Prefer: return=minimal.

Examples


Errors

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

Auth / tenant

Pre-fetch (while fetching the current template)

Request validation (422)

Update