Skip to main content
POST
Create and submit a template

Authorizations

Authorization
string
header
required

An org API key: Authorization: Bearer oak_….

Body

application/json

Create + submit for approval in one call.

Patterns mirror the internal TemplateCreate so the public contract cannot accept what the service would reject. There is no waba_id: the org's connected WhatsApp account is resolved server-side.

name
string
required
Pattern: ^[a-z0-9_]{1,512}$
language
string
required
Pattern: ^[a-zA-Z]{2,3}(_[A-Za-z]{2})?$
category
enum<string>
required

WhatsApp message-template category. Mirrors Meta's template categories and the Postgres template_category_enum. Meta may auto-recategorize a template after review; the webhook handler reconciles ours to match.

Available options:
MARKETING,
UTILITY,
AUTHENTICATION
components
Components · object[]
required
catalog_send_defaults
Catalog Send Defaults · object | null

Response

Successful Response

id
string
required
waba_id
string
required
meta_template_id
string | null
required
name
string
required
language
string
required
category
enum<string>
required

WhatsApp message-template category. Mirrors Meta's template categories and the Postgres template_category_enum. Meta may auto-recategorize a template after review; the webhook handler reconciles ours to match.

Available options:
MARKETING,
UTILITY,
AUTHENTICATION
status
enum<string>
required

Lifecycle status of a WhatsApp message template. DRAFT is local-only (authored but never submitted to Meta); every other value mirrors a Meta review state. A template starts DRAFT, moves to PENDING on submit, then Meta drives it to APPROVED / REJECTED and later PAUSED / DISABLED via the template-status webhook.

Available options:
DRAFT,
PENDING,
APPROVED,
REJECTED,
PAUSED,
DISABLED,
IN_APPEAL,
PENDING_DELETION
components
Components · object[]
required
catalog_send_defaults
Catalog Send Defaults · object | null
required
rejected_reason
string | null
required
quality_rating
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required