Create Template
Creates a WhatsApp message template and submits it to Meta for approval. A newly created template’s status is usually PENDING.
Category rules
AUTHENTICATION — no header; no body.text (only addSecurityRecommendation); no footer.text (only codeExpirationMinutes); buttons may only be OTP.
UTILITY / MARKETING — body.text is required; addSecurityRecommendation and codeExpirationMinutes cannot be used; OTP buttons are not allowed; COPY_CODE is allowed in MARKETING only.
In every category, the body and header cannot start or end with a variable, and the number of examples must equal the number of variables.
TTL ranges for messageSendTtlSeconds: UTILITY 30–43200 (30s–12h), MARKETING 43200–2592000 (12h–30d), AUTHENTICATION 30–900 or -1.
Carousel rules
Sending carousel puts the template into carousel mode: the top level keeps only its body bubble, and every other component moves into the cards. All of these are enforced locally and fail with 422 before the request reaches Meta.
| Rule | Code |
|---|---|
category must be MARKETING. | WA_TPL_035 |
No top-level header (omit it, or send format: "NONE"). | WA_TPL_036 |
No top-level footer. | WA_TPL_037 |
No top-level buttons — they belong to each card. | WA_TPL_038 |
| Between 2 and 10 cards. | WA_TPL_039 |
Every card must use the same header format (all IMAGE or all VIDEO). | WA_TPL_040 |
| Every card must have the same button types in the same order. | WA_TPL_041 |
A card header must be IMAGE or VIDEO. | WA_TPL_042 |
A card header must carry a media handle in examples. | WA_TPL_043 |
A card body text is required. | WA_TPL_044 |
A card body text is at most 160 chars. | WA_TPL_045 |
Card buttons may only be QUICK_REPLY, URL, or PHONE_NUMBER. | WA_TPL_046 |
Carousel is create-only. Update Template does not accept a carousel field, so an existing carousel template’s cards cannot be edited through this API — create a new template instead. Each card needs its own uploaded media handle, so a 5-card carousel means 5 separate Upload Media calls.
Limited-time offer rules
Sending limitedTimeOffer narrows what the other components may contain. All enforced locally, 422 before reaching Meta.
| Rule | Code |
|---|---|
category must be MARKETING. | WA_TPL_048 |
body.text is required and cannot be empty. | WA_TPL_049 |
header.format may only be NONE, IMAGE, or VIDEO. | WA_TPL_050 |
footer.text cannot be used. | WA_TPL_051 |
carousel cannot be combined with a limited-time offer. | WA_TPL_052 |
Buttons may only be COPY_CODE or URL. | WA_TPL_053 |
At most one COPY_CODE button. | WA_TPL_054 |
| At most two buttons in total (instead of the usual 10). | WA_TPL_055 |
The common pairing is one COPY_CODE button carrying the coupon code plus one URL button linking to the campaign — the maximum a limited-time offer allows.
Authorizations
Secret key in Bearer sk_... format. Server-to-server only — never embed it in a browser or mobile client. The organization is resolved from the key, so organization_id is never passed explicitly.
Path Parameters
Application ID. Must belong to the organization resolved from your secret key, otherwise the request returns 404 with APPLICATION_004.
"app_7poyXj8GXuv76e"
Body
Must start with a lowercase letter and contain only lowercase letters, digits, and underscores (WA_TPL_034). Must be unique for the name + language pair, otherwise 409 with META_017.
512^[a-z][a-z0-9_]*$Closed list — a code outside it is rejected with 422, so this is not free-form BCP-47. Note that the language query filter on Get Templates is a plain string passed to Meta as-is and is not restricted to this list.
af, sq, ar, ar_EG, ar_AE, ar_LB, ar_MA, ar_QA, az, be_BY, bn, bn_IN, bg, ca, zh_CN, zh_HK, zh_TW, hr, cs, da, prs_AF, nl, nl_BE, en, en_GB, en_US, en_AE, en_AU, en_CA, en_GH, en_IE, en_IN, en_JM, en_MY, en_NZ, en_QA, en_SG, en_UG, en_ZA, et, fil, fi, fr, fr_BE, fr_CA, fr_CH, fr_CI, fr_MA, ka, de, de_AT, de_CH, el, gu, ha, he, hi, hu, id, ga, it, ja, kn, kk, rw_RW, ko, ky_KG, lo, lv, lt, mk, ms, ml, mr, nb, ps_AF, fa, pl, pt_BR, pt_PT, pa, ro, ru, sr, si_LK, sk, sl, es, es_AR, es_CL, es_CO, es_CR, es_DO, es_EC, es_HN, es_MX, es_PA, es_PE, es_ES, es_UY, sw, sv, ta, te, th, tr, uk, ur, uz, vi, zu Determines which components are allowed. UTILITY for transactional messages, MARKETING for promotional, AUTHENTICATION for one-time passcodes.
UTILITY, MARKETING, AUTHENTICATION Not allowed together with carousel — carousel buttons belong to each card.
10Turns the template into a carousel: a body bubble followed by 2–10 swipeable cards. MARKETING only.
2 - 10 elementsWhen true, Meta may automatically re-classify the template's category.
Message time-to-live. Valid range depends on the category — see the TTL ranges above.