Skip to main content
POST
Crear un template de WhatsApp y enviarlo a Meta para aprobación
Creates a template on the given WhatsApp channel and submits it to Meta for review. The response includes the template’s internal id and the status it landed in. Until Meta approves the template, you can’t use it in a template message — use GET /v1/templates to check when it becomes APPROVED.

Endpoint

Required scope

templates:create

Headers

Body

Structure of components[]

Example request

Response

201 Created

400 / 401 / 403 / 404 / 409 / 429

Standard errors. Common cases:
  • 400 BAD_REQUEST: body validation (invalid characters in name, malformed components, missing example when Meta requires it).
  • 403 FORBIDDEN with code: INSUFFICIENT_SCOPE: the PAT does not have templates:create.
  • 404 NOT_FOUND: the channel_id does not belong to your tenant or does not exist.
  • 409 CONFLICT: a template with the same name + language already exists on that channel.
  • 502 UPSTREAM_ERROR: Meta rejected the creation. The details field explains why.
After creating the template you have to wait for Meta to approve it before sending. Poll GET /v1/templates filtering by status until it shows up as APPROVED. Approval usually takes minutes, but can take longer for sensitive categories like MARKETING.

Authorizations

Authorization
string
header
required

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

Body

application/json
channel_id
string
required

ObjectId del canal WhatsApp donde se crea el template.

name
string
required

Nombre del template. Solo minúsculas, números y guiones bajos.

Maximum string length: 512
Example:

"welcome_v2"

language
string
required
Maximum string length: 10
Example:

"es_CL"

category
enum<string>
required
Available options:
MARKETING,
UTILITY,
AUTHENTICATION
components
object[]
required
parameter_format
enum<string>
Available options:
NAMED,
POSITIONAL
metadata
object

Response

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