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.
POST
/
wa
/
{app_id}
/
templates
curl --request POST \ --url https://public-api.gateway.connexease.com/api/v1/wa/{app_id}/templates \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "shipping_update", "language": "en", "category": "UTILITY", "body": { "text": "Hi {{1}}, your order {{2}} is on its way.", "examples": [ "John", "#12345" ] }}'
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"errors": {
"code": "WA_TPL_051",
"group": "VALIDATION",
"description": "Limited-time offer templates do not support a footer."
},
"isSuccess": false
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
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.
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.
Closed list — a code outside it is rejected with 422, so this is not free-form BCP-47. Note that the languagequery filter on Get Templates is a plain string passed to Meta as-is and is not restricted to this list.
Lean creation response. It does not carry components, qualityScore, rejectedReason, parameterFormat, or the DB id — fetch those with Get Template Detail or Get Templates.
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"errors": {
"code": "WA_TPL_051",
"group": "VALIDATION",
"description": "Limited-time offer templates do not support a footer."
},
"isSuccess": false
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{
"isSuccess": false,
"errors": {
"code": "META_075",
"group": "VALIDATION",
"description": "Template with 0000000000 not found in Meta.",
"params": {},
"fields": {}
}
}
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Connexease Gateway","description":"Connexease Gateway Integration Document","colors":{"primary":"#0B0C36","light":"#0B0C36","dark":"#0B0C36"},"logo":"https://mintcdn.com/connexease/yT3a9JqKtN8wzcNE/images/logo_dark_with_text.svg?fit=max\u0026auto=format\u0026n=yT3a9JqKtN8wzcNE\u0026q=85\u0026s=c157f165c8033b5d3b64eac2abbc86c9","favicon":"https://mintcdn.com/connexease/yT3a9JqKtN8wzcNE/images/logo_dark.svg?fit=max\u0026auto=format\u0026n=yT3a9JqKtN8wzcNE\u0026q=85\u0026s=9835e72df2c5387e63e1edd6ce793fd7","api":{"openapi":"openapi.json","playground":{"display":"interactive","proxy":true}},"appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"https://gateway.connexease.com","label":"Dashboard"},{"href":"https://pro.releasepad.io/en/585e1fe6-9c22-11f1-b50f-0a9a9391db91","label":"Newsletter"}]},"search":{"prompt":"Ask"},"seo":{"indexing":"navigable"},"integrations":{"ga4":{"measurementId":"G-YG7TW2XWVW"}},"banner":{"content":"Welcome to the Connexease Gateway API Documentation!","dismissible":true},"thumbnails":{"appearance":"light"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"connexease","hasAudioNarration":false,"actualSubdomain":"connexease","customDomains":["docs.gateway.connexease.com"],"gitSource":{"type":"github","owner":"abdullahkulcu","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae5141b88130c8dfdcdce64","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"Public API","count":33},{"language":"default","tag":"Gateway Dashboard","count":16},{"language":"default","tag":"Messaging API","count":15},{"language":"default","tag":"Template","count":13},{"language":"default","tag":"Sandbox Public API","count":13},{"language":"default","tag":"Templates","count":9},{"language":"default","tag":"Dashboard","count":9},{"language":"default","tag":"Integration Guides","count":8},{"language":"default","tag":"Reference","count":7},{"language":"default","tag":"Essentials","count":7}],"searchSettings":{"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/template/create-template","slug":"/api-reference/template/create-template","pageMetadata":{"title":"Create Template","description":"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template's status is usually `PENDING`.\n\n## Category rules\n\n**AUTHENTICATION** — no `header`; no `body.text` (only `addSecurityRecommendation`); no `footer.text` (only `codeExpirationMinutes`); buttons may only be `OTP`.\n\n**UTILITY / MARKETING** — `body.text` is required; `addSecurityRecommendation` and `codeExpirationMinutes` cannot be used; `OTP` buttons are not allowed; `COPY_CODE` is allowed in `MARKETING` only.\n\nIn every category, the body and header cannot start or end with a variable, and the number of `examples` must equal the number of variables.\n\n**TTL ranges** for `messageSendTtlSeconds`: `UTILITY` 30–43200 (30s–12h), `MARKETING` 43200–2592000 (12h–30d), `AUTHENTICATION` 30–900 or `-1`.\n\n## Carousel rules\n\nSending `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.\n\n| Rule | Code |\n| --- | --- |\n| `category` must be `MARKETING`. | `WA_TPL_035` |\n| No top-level `header` (omit it, or send `format: \"NONE\"`). | `WA_TPL_036` |\n| No top-level `footer`. | `WA_TPL_037` |\n| No top-level `buttons` — they belong to each card. | `WA_TPL_038` |\n| Between 2 and 10 cards. | `WA_TPL_039` |\n| Every card must use the same header format (all `IMAGE` or all `VIDEO`). | `WA_TPL_040` |\n| Every card must have the same button types in the same order. | `WA_TPL_041` |\n| A card header must be `IMAGE` or `VIDEO`. | `WA_TPL_042` |\n| A card header must carry a media handle in `examples`. | `WA_TPL_043` |\n| A card body `text` is required. | `WA_TPL_044` |\n| A card body `text` is at most 160 chars. | `WA_TPL_045` |\n| Card buttons may only be `QUICK_REPLY`, `URL`, or `PHONE_NUMBER`. | `WA_TPL_046` |\n\n**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.\n\n## Limited-time offer rules\n\nSending `limitedTimeOffer` narrows what the other components may contain. All enforced locally, `422` before reaching Meta.\n\n| Rule | Code |\n| --- | --- |\n| `category` must be `MARKETING`. | `WA_TPL_048` |\n| `body.text` is required and cannot be empty. | `WA_TPL_049` |\n| `header.format` may only be `NONE`, `IMAGE`, or `VIDEO`. | `WA_TPL_050` |\n| `footer.text` cannot be used. | `WA_TPL_051` |\n| `carousel` cannot be combined with a limited-time offer. | `WA_TPL_052` |\n| Buttons may only be `COPY_CODE` or `URL`. | `WA_TPL_053` |\n| At most one `COPY_CODE` button. | `WA_TPL_054` |\n| At most two buttons in total (instead of the usual 10). | `WA_TPL_055` |\n\nThe 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.","deprecated":null,"version":null,"openapi":"/public-openapi.json post /wa/{app_id}/templates","href":"/api-reference/template/create-template","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h2: \"h2\",\n p: \"p\",\n strong: \"strong\",\n table: \"table\",\n tbody: \"tbody\",\n td: \"td\",\n th: \"th\",\n thead: \"thead\",\n tr: \"tr\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template’s status is usually \", _jsx(_components.code, {\n children: \"PENDING\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Category rules\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"AUTHENTICATION\"\n }), \" — no \", _jsx(_components.code, {\n children: \"header\"\n }), \"; no \", _jsx(_components.code, {\n children: \"body.text\"\n }), \" (only \", _jsx(_components.code, {\n children: \"addSecurityRecommendation\"\n }), \"); no \", _jsx(_components.code, {\n children: \"footer.text\"\n }), \" (only \", _jsx(_components.code, {\n children: \"codeExpirationMinutes\"\n }), \"); buttons may only be \", _jsx(_components.code, {\n children: \"OTP\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"UTILITY / MARKETING\"\n }), \" — \", _jsx(_components.code, {\n children: \"body.text\"\n }), \" is required; \", _jsx(_components.code, {\n children: \"addSecurityRecommendation\"\n }), \" and \", _jsx(_components.code, {\n children: \"codeExpirationMinutes\"\n }), \" cannot be used; \", _jsx(_components.code, {\n children: \"OTP\"\n }), \" buttons are not allowed; \", _jsx(_components.code, {\n children: \"COPY_CODE\"\n }), \" is allowed in \", _jsx(_components.code, {\n children: \"MARKETING\"\n }), \" only.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"In every category, the body and header cannot start or end with a variable, and the number of \", _jsx(_components.code, {\n children: \"examples\"\n }), \" must equal the number of variables.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"TTL ranges\"\n }), \" for \", _jsx(_components.code, {\n children: \"messageSendTtlSeconds\"\n }), \": \", _jsx(_components.code, {\n children: \"UTILITY\"\n }), \" 30–43200 (30s–12h), \", _jsx(_components.code, {\n children: \"MARKETING\"\n }), \" 43200–2592000 (12h–30d), \", _jsx(_components.code, {\n children: \"AUTHENTICATION\"\n }), \" 30–900 or \", _jsx(_components.code, {\n children: \"-1\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Carousel rules\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Sending \", _jsx(_components.code, {\n children: \"carousel\"\n }), \" 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 \", _jsx(_components.code, {\n children: \"422\"\n }), \" before the request reaches Meta.\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Rule\"\n }), _jsx(_components.th, {\n children: \"Code\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"category\"\n }), \" must be \", _jsx(_components.code, {\n children: \"MARKETING\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_035\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"No top-level \", _jsx(_components.code, {\n children: \"header\"\n }), \" (omit it, or send \", _jsx(_components.code, {\n children: \"format: \\\"NONE\\\"\"\n }), \").\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_036\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"No top-level \", _jsx(_components.code, {\n children: \"footer\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_037\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"No top-level \", _jsx(_components.code, {\n children: \"buttons\"\n }), \" — they belong to each card.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_038\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"Between 2 and 10 cards.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_039\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"Every card must use the same header format (all \", _jsx(_components.code, {\n children: \"IMAGE\"\n }), \" or all \", _jsx(_components.code, {\n children: \"VIDEO\"\n }), \").\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_040\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"Every card must have the same button types in the same order.\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_041\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"A card header must be \", _jsx(_components.code, {\n children: \"IMAGE\"\n }), \" or \", _jsx(_components.code, {\n children: \"VIDEO\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_042\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"A card header must carry a media handle in \", _jsx(_components.code, {\n children: \"examples\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_043\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"A card body \", _jsx(_components.code, {\n children: \"text\"\n }), \" is required.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_044\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"A card body \", _jsx(_components.code, {\n children: \"text\"\n }), \" is at most 160 chars.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_045\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"Card buttons may only be \", _jsx(_components.code, {\n children: \"QUICK_REPLY\"\n }), \", \", _jsx(_components.code, {\n children: \"URL\"\n }), \", or \", _jsx(_components.code, {\n children: \"PHONE_NUMBER\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_046\"\n })\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Carousel is create-only.\"\n }), \" Update Template does not accept a \", _jsx(_components.code, {\n children: \"carousel\"\n }), \" 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.\"]\n }), \"\\n\", _jsx(_components.h2, {\n children: \"Limited-time offer rules\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Sending \", _jsx(_components.code, {\n children: \"limitedTimeOffer\"\n }), \" narrows what the other components may contain. All enforced locally, \", _jsx(_components.code, {\n children: \"422\"\n }), \" before reaching Meta.\"]\n }), \"\\n\", _jsxs(_components.table, {\n children: [_jsx(_components.thead, {\n children: _jsxs(_components.tr, {\n children: [_jsx(_components.th, {\n children: \"Rule\"\n }), _jsx(_components.th, {\n children: \"Code\"\n })]\n })\n }), _jsxs(_components.tbody, {\n children: [_jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"category\"\n }), \" must be \", _jsx(_components.code, {\n children: \"MARKETING\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_048\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"body.text\"\n }), \" is required and cannot be empty.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_049\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"header.format\"\n }), \" may only be \", _jsx(_components.code, {\n children: \"NONE\"\n }), \", \", _jsx(_components.code, {\n children: \"IMAGE\"\n }), \", or \", _jsx(_components.code, {\n children: \"VIDEO\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_050\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"footer.text\"\n }), \" cannot be used.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_051\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [_jsx(_components.code, {\n children: \"carousel\"\n }), \" cannot be combined with a limited-time offer.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_052\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"Buttons may only be \", _jsx(_components.code, {\n children: \"COPY_CODE\"\n }), \" or \", _jsx(_components.code, {\n children: \"URL\"\n }), \".\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_053\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsxs(_components.td, {\n children: [\"At most one \", _jsx(_components.code, {\n children: \"COPY_CODE\"\n }), \" button.\"]\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_054\"\n })\n })]\n }), _jsxs(_components.tr, {\n children: [_jsx(_components.td, {\n children: \"At most two buttons in total (instead of the usual 10).\"\n }), _jsx(_components.td, {\n children: _jsx(_components.code, {\n children: \"WA_TPL_055\"\n })\n })]\n })]\n })]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The common pairing is one \", _jsx(_components.code, {\n children: \"COPY_CODE\"\n }), \" button carrying the coupon code plus one \", _jsx(_components.code, {\n children: \"URL\"\n }), \" button linking to the campaign — the maximum a limited-time offer allows.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Template","description":"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template's status is usually `PENDING`.\n\n## Category rules\n\n**AUTHENTICATION** — no `header`; no `body.text` (only `addSecurityRecommendation`); no `footer.text` (only `codeExpirationMinutes`); buttons may only be `OTP`.\n\n**UTILITY / MARKETING** — `body.text` is required; `addSecurityRecommendation` and `codeExpirationMinutes` cannot be used; `OTP` buttons are not allowed; `COPY_CODE` is allowed in `MARKETING` only.\n\nIn every category, the body and header cannot start or end with a variable, and the number of `examples` must equal the number of variables.\n\n**TTL ranges** for `messageSendTtlSeconds`: `UTILITY` 30–43200 (30s–12h), `MARKETING` 43200–2592000 (12h–30d), `AUTHENTICATION` 30–900 or `-1`.\n\n## Carousel rules\n\nSending `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.\n\n| Rule | Code |\n| --- | --- |\n| `category` must be `MARKETING`. | `WA_TPL_035` |\n| No top-level `header` (omit it, or send `format: \"NONE\"`). | `WA_TPL_036` |\n| No top-level `footer`. | `WA_TPL_037` |\n| No top-level `buttons` — they belong to each card. | `WA_TPL_038` |\n| Between 2 and 10 cards. | `WA_TPL_039` |\n| Every card must use the same header format (all `IMAGE` or all `VIDEO`). | `WA_TPL_040` |\n| Every card must have the same button types in the same order. | `WA_TPL_041` |\n| A card header must be `IMAGE` or `VIDEO`. | `WA_TPL_042` |\n| A card header must carry a media handle in `examples`. | `WA_TPL_043` |\n| A card body `text` is required. | `WA_TPL_044` |\n| A card body `text` is at most 160 chars. | `WA_TPL_045` |\n| Card buttons may only be `QUICK_REPLY`, `URL`, or `PHONE_NUMBER`. | `WA_TPL_046` |\n\n**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.\n\n## Limited-time offer rules\n\nSending `limitedTimeOffer` narrows what the other components may contain. All enforced locally, `422` before reaching Meta.\n\n| Rule | Code |\n| --- | --- |\n| `category` must be `MARKETING`. | `WA_TPL_048` |\n| `body.text` is required and cannot be empty. | `WA_TPL_049` |\n| `header.format` may only be `NONE`, `IMAGE`, or `VIDEO`. | `WA_TPL_050` |\n| `footer.text` cannot be used. | `WA_TPL_051` |\n| `carousel` cannot be combined with a limited-time offer. | `WA_TPL_052` |\n| Buttons may only be `COPY_CODE` or `URL`. | `WA_TPL_053` |\n| At most one `COPY_CODE` button. | `WA_TPL_054` |\n| At most two buttons in total (instead of the usual 10). | `WA_TPL_055` |\n\nThe 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.","deprecated":null,"version":null,"openapi":"/public-openapi.json post /wa/{app_id}/templates","href":"/api-reference/template/create-template","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Template"],"summary":"Create Template","operationId":"createTemplate","description":"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template's status is usually `PENDING`.\n\n## Category rules\n\n**AUTHENTICATION** — no `header`; no `body.text` (only `addSecurityRecommendation`); no `footer.text` (only `codeExpirationMinutes`); buttons may only be `OTP`.\n\n**UTILITY / MARKETING** — `body.text` is required; `addSecurityRecommendation` and `codeExpirationMinutes` cannot be used; `OTP` buttons are not allowed; `COPY_CODE` is allowed in `MARKETING` only.\n\nIn every category, the body and header cannot start or end with a variable, and the number of `examples` must equal the number of variables.\n\n**TTL ranges** for `messageSendTtlSeconds`: `UTILITY` 30–43200 (30s–12h), `MARKETING` 43200–2592000 (12h–30d), `AUTHENTICATION` 30–900 or `-1`.\n\n## Carousel rules\n\nSending `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.\n\n| Rule | Code |\n| --- | --- |\n| `category` must be `MARKETING`. | `WA_TPL_035` |\n| No top-level `header` (omit it, or send `format: \"NONE\"`). | `WA_TPL_036` |\n| No top-level `footer`. | `WA_TPL_037` |\n| No top-level `buttons` — they belong to each card. | `WA_TPL_038` |\n| Between 2 and 10 cards. | `WA_TPL_039` |\n| Every card must use the same header format (all `IMAGE` or all `VIDEO`). | `WA_TPL_040` |\n| Every card must have the same button types in the same order. | `WA_TPL_041` |\n| A card header must be `IMAGE` or `VIDEO`. | `WA_TPL_042` |\n| A card header must carry a media handle in `examples`. | `WA_TPL_043` |\n| A card body `text` is required. | `WA_TPL_044` |\n| A card body `text` is at most 160 chars. | `WA_TPL_045` |\n| Card buttons may only be `QUICK_REPLY`, `URL`, or `PHONE_NUMBER`. | `WA_TPL_046` |\n\n**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.\n\n## Limited-time offer rules\n\nSending `limitedTimeOffer` narrows what the other components may contain. All enforced locally, `422` before reaching Meta.\n\n| Rule | Code |\n| --- | --- |\n| `category` must be `MARKETING`. | `WA_TPL_048` |\n| `body.text` is required and cannot be empty. | `WA_TPL_049` |\n| `header.format` may only be `NONE`, `IMAGE`, or `VIDEO`. | `WA_TPL_050` |\n| `footer.text` cannot be used. | `WA_TPL_051` |\n| `carousel` cannot be combined with a limited-time offer. | `WA_TPL_052` |\n| Buttons may only be `COPY_CODE` or `URL`. | `WA_TPL_053` |\n| At most one `COPY_CODE` button. | `WA_TPL_054` |\n| At most two buttons in total (instead of the usual 10). | `WA_TPL_055` |\n\nThe 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.","parameters":["d6df5c51-1b74-4a5a-bd30-aeaaed8eb43c"],"requestBody":"1ffd5224-8819-42fc-bf66-293289f60f37","responses":{"200":"45813d37-1783-4262-a447-63ea8740e17c","400":"bd3c1645-0abc-4eb8-99b5-85f2cde9aecc","401":"c5fa7b85-2e2b-474b-8985-ca09589f3ba3","403":"fa0fe896-fb76-4bfa-a28c-ed10ae6dd0e9","404":"d54eb520-31c6-4bed-b240-dad74d34bc58","409":"cda3dbf7-fbb6-4264-bc98-396f3d6fb078","422":"3e712ff2-5c92-45fe-9f04-833ad9ca1914","429":"32cf3ff9-eec9-4650-8aa5-84d2d31e5841","502":"c8ff1432-8890-4129-af58-b147ee6acc5a"},"method":"post","type":"path","servers":["836c9e36-e4ae-4787-b197-acaa901d57e0"],"security":["146eaf30-1247-4c36-b793-049461a1bdc5"],"path":"/wa/{app_id}/templates","baseUrlOptions":["https://public-api.gateway.connexease.com/api/v1"],"title":"Create Template","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"d6df5c51-1b74-4a5a-bd30-aeaaed8eb43c":{"name":"app_id","in":"path","required":true,"description":"Application ID. Must belong to the organization resolved from your secret key, otherwise the request returns `404` with `APPLICATION_004`.","schema":{"type":"string","example":"app_7poyXj8GXuv76e","isRequired":true,"description":"Application ID. Must belong to the organization resolved from your secret key, otherwise the request returns `404` with `APPLICATION_004`.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","language","category","body"],"properties":{"name":{"type":"string","maxLength":512,"pattern":"^[a-z][a-z0-9_]*$","description":"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`.","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"language":{"type":"string","description":"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.","enum":["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"],"isRequired":true,"uniqueKey":"language","typeLabel":"enum\u003cstring>"},"category":{"type":"string","description":"Determines which components are allowed. `UTILITY` for transactional messages, `MARKETING` for promotional, `AUTHENTICATION` for one-time passcodes.","enum":["UTILITY","MARKETING","AUTHENTICATION"],"isRequired":true,"uniqueKey":"category","typeLabel":"enum\u003cstring>"},"body":{"type":"object","properties":{"text":{"type":"string","maxLength":1024,"description":"Supports `{{1}}`, `{{2}}` variables. Cannot start or end with a variable (`WA_TPL_011` / `WA_TPL_012`). Required for `UTILITY` and `MARKETING` (`WA_TPL_027`); not allowed for `AUTHENTICATION`, where Meta generates it (`WA_TPL_023`).","uniqueKey":"body.text","typeLabel":"string"},"examples":{"type":"array","items":{"type":"string","uniqueKey":"body.examples.items.[INDEX]","typeLabel":"string"},"description":"Example values for the variables, in order. The count must equal the number of variables (`WA_TPL_014`); variables with no examples at all are rejected with `WA_TPL_013`.","uniqueKey":"body.examples","typeLabel":"string[]"},"addSecurityRecommendation":{"type":"boolean","description":"`AUTHENTICATION` only (`WA_TPL_028`). Adds Meta's security recommendation text.","uniqueKey":"body.addSecurityRecommendation","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"body","typeLabel":"object"},"header":{"type":"object","properties":{"format":{"type":"string","description":"`NONE` is the default when `header` is omitted. `AUTHENTICATION` allows no header at all; a carousel card header must be `IMAGE` or `VIDEO`; a limited-time offer header is limited to `NONE` / `IMAGE` / `VIDEO`.","enum":["NONE","TEXT","IMAGE","VIDEO","DOCUMENT","LOCATION"],"uniqueKey":"header.format","typeLabel":"enum\u003cstring>"},"text":{"type":"string","maxLength":60,"description":"`TEXT` headers only. Cannot start or end with a variable (`WA_TPL_008` / `WA_TPL_009`). Sending it on a media or `LOCATION` header is rejected (`WA_TPL_010` / `WA_TPL_021`).","uniqueKey":"header.text","typeLabel":"string"},"examples":{"type":"array","items":{"type":"string","uniqueKey":"header.examples.items.[INDEX]","typeLabel":"string"},"description":"Variable example for a `TEXT` header; for media headers, the media handle from Upload Media.","uniqueKey":"header.examples","typeLabel":"string[]"}},"uniqueKey":"header","typeLabel":"object"},"footer":{"type":"object","properties":{"text":{"type":"string","maxLength":60,"description":"Not allowed in `AUTHENTICATION` (`WA_TPL_024`) or in a limited-time offer template (`WA_TPL_051`).","uniqueKey":"footer.text","typeLabel":"string"},"codeExpirationMinutes":{"type":"integer","minimum":1,"maximum":90,"description":"`AUTHENTICATION` only (`WA_TPL_029`). How long the code stays valid.","uniqueKey":"footer.codeExpirationMinutes","typeLabel":"integer"}},"uniqueKey":"footer","typeLabel":"object"},"buttons":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"type":{"type":"string","enum":["QUICK_REPLY","URL","PHONE_NUMBER","COPY_CODE","OTP"],"description":"`AUTHENTICATION` accepts only `OTP`; `UTILITY` accepts neither `OTP` nor `COPY_CODE`; `COPY_CODE` is `MARKETING`-only.","isRequired":true,"uniqueKey":"buttons.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","minLength":2,"maxLength":25,"description":"Required for `URL`, `PHONE_NUMBER`, and `QUICK_REPLY` (`WA_TPL_015`).","uniqueKey":"buttons.items.[INDEX].text","typeLabel":"string"},"url":{"type":"string","description":"`URL` type only, and required for it (`WA_TPL_001`). Must start with `https://` and may end in a `{{1}}` variable, in which case `example` is required. Cannot be combined with `phoneNumber` (`WA_TPL_002`).","uniqueKey":"buttons.items.[INDEX].url","typeLabel":"string"},"phoneNumber":{"type":"string","description":"`PHONE_NUMBER` type only, and required for it (`WA_TPL_003`). E.164 on the way in; Meta returns it in RFC3966 form (`tel:+90-555-...`). Cannot be combined with `url` (`WA_TPL_004`).","uniqueKey":"buttons.items.[INDEX].phoneNumber","typeLabel":"string"},"example":{"type":"array","items":{"type":"string","uniqueKey":"buttons.items.[INDEX].example.items.[INDEX]","typeLabel":"string"},"description":"Dynamic URL example, or the coupon code for `COPY_CODE` — required for that type (`WA_TPL_016`).","uniqueKey":"buttons.items.[INDEX].example","typeLabel":"string[]"},"otpType":{"type":"string","enum":["COPY_CODE","ONE_TAP","ZERO_TAP"],"description":"Required on `OTP` buttons (`WA_TPL_017`). `COPY_CODE` has the user copy the code manually; `ONE_TAP` reads it with one tap; `ZERO_TAP` delivers it with no user action.","uniqueKey":"buttons.items.[INDEX].otpType","typeLabel":"enum\u003cstring>"},"autofillText":{"type":"string","maxLength":25,"description":"Optional for `ONE_TAP` / `ZERO_TAP`.","uniqueKey":"buttons.items.[INDEX].autofillText","typeLabel":"string"},"packageName":{"type":"string","description":"Android package name. Required for `ONE_TAP` / `ZERO_TAP` (`WA_TPL_018`).","uniqueKey":"buttons.items.[INDEX].packageName","typeLabel":"string"},"signatureHash":{"type":"string","description":"Required for `ONE_TAP` / `ZERO_TAP` (`WA_TPL_019`).","uniqueKey":"buttons.items.[INDEX].signatureHash","typeLabel":"string"},"zeroTapTermsAccepted":{"type":"boolean","description":"Must be `true` on `ZERO_TAP` buttons (`WA_TPL_020`).","uniqueKey":"buttons.items.[INDEX].zeroTapTermsAccepted","typeLabel":"boolean"}},"required":["type"],"uniqueKey":"buttons.items.[INDEX]","typeLabel":"object"},"description":"Not allowed together with `carousel` — carousel buttons belong to each card.","uniqueKey":"buttons","typeLabel":"object[]"},"carousel":{"type":"array","minItems":2,"maxItems":10,"items":{"type":"object","description":"One carousel card. Every card must be structurally identical to the others: same header format, same button types in the same order.","properties":{"header":{"type":"object","properties":{"format":{"type":"string","description":"`NONE` is the default when `header` is omitted. `AUTHENTICATION` allows no header at all; a carousel card header must be `IMAGE` or `VIDEO`; a limited-time offer header is limited to `NONE` / `IMAGE` / `VIDEO`.","enum":["NONE","TEXT","IMAGE","VIDEO","DOCUMENT","LOCATION"],"uniqueKey":"carousel.items.[INDEX].header.format","typeLabel":"enum\u003cstring>"},"text":{"type":"string","maxLength":60,"description":"`TEXT` headers only. Cannot start or end with a variable (`WA_TPL_008` / `WA_TPL_009`). Sending it on a media or `LOCATION` header is rejected (`WA_TPL_010` / `WA_TPL_021`).","uniqueKey":"carousel.items.[INDEX].header.text","typeLabel":"string"},"examples":{"type":"array","items":{"type":"string","uniqueKey":"carousel.items.[INDEX].header.examples.items.[INDEX]","typeLabel":"string"},"description":"Variable example for a `TEXT` header; for media headers, the media handle from Upload Media.","uniqueKey":"carousel.items.[INDEX].header.examples","typeLabel":"string[]"}},"isRequired":true,"uniqueKey":"carousel.items.[INDEX].header","typeLabel":"object"},"body":{"type":"object","properties":{"text":{"type":"string","maxLength":1024,"description":"Supports `{{1}}`, `{{2}}` variables. Cannot start or end with a variable (`WA_TPL_011` / `WA_TPL_012`). Required for `UTILITY` and `MARKETING` (`WA_TPL_027`); not allowed for `AUTHENTICATION`, where Meta generates it (`WA_TPL_023`).","uniqueKey":"carousel.items.[INDEX].body.text","typeLabel":"string"},"examples":{"type":"array","items":{"type":"string","uniqueKey":"carousel.items.[INDEX].body.examples.items.[INDEX]","typeLabel":"string"},"description":"Example values for the variables, in order. The count must equal the number of variables (`WA_TPL_014`); variables with no examples at all are rejected with `WA_TPL_013`.","uniqueKey":"carousel.items.[INDEX].body.examples","typeLabel":"string[]"},"addSecurityRecommendation":{"type":"boolean","description":"`AUTHENTICATION` only (`WA_TPL_028`). Adds Meta's security recommendation text.","uniqueKey":"carousel.items.[INDEX].body.addSecurityRecommendation","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"carousel.items.[INDEX].body","typeLabel":"object"},"buttons":{"type":"array","minItems":1,"maxItems":2,"items":{"type":"object","properties":{"type":{"type":"string","enum":["QUICK_REPLY","URL","PHONE_NUMBER","COPY_CODE","OTP"],"description":"`AUTHENTICATION` accepts only `OTP`; `UTILITY` accepts neither `OTP` nor `COPY_CODE`; `COPY_CODE` is `MARKETING`-only.","isRequired":true,"uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","minLength":2,"maxLength":25,"description":"Required for `URL`, `PHONE_NUMBER`, and `QUICK_REPLY` (`WA_TPL_015`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].text","typeLabel":"string"},"url":{"type":"string","description":"`URL` type only, and required for it (`WA_TPL_001`). Must start with `https://` and may end in a `{{1}}` variable, in which case `example` is required. Cannot be combined with `phoneNumber` (`WA_TPL_002`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].url","typeLabel":"string"},"phoneNumber":{"type":"string","description":"`PHONE_NUMBER` type only, and required for it (`WA_TPL_003`). E.164 on the way in; Meta returns it in RFC3966 form (`tel:+90-555-...`). Cannot be combined with `url` (`WA_TPL_004`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].phoneNumber","typeLabel":"string"},"example":{"type":"array","items":{"type":"string","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].example.items.[INDEX]","typeLabel":"string"},"description":"Dynamic URL example, or the coupon code for `COPY_CODE` — required for that type (`WA_TPL_016`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].example","typeLabel":"string[]"},"otpType":{"type":"string","enum":["COPY_CODE","ONE_TAP","ZERO_TAP"],"description":"Required on `OTP` buttons (`WA_TPL_017`). `COPY_CODE` has the user copy the code manually; `ONE_TAP` reads it with one tap; `ZERO_TAP` delivers it with no user action.","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].otpType","typeLabel":"enum\u003cstring>"},"autofillText":{"type":"string","maxLength":25,"description":"Optional for `ONE_TAP` / `ZERO_TAP`.","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].autofillText","typeLabel":"string"},"packageName":{"type":"string","description":"Android package name. Required for `ONE_TAP` / `ZERO_TAP` (`WA_TPL_018`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].packageName","typeLabel":"string"},"signatureHash":{"type":"string","description":"Required for `ONE_TAP` / `ZERO_TAP` (`WA_TPL_019`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].signatureHash","typeLabel":"string"},"zeroTapTermsAccepted":{"type":"boolean","description":"Must be `true` on `ZERO_TAP` buttons (`WA_TPL_020`).","uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX].zeroTapTermsAccepted","typeLabel":"boolean"}},"required":["type"],"uniqueKey":"carousel.items.[INDEX].buttons.items.[INDEX]","typeLabel":"object"},"description":"Only `QUICK_REPLY`, `URL`, and `PHONE_NUMBER` are allowed (`WA_TPL_046`).","isRequired":true,"uniqueKey":"carousel.items.[INDEX].buttons","typeLabel":"object[]"}},"required":["header","body","buttons"],"uniqueKey":"carousel.items.[INDEX]","typeLabel":"object"},"description":"Turns the template into a carousel: a body bubble followed by 2–10 swipeable cards. `MARKETING` only.","uniqueKey":"carousel","typeLabel":"object[]"},"allowCategoryChange":{"type":"boolean","description":"When `true`, Meta may automatically re-classify the template's category.","uniqueKey":"allowCategoryChange","typeLabel":"boolean"},"messageSendTtlSeconds":{"type":"integer","description":"Message time-to-live. Valid range depends on the category — see the TTL ranges above.","uniqueKey":"messageSendTtlSeconds","typeLabel":"integer"},"limitedTimeOffer":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":16,"description":"Offer text on the banner, e.g. `Expiring offer!`.","isRequired":true,"uniqueKey":"limitedTimeOffer.text","typeLabel":"string"},"hasExpiration":{"type":"boolean","default":false,"description":"When `true`, WhatsApp renders a countdown. This only controls whether the countdown is shown — the expiration timestamp itself is supplied per message at send time, so one approved template can serve different deadlines.","uniqueKey":"limitedTimeOffer.hasExpiration","typeLabel":"boolean"}},"required":["text"],"uniqueKey":"limitedTimeOffer","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"utility":{"title":"utility","value":{"name":"shipping_update","language":"en","category":"UTILITY","body":{"text":"Hi {{1}}, your order {{2}} is on its way.","examples":["John","#12345"]}}},"utilityFull":{"title":"utilityFull","value":{"name":"order_confirmation","language":"en","category":"UTILITY","header":{"format":"TEXT","text":"Order #{{1}} confirmed","examples":["12345"]},"body":{"text":"Hello {{1}}, your order {{2}} has been confirmed. Estimated delivery is {{3}} business days.","examples":["John","#12345","3"]},"footer":{"text":"Sent via Connexease"},"buttons":[{"type":"URL","text":"Track Order","url":"https://example.com/track/{{1}}","example":["https://example.com/track/abc123"]},{"type":"PHONE_NUMBER","text":"Call Us","phoneNumber":"+905551234567"}]}},"marketingLimitedTimeOffer":{"title":"marketingLimitedTimeOffer","value":{"name":"flash_sale","language":"en","category":"MARKETING","header":{"format":"IMAGE","examples":["4::aW1hZ2UvcG5n:ARZ9k1sample_handle_value"]},"body":{"text":"Hi {{1}}, your flash discount is live. Use the code below before it expires.","examples":["John"]},"limitedTimeOffer":{"text":"Expiring offer!","hasExpiration":true},"buttons":[{"type":"COPY_CODE","example":["FLASH40"]},{"type":"URL","text":"Shop now","url":"https://example.com/flash"}]}},"marketingCarousel":{"title":"marketingCarousel","value":{"name":"summer_catalog","language":"en","category":"MARKETING","body":{"text":"Hi {{1}}, here are this week's picks.","examples":["John"]},"carousel":[{"header":{"format":"IMAGE","examples":["4::aW1hZ2UvcG5n:ARZ9k1card_one_handle"]},"body":{"text":"Linen shirts, now 30% off."},"buttons":[{"type":"URL","text":"View","url":"https://example.com/shirts"}]},{"header":{"format":"IMAGE","examples":["4::aW1hZ2UvcG5n:ARZ9k1card_two_handle"]},"body":{"text":"Summer dresses from $29."},"buttons":[{"type":"URL","text":"View","url":"https://example.com/dresses"}]}]}},"authentication":{"title":"authentication","value":{"name":"login_otp","language":"en","category":"AUTHENTICATION","body":{"addSecurityRecommendation":true},"footer":{"codeExpirationMinutes":10},"buttons":[{"type":"OTP","otpType":"COPY_CODE","text":"Copy code"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"45813d37-1783-4262-a447-63ea8740e17c":{"description":"The template was created and submitted for review.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","description":"Lean creation response. It does not carry `components`, `qualityScore`, `rejectedReason`, `parameterFormat`, or the DB id — fetch those with Get Template Detail or Get Templates.","properties":{"sourceId":{"type":"string","description":"The template's Meta ID.","uniqueKey":"data.sourceId","typeLabel":"string"},"name":{"type":"string","uniqueKey":"data.name","typeLabel":"string"},"language":{"type":"string","uniqueKey":"data.language","typeLabel":"string"},"category":{"type":"string","description":"Determines which components are allowed. `UTILITY` for transactional messages, `MARKETING` for promotional, `AUTHENTICATION` for one-time passcodes.","enum":["UTILITY","MARKETING","AUTHENTICATION"],"uniqueKey":"data.category","typeLabel":"enum\u003cstring>"},"status":{"type":"string","description":"Review and lifecycle status. `UNKNOWN` means Meta reported a status this API does not recognise.","enum":["APPROVED","PENDING","REJECTED","PAUSED","DISABLED","IN_APPEAL","PENDING_DELETION","DELETED","LIMIT_EXCEEDED","UNKNOWN"],"uniqueKey":"data.status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"data","typeLabel":"object"},"isSuccess":{"type":"boolean","enum":[true],"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"}},"uniqueKey":"","typeLabel":"object"},"example":{"data":{"sourceId":"1029384756123","name":"shipping_update","language":"en","category":"UTILITY","status":"PENDING"},"isSuccess":true},"examples":{"Example":{"title":"Example","value":{"data":{"sourceId":"1029384756123","name":"shipping_update","language":"en","category":"UTILITY","status":"PENDING"},"isSuccess":true}}},"exampleType":"examples"}},"exampleType":"examples"},"bd3c1645-0abc-4eb8-99b5-85f2cde9aecc":{"description":"Malformed request (`REQ_001`), or Meta rejected a parameter (`META_021`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"c5fa7b85-2e2b-474b-8985-ca09589f3ba3":{"description":"Secret key missing or invalid (`ORGANIZATION_SECRET_010` / `011`), or Meta token invalid or expired (`META_018`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"fa0fe896-fb76-4bfa-a28c-ed10ae6dd0e9":{"description":"Meta permission denied (`META_019`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"d54eb520-31c6-4bed-b240-dad74d34bc58":{"description":"`app_id` does not belong to the organization (`APPLICATION_004`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"cda3dbf7-fbb6-4264-bc98-396f3d6fb078":{"description":"A template with the same `name` and `language` already exists (`META_017`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"3e712ff2-5c92-45fe-9f04-833ad9ca1914":{"description":"Local validation before the request reaches Meta — button rules (`WA_TPL_001`–`005`, `015`–`020`), header rules (`WA_TPL_006`–`010`, `021`), body rules (`WA_TPL_011`–`014`), category rules (`WA_TPL_022`–`033`), the name pattern (`WA_TPL_034`), carousel rules (`WA_TPL_035`–`046`), and limited-time offer rules (`WA_TPL_048`–`055`). Meta-side validation also lands here: character limit (`META_022`), header / body / footer format (`META_023`–`025`), variable count or ratio (`META_026`), variable in first or last position (`META_027`), WABA migration conflict (`META_028`), other policy failures (`META_029`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"example":{"errors":{"code":"WA_TPL_051","group":"VALIDATION","description":"Limited-time offer templates do not support a footer."},"isSuccess":false},"examples":{"Example":{"title":"Example","value":{"errors":{"code":"WA_TPL_051","group":"VALIDATION","description":"Limited-time offer templates do not support a footer."},"isSuccess":false}}},"exampleType":"examples"}},"exampleType":"examples"},"32cf3ff9-eec9-4650-8aa5-84d2d31e5841":{"description":"Meta rate limit (`META_020`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"c8ff1432-8890-4129-af58-b147ee6acc5a":{"description":"General Meta-side creation failure (`META_003`).","content":{"application/json":{"schema":{"type":"object","description":"Every failure shares this shape. `description` already has any `params` interpolated into it.","properties":{"isSuccess":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"isSuccess","typeLabel":"enum\u003cboolean>"},"errors":{"type":"object","properties":{"code":{"type":"string","description":"`VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`, `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.","example":"META_075","isRequired":true,"uniqueKey":"errors.code","typeLabel":"string"},"group":{"type":"string","enum":["VALIDATION","NOT_FOUND","CONFLICT","AUTHENTICATION","NOT_ALLOWED","LIMIT_EXCEEDED","SERVICE_UNAVAILABLE","SYSTEM"],"isRequired":true,"uniqueKey":"errors.group","typeLabel":"enum\u003cstring>"},"description":{"type":"string","example":"Template with 0000000000 not found in Meta.","isRequired":true,"uniqueKey":"errors.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"description":"Raw values interpolated into `description`. Present only on parametric messages.","uniqueKey":"errors.params","typeLabel":"object"},"fields":{"type":"object","description":"Field-level validation errors only. Field name (dot-joined for nested fields, list indices omitted) to its own `code` / `description` / `params`.","additionalProperties":{"type":"object","properties":{"code":{"type":"string","uniqueKey":"errors.fields.additionalProperties.code","typeLabel":"string"},"description":{"type":"string","uniqueKey":"errors.fields.additionalProperties.description","typeLabel":"string"},"params":{"type":"object","additionalProperties":true,"uniqueKey":"errors.fields.additionalProperties.params","typeLabel":"object"}},"uniqueKey":"errors.fields.additionalProperties","typeLabel":"object"},"uniqueKey":"errors.fields","typeLabel":"object"}},"required":["code","group","description"],"isRequired":true,"uniqueKey":"errors","typeLabel":"object"}},"required":["isSuccess","errors"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"isSuccess":false,"errors":{"code":"META_075","group":"VALIDATION","description":"Template with 0000000000 not found in Meta.","params":{},"fields":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"146eaf30-1247-4c36-b793-049461a1bdc5":{"secretKey":{"type":"http","scheme":"bearer","description":"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.","scopes":[]}}},"servers":{"836c9e36-e4ae-4787-b197-acaa901d57e0":{"url":"https://public-api.gateway.connexease.com/api/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"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.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"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.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"secretKey","name":"Authorization"}],"title":"secretKey"}]},"originalFileLocation":"public-openapi.json"},"subdomain":"connexease","siteName":"Connexease Gateway","title":"Create Template - Connexease Gateway","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-19T22:47:35.483Z","originalFileLocation":"api-reference/template/create-template.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template\u0026#x27;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: \u0026quot;NONE\u0026quot;). | 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\u0026#x27;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.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Connexease Gateway\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Template - Connexease Gateway\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template\u0026#x27;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: \u0026quot;NONE\u0026quot;). | 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\u0026#x27;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.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Connexease Gateway\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gateway.connexease.com/api-reference/template/create-template\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://connexease.mintlify.site/_mintlify/api/og/v2?division=Template\u0026amp;title=Create+Template\u0026amp;description=Creates+a+WhatsApp+message+template+and+submits+it+to+Meta+for+approval.+A+newly+created+template%27s+status+is+usually+%60PENDING%60.%0A%0A%23%23+Category+rules%0A%0A**AUTHENTIC\u0026amp;theme=4e51867b3ccbb8ea3c651493\u0026amp;signature=3af58e8af412c708692296dfad3fabbcee6b53cff66d3686a058453be41d4702\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Template - Connexease Gateway\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a WhatsApp message template and submits it to Meta for approval. A newly created template\u0026#x27;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: \u0026quot;NONE\u0026quot;). | 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\u0026#x27;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.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://connexease.mintlify.site/_mintlify/api/og/v2?division=Template\u0026amp;title=Create+Template\u0026amp;description=Creates+a+WhatsApp+message+template+and+submits+it+to+Meta+for+approval.+A+newly+created+template%27s+status+is+usually+%60PENDING%60.%0A%0A%23%23+Category+rules%0A%0A**AUTHENTIC\u0026amp;theme=4e51867b3ccbb8ea3c651493\u0026amp;signature=3af58e8af412c708692296dfad3fabbcee6b53cff66d3686a058453be41d4702\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/connexease/Tuf280V-aVK-hLg7/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Connexease Gateway\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0B0C36\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gateway.connexease.com/api-reference/template/create-template\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/template/create-template.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gateway.connexease.com/#organization\",\"name\":\"Connexease Gateway\",\"url\":\"https://docs.gateway.connexease.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/connexease/yT3a9JqKtN8wzcNE/images/logo_dark_with_text.svg?fit=max\u0026auto=format\u0026n=yT3a9JqKtN8wzcNE\u0026q=85\u0026s=c157f165c8033b5d3b64eac2abbc86c9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gateway.connexease.com#website\",\"name\":\"Connexease Gateway\",\"url\":\"https://docs.gateway.connexease.com\",\"publisher\":{\"@id\":\"https://docs.gateway.connexease.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gateway.connexease.com/api-reference/template/create-template#webpage\",\"url\":\"https://docs.gateway.connexease.com/api-reference/template/create-template\",\"name\":\"Create Template\",\"description\":\"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.\",\"dateModified\":\"2026-09-19T22:47:35.483Z\",\"isPartOf\":{\"@id\":\"https://docs.gateway.connexease.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gateway.connexease.com/api-reference/template/create-template#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gateway.connexease.com/api-reference/template/create-template#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Sandbox Public API\",\"item\":\"https://docs.gateway.connexease.com/api-reference/developers/get-webhook\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Template\",\"item\":\"https://docs.gateway.connexease.com/api-reference/template/get-templates\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Create Template\",\"item\":\"https://docs.gateway.connexease.com/api-reference/template/create-template\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gateway.connexease.com/api-reference/template/create-template#apireference\",\"headline\":\"Create Template\",\"name\":\"Create Template\",\"description\":\"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.\",\"url\":\"https://docs.gateway.connexease.com/api-reference/template/create-template\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gateway.connexease.com/api-reference/template/create-template#webpage\"},\"dateModified\":\"2026-09-19T22:47:35.483Z\",\"publisher\":{\"@id\":\"https://docs.gateway.connexease.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gateway.connexease.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Connexease Gateway\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Connexease Gateway","nav":{"global":null,"tabs":[{"tab":"Gateway Dashboard","pages":[{"title":"Gateway Dashboard","href":"/dashboard/login"}]},{"tab":"Integration Guides","pages":[{"title":"Integration Guides","href":"/quickstart"}]},{"tab":"Messaging API","pages":[{"title":"Messaging API","href":"/api-reference/send-whatsapp-message"}]},{"tab":"Public API","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/public-api-reference/getting-started"}]},{"group":"Sandbox","pages":[]},{"group":"Sandbox Public API","pages":[{"group":"Developers","pages":[{"title":"Get Webhook","deprecated":null,"version":null,"openapi":"/public-openapi.json get /apps/{app_id}/webhook","href":"/api-reference/developers/get-webhook"},{"title":"Update Webhook","deprecated":null,"version":null,"openapi":"/public-openapi.json post /apps/{app_id}/webhook","href":"/api-reference/developers/update-webhook"},{"title":"Create API Key","deprecated":null,"version":null,"openapi":"/public-openapi.json post /apps/{app_id}/api-keys","href":"/api-reference/developers/create-api-key"}]},{"group":"Media","pages":[{"title":"Upload Media","deprecated":null,"version":null,"openapi":"/public-openapi.json post /wa/{app_id}/media/upload","href":"/api-reference/media/upload-media"}]},{"group":"Application","pages":[{"title":"Get Business Profile","deprecated":null,"version":null,"openapi":"/public-openapi.json get /wa/{app_id}/profile","href":"/api-reference/application/get-business-profile"},{"title":"Update Business Profile","deprecated":null,"version":null,"openapi":"/public-openapi.json patch /wa/{app_id}/profile","href":"/api-reference/application/update-business-profile"}]},{"group":"Analytics","pages":[{"title":"Get Messages","deprecated":null,"version":null,"openapi":"/public-openapi.json get /wa/analytics/messages","href":"/api-reference/analytics/get-messages"}]},{"group":"Template","pages":[{"title":"Get Templates","description":"Lists an application's WhatsApp templates with cursor pagination, status / category / language filters, name-or-content search, and optional component expansion.\n\nRead fresh directly from Meta, with no caching.\n\n**Pagination.** Do not pass a cursor on the first request. Take `pagingMetadata.nextCursor` from the response and send it as `after` on the next one. An empty result returns `\"data\": []` with `pageSize: 0`.","deprecated":null,"version":null,"openapi":"/public-openapi.json get /wa/{app_id}/templates","href":"/api-reference/template/get-templates"},{"title":"Create Template","deprecated":null,"version":null,"openapi":"/public-openapi.json post /wa/{app_id}/templates","href":"/api-reference/template/create-template"},{"title":"Get Template Metrics","description":"Returns Meta's template analytics for up to 10 templates of a single application: an overall `summary`, a per-template `summary`, and a daily `series`.\n\n**Gap-filled buckets.** Days Meta returns no data for are emitted as zero points, so the series is always continuous across the requested range.\n\n**Pending days.** Zero buckets that fall after Meta's `dataAvailableUntil` watermark are flagged `isPending: true`, telling you the day is not yet aggregated rather than genuinely empty.\n\n**Derived rates.** `deliveredRate`, `readRate`, `clickRate`, and `costPerDelivered` are computed for you — rates to 4 decimals, `amountSpent` to 6. Rates are always recomputed from the totals, never averaged from the buckets.\n\n**Invariants.** `Σ series[].sent == summary.sent` for each template, and the same holds for `delivered`, `read`, `clicked`, and `amountSpent`. The top-level `summary` is the sum of every template summary.\n\n**Limits.** At most 10 `templateId` values and at most a 90-day range per request; split larger reports into several calls.\n\nThis endpoint is per-application and per-template. For organization-wide message volume, use Get Messages instead.\n\nNote that this path is matched before `/wa/{app_id}/templates/{source_id}`, so `metrics` is never treated as a template ID.","deprecated":null,"version":null,"openapi":"/public-openapi.json get /wa/{app_id}/templates/metrics","href":"/api-reference/template/get-template-metrics"},{"title":"Get Template Detail","deprecated":null,"version":null,"openapi":"/public-openapi.json get /wa/{app_id}/templates/{source_id}","href":"/api-reference/template/get-template-detail"},{"title":"Update Template","deprecated":null,"version":null,"openapi":"/public-openapi.json post /wa/{app_id}/templates/{source_id}","href":"/api-reference/template/update-template"},{"title":"Delete Template","deprecated":null,"version":null,"openapi":"/public-openapi.json delete /wa/{app_id}/templates/{source_id}","href":"/api-reference/template/delete-template"}]}]},{"group":"Analytics","pages":[{"title":"Get Messages","href":"/public-api-reference/analytics/get-messages"},{"group":"Reference","pages":[{"title":"Enums","href":"/public-api-reference/analytics/reference/enums"}]}]},{"group":"Application","pages":[{"title":"Get Business Profile","href":"/public-api-reference/application/get-business-profile"},{"title":"Update Business Profile","href":"/public-api-reference/application/update-business-profile"},{"group":"Reference","pages":[{"title":"Enums","href":"/public-api-reference/application/reference/enums"}]}]},{"group":"Template","pages":[{"title":"Create Template","href":"/public-api-reference/template/create-template"},{"title":"Get Templates","href":"/public-api-reference/template/get-templates"},{"title":"Get Template Detail","href":"/public-api-reference/template/get-template-detail"},{"title":"Update Template","href":"/public-api-reference/template/update-template"},{"title":"Delete Template","href":"/public-api-reference/template/delete-template"},{"title":"Get Template Metrics","href":"/public-api-reference/template/get-template-metrics"},{"group":"Reference","pages":[{"title":"Enums","href":"/public-api-reference/template/reference/enums"}]}]},{"group":"Media","pages":[{"title":"Upload Media","href":"/public-api-reference/media/upload-media"},{"group":"Reference","pages":[{"title":"Enums","href":"/public-api-reference/media/reference/enums"}]}]},{"group":"Developers","pages":[{"title":"Get Webhook","href":"/public-api-reference/developers/get-webhook"},{"title":"Update Webhook","href":"/public-api-reference/developers/update-webhook"},{"title":"Create API Key","href":"/public-api-reference/developers/create-api-key"},{"group":"Reference","pages":[{"title":"Enums","href":"/public-api-reference/developers/reference/enums"}]}]},{"group":"Reference","pages":[{"title":"Error Codes","href":"/public-api-reference/reference/error-codes"}]}]},{"tab":"Embedded Signup","pages":[{"title":"Embedded Signup","href":"/public-embedded-signup-sdk/overview"}]},{"tab":"AI Plugin and MCP","pages":[{"title":"AI Plugin and MCP","href":"/connexease-gateway-customer-mcp-muesteri-kurulum-ve-kullanim-kilavuzu-sueruem-0-11-0-son-kontrol-9-ekim-2026-kaynak-kodu-connexease-gateway-customer-mcp-https-github-com-connexease-connexease-gate"}]}]},"basePath":"","title":"Create Template - Connexease Gateway","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-Dr40SSJq.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","clsx-DK3K4Z1S.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DE3EVdvd.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-fN9H9n9g.js"]}