Skip to main content
PATCH
Editar un template existente
Updates an existing template. Internally syncs the changes with Meta when applicable (for example when editing components or category). Only send the fields you want to change; the rest stays as-is.
Meta only allows editing templates in certain states (APPROVED, REJECTED, or PAUSED, depending on the field). Editing a template in PENDING or IN_REVIEW may return 409 CONFLICT from upstream. If you need to change something critical before Meta approves it, it’s usually faster to create a new template with POST /v1/templates.

Endpoint

Required scope

templates:update

Headers

Path params

Body

Example request

Response

200 OK

Same shape as POST /v1/templates. If the edit triggered a fresh Meta review, status may sit in IN_REVIEW or PENDING until Meta approves it again.

400 / 401 / 403 / 404 / 409 / 429

Common cases:
  • 400 BAD_REQUEST: body validation.
  • 403 FORBIDDEN with code: INSUFFICIENT_SCOPE: the PAT does not have templates:update.
  • 404 NOT_FOUND: the template does not exist or does not belong to your tenant.
  • 409 CONFLICT: Meta rejected the edit because the template is not in an editable state.
  • 502 UPSTREAM_ERROR: generic error from Meta. details describes the cause.
After editing components, poll GET /v1/templates to confirm Meta has re-approved the template before continuing to send it in production.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

ObjectId del template

Body

application/json
channel_id
string
required

ObjectId del canal WhatsApp dueño del template (requerido por upstream).

name
string
Maximum string length: 512
language
string
Maximum string length: 10
category
enum<string>
Available options:
MARKETING,
UTILITY,
AUTHENTICATION
parameter_format
enum<string>
Available options:
NAMED,
POSITIONAL
components
object[]
status
enum<string>
Available options:
PENDING,
IN_REVIEW,
REJECTED,
APPROVED,
PAUSED,
DISABLED,
IN_APPEAL
metadata
object

Response

200 - application/json
id
string
required
name
string
required
language
string
required
status
string
required
category
string
required
variables
string[]
required
parameter_format
string