Cria um template e o envia para análise da Meta. O template é criado com status PENDING e só pode ser utilizado em envios após ser aprovado. A resposta retorna o id do template:
A Meta reclassifica o template quando o conteúdo não corresponde à categoria informada. Um conteúdo promocional enviado como UTILITY é convertido para MARKETING. Se já existir uma versão daquele template em outra categoria, a criação falha com “A categoria MARKETING não corresponde à categoria já associada a este modelo, UTILITY”.
As variáveis do template podem ser numeradas ou identificadas por nome. O formato é definido pelo campo parameter_format, que assume POSITIONAL quando não é informado.
{ "parameter_format": "POSITIONAL", "components": [ { "type": "BODY", "text": "Olá, {{1}}. O equipamento da ordem de serviço {{2}} está pronto para retirada.", "example": { "body_text": [["Rafael", "7539"]] } } ]}
{ "parameter_format": "NAMED", "components": [ { "type": "BODY", "text": "Olá, {{nome}}. O equipamento da ordem de serviço {{numero_os}} está pronto para retirada.", "example": { "body_text_named_params": [ { "param_name": "nome", "example": "Rafael" }, { "param_name": "numero_os", "example": "7539" } ] } } ]}
As diferenças entre os dois formatos:
Posicional
Nomeado
parameter_format
POSITIONAL (padrão)
NAMED
Marcação no texto
{{1}}, {{2}}
{{nome}}, {{numero_os}}
Campo do exemplo
body_text
body_text_named_params
Ordem no envio
Os valores seguem a numeração
Cada valor indica o parameter_name correspondente
Os nomes de parâmetro aceitam apenas letras minúsculas, números e sublinhado. Os dois formatos não podem ser combinados no mesmo template: um texto com {{nome}} e {{1}} é aceito na criação e reprovado na análise.
O formato escolhido na criação determina como as variáveis são preenchidas no envio, descrito em Enviar template.
Toda variável precisa de um valor de exemplo, utilizado na análise do template. O comportamento difere conforme o formato:
No formato nomeado, a ausência de body_text_named_params retorna HTTP 400 com a mensagem “o componente do tipo BODY não contém o(s) campo(s) esperado(s) (example)”.
No formato posicional, a ausência de body_text não gera erro na requisição: a resposta é HTTP 200, o template é criado e passa para REJECTED, com rejected_reason igual a INVALID_FORMAT.
{ "type": "BODY", "text": "Olá, {{1}}. Seu pedido {{2}} foi enviado.", "example": { "body_text": [["Rafael", "7539"]] }}
{ "type": "BODY", "text": "Olá, {{1}}. Seu pedido {{2}} foi enviado."}
Um template reprovado pode ser corrigido em Editar template, sem necessidade de outro nome.
Formato das variáveis: POSITIONAL usa {{1}}, {{2}}; NAMED usa {{nome}} e exige body_text_named_params no exemplo.
Opções disponíveis:
POSITIONAL,
NAMED
Exemplo:
"POSITIONAL"
Resposta
Template criado e enviado para análise.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Datafy API","colors":{"primary":"#25d366","light":"#25d366","dark":"#1fbf5a"},"logo":{"light":"https://mintcdn.com/datafy/q5EgWQ3VyWRmoApU/logo/light.svg?fit=max\u0026auto=format\u0026n=q5EgWQ3VyWRmoApU\u0026q=85\u0026s=3661d9e5deccd66d923760d0935cdb8a","dark":"https://mintcdn.com/datafy/q5EgWQ3VyWRmoApU/logo/dark.svg?fit=max\u0026auto=format\u0026n=q5EgWQ3VyWRmoApU\u0026q=85\u0026s=fdc634e59652b4c8cead22c408309cba"},"favicon":"https://mintcdn.com/datafy/q5EgWQ3VyWRmoApU/favicon.jpg?fit=max\u0026auto=format\u0026n=q5EgWQ3VyWRmoApU\u0026q=85\u0026s=45d89e34fc229c98c0b7814e9e47fb16","api":{"playground":{"proxy":false},"examples":{"languages":["curl","javascript","python"],"prefill":true},"mdx":{"auth":{"method":"bearer"},"server":"https://cloud.datafyapi.com.br"}},"background":{"color":{"light":"#fbfbfa","dark":"#0a0a0a"}},"navbar":{"primary":{"type":"button","label":"Acessar painel","href":"https://app.datafyapi.com.br"}},"footer":{"links":[{"header":"Datafy API","items":[{"label":"Site","href":"https://datafyapi.com.br"},{"label":"Painel","href":"https://app.datafyapi.com.br"}]}]},"fonts":{"family":"Geist"},"contextual":{"options":["copy","view","chatgpt","claude","download-spec","download-pdf"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","href":""}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"datafy","hasAudioNarration":false,"actualSubdomain":"datafy","customDomains":["developers.datafyapi.com.br"],"gitSource":{"type":"github","owner":"israelhenriquee","repo":"docdatafyapi","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae28cc733caf2974503f0e9","collectionId":"e978dc55-7355-4f8d-a104-2950bcd8af90","liveDeploymentHistoryId":"6ae28cc733caf2974503f0e9","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ae28cc733caf2974503f0e9","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"pt-BR","tag":"API WhatsApp","count":68},{"language":"pt-BR","tag":"API Instagram","count":38},{"language":"pt-BR","tag":"Mensagens","count":25},{"language":"pt-BR","tag":"Guias","count":24},{"language":"pt-BR","tag":"Administração","count":21},{"language":"pt-BR","tag":"Webhooks","count":19},{"language":"pt-BR","tag":"Eventos","count":14},{"language":"pt-BR","tag":"Canais","count":8},{"language":"pt-BR","tag":"Comentários","count":8},{"language":"pt-BR","tag":"Começar","count":8}]},"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":"vite-origin","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":"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}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--font-mono: \"Geist Mono\", ui-monospace, \"JetBrains Mono\", monospace}html,body{font-feature-settings:\"cv11\", \"ss01\", \"ss03\";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code,pre,kbd,samp,.font-mono{font-family:var(--font-mono);font-feature-settings:\"zero\", \"ss01\"}:root{--datafy-text: #0a0a0a;--datafy-text-muted: #545454;--datafy-border: #e8e8e3;--datafy-accent-soft: rgba(37, 211, 102, 0.1)}:root.dark{--datafy-text: #f5f5f6;--datafy-text-muted: #a1a1a6;--datafy-border: #232326;--datafy-accent-soft: rgba(37, 211, 102, 0.12)}body{color:var(--datafy-text)}.prose{--tw-prose-body: var(--datafy-text-muted);--tw-prose-headings: var(--datafy-text);--tw-prose-bold: var(--datafy-text);--tw-prose-quotes: var(--datafy-text);--tw-prose-hr: var(--datafy-border);--tw-prose-th-borders: var(--datafy-border);--tw-prose-td-borders: var(--datafy-border);--tw-prose-invert-body: var(--datafy-text-muted);--tw-prose-invert-headings: var(--datafy-text);--tw-prose-invert-bold: var(--datafy-text);--tw-prose-invert-quotes: var(--datafy-text);--tw-prose-invert-hr: var(--datafy-border);--tw-prose-invert-th-borders: var(--datafy-border);--tw-prose-invert-td-borders: var(--datafy-border)}::selection{background:var(--datafy-accent-soft);color:var(--datafy-text)}#content{font-size:16px;line-height:1.65}#page-title{font-size:32px;line-height:1.25;letter-spacing:-0.025em}#content h2{font-size:24px;line-height:1.35}#content h3{font-size:20px;line-height:1.4}#navigation-items{font-size:15px;line-height:1.5}#navigation-items a[aria-current=\"page\"]{color:var(--datafy-text);background-color:var(--datafy-accent-soft);font-weight:600;text-shadow:none}[data-component-part=\"localization-select-trigger\"]{display:none!important}[data-testid=\"try-it-button\"]>span{display:none}[data-testid=\"try-it-button\"]::before{content:\"Testar\"}#navigation-items [class*=\"text-[0.55rem]\"],#navigation-items span[class*=\"rounded-md\"][class*=\"font-bold\"]{white-space:nowrap}"}],"page":{"pagePath":"api-reference/whatsapp/templates/criar-template","slug":"/api-reference/whatsapp/templates/criar-template","pageMetadata":{"title":"Criar template","openapi":"api-reference/whatsapp/openapi.json POST /v1/{waba_id}/message_templates","description":"Espelho de `POST /{waba_id}/message_templates` da Meta Cloud API. O template é enviado para análise da Meta.","href":"/api-reference/whatsapp/templates/criar-template"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Espelho de \", _jsx(_components.code, {\n children: \"POST /{waba_id}/message_templates\"\n }), \" da Meta Cloud API. O template é enviado para análise da Meta.\"]\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Note,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Cria um template e o envia para análise da Meta. O template é criado com status `,_jsx(_components.code,{children:`PENDING`}),` e só pode ser utilizado em envios após ser aprovado. A resposta retorna o `,_jsx(_components.code,{children:`id`}),` do template:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5400801403478858\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PENDING\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UTILITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A alteração de status é informada pelo webhook `,_jsx(_components.a,{href:`/api-reference/whatsapp/webhooks/eventos/templates`,children:_jsx(_components.code,{children:`message_template_status_update`})}),`, o que dispensa a consulta periódica à listagem.`]}),`\n`,_jsx(Heading,{level:`2`,id:`nome`,children:`Nome`}),`\n`,_jsx(_components.p,{children:`O nome identifica o template no envio e aceita apenas letras minúsculas, números e sublinhado, sem espaços e sem acentos:`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Aceito`,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pedido_pronto`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`retirada_equipamento_2`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(CodeBlock,{filename:`Recusado`,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Pedido Pronto`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`retirada-equipamento`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})})]}),`\n`,_jsx(_components.p,{children:`O mesmo nome pode existir em vários idiomas, e cada idioma é analisado separadamente. A combinação de nome e idioma não pode ser repetida.`}),`\n`,_jsx(Heading,{level:`2`,id:`categoria`,children:`Categoria`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Categoria`}),_jsx(_components.th,{children:`Finalidade`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UTILITY`})}),_jsx(_components.td,{children:`Mensagens referentes a uma transação existente: confirmação de pedido, aviso de entrega, cobrança`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MARKETING`})}),_jsx(_components.td,{children:`Ofertas, novidades, convites e demais conteúdos promocionais`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AUTHENTICATION`})}),_jsx(_components.td,{children:`Códigos de verificação`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A categoria determina o preço e as regras de envio. As definições estão na `,_jsx(_components.a,{href:`https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/overview`,children:`visão geral de templates da Meta`}),`, e as regras específicas de marketing em `,_jsx(_components.a,{href:`https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/marketing-templates/custom-marketing-templates`,children:`templates de marketing personalizados`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`A Meta reclassifica o template quando o conteúdo não corresponde à categoria informada. Um conteúdo promocional enviado como `,_jsx(_components.code,{children:`UTILITY`}),` é convertido para `,_jsx(_components.code,{children:`MARKETING`}),`. Se já existir uma versão daquele template em outra categoria, a criação falha com “A categoria MARKETING não corresponde à categoria já associada a este modelo, UTILITY”.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`componentes`,children:`Componentes`}),`\n`,_jsxs(_components.p,{children:[`O corpo (`,_jsx(_components.code,{children:`BODY`}),`) é obrigatório. Cabeçalho (`,_jsx(_components.code,{children:`HEADER`}),`), rodapé (`,_jsx(_components.code,{children:`FOOTER`}),`) e botões (`,_jsx(_components.code,{children:`BUTTONS`}),`) são opcionais.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"retirada_equipamento\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"language\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pt_BR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"category\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UTILITY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"components\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BODY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Olá, {{1}}. O equipamento da ordem de serviço {{2}} está pronto para retirada.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"body_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rafael\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7539\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FOOTER\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Assistência Técnica Datafy\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Para cabeçalho com imagem, vídeo ou documento, a Meta exige um `,_jsx(_components.code,{children:`header_handle`}),` no lugar da URL. Gere esse valor com `,_jsx(_components.a,{href:`/api-reference/whatsapp/datafy/gerar-handle-de-arquivo`,children:`Gerar handle de arquivo`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`variáveis-posicionais-ou-nomeadas`,children:`Variáveis posicionais ou nomeadas`}),`\n`,_jsxs(_components.p,{children:[`As variáveis do template podem ser numeradas ou identificadas por nome. O formato é definido pelo campo `,_jsx(_components.code,{children:`parameter_format`}),`, que assume `,_jsx(_components.code,{children:`POSITIONAL`}),` quando não é informado.`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Posicional`,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parameter_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POSITIONAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"components\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BODY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Olá, {{1}}. O equipamento da ordem de serviço {{2}} está pronto para retirada.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"body_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rafael\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7539\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Nomeado`,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parameter_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NAMED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"components\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BODY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Olá, {{nome}}. O equipamento da ordem de serviço {{numero_os}} está pronto para retirada.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"body_text_named_params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"param_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"nome\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rafael\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"param_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"numero_os\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7539\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`As diferenças entre os dois formatos:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Posicional`}),_jsx(_components.th,{children:`Nomeado`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`parameter_format`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`POSITIONAL`}),` (padrão)`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`NAMED`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Marcação no texto`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`{{1}}`}),`, `,_jsx(_components.code,{children:`{{2}}`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`{{nome}}`}),`, `,_jsx(_components.code,{children:`{{numero_os}}`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Campo do exemplo`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`body_text`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`body_text_named_params`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Ordem no envio`}),_jsx(_components.td,{children:`Os valores seguem a numeração`}),_jsxs(_components.td,{children:[`Cada valor indica o `,_jsx(_components.code,{children:`parameter_name`}),` correspondente`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Os nomes de parâmetro aceitam apenas letras minúsculas, números e sublinhado. Os dois formatos não podem ser combinados no mesmo template: um texto com `,_jsx(_components.code,{children:`{{nome}}`}),` e `,_jsx(_components.code,{children:`{{1}}`}),` é aceito na criação e reprovado na análise.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`O formato escolhido na criação determina como as variáveis são preenchidas no envio, descrito em `,_jsx(_components.a,{href:`/api-reference/whatsapp/templates/enviar-template`,children:`Enviar template`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`exemplo-das-variáveis`,children:`Exemplo das variáveis`}),`\n`,_jsx(_components.p,{children:`Toda variável precisa de um valor de exemplo, utilizado na análise do template. O comportamento difere conforme o formato:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`No formato nomeado, a ausência de `,_jsx(_components.code,{children:`body_text_named_params`}),` retorna `,_jsx(_components.code,{children:`HTTP 400`}),` com a mensagem “o componente do tipo BODY não contém o(s) campo(s) esperado(s) (example)”.`]}),`\n`,_jsxs(_components.li,{children:[`No formato posicional, a ausência de `,_jsx(_components.code,{children:`body_text`}),` não gera erro na requisição: a resposta é `,_jsx(_components.code,{children:`HTTP 200`}),`, o template é criado e passa para `,_jsx(_components.code,{children:`REJECTED`}),`, com `,_jsx(_components.code,{children:`rejected_reason`}),` igual a `,_jsx(_components.code,{children:`INVALID_FORMAT`}),`.`]}),`\n`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Com exemplo`,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BODY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Olá, {{1}}. Seu pedido {{2}} foi enviado.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"example\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"body_text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Rafael\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"7539\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Reprovado na análise`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"BODY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Olá, {{1}}. Seu pedido {{2}} foi enviado.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`Um template reprovado pode ser corrigido em `,_jsx(_components.a,{href:`/api-reference/whatsapp/templates/editar-template`,children:`Editar template`}),`, sem necessidade de outro nome.`]}),`\n`,_jsx(Heading,{level:`2`,id:`erros-comuns`,children:`Erros comuns`}),`\n`,_jsxs(_components.p,{children:[`A Meta retorna a descrição em `,_jsx(_components.code,{children:`error_user_msg`}),`, em português:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Situação`}),_jsx(_components.th,{children:`Mensagem da Meta`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Nome com maiúscula, espaço ou hífen`}),_jsx(_components.td,{children:`”O nome do modelo de mensagem só pode ter letras minúsculas e sublinhados.”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Nome e idioma já utilizados`}),_jsx(_components.td,{children:`”Já existe conteúdo em Portuguese (BR) para esse modelo. Você pode criar um novo modelo e tentar novamente.”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Categoria diferente da já registrada`}),_jsx(_components.td,{children:`”A categoria MARKETING não corresponde à categoria já associada a este modelo, UTILITY.”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Exemplo ausente ou incompatível com o formato das variáveis`}),_jsx(_components.td,{children:`”o componente do tipo BODY não contém o(s) campo(s) esperado(s) (example)”`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`As regras de formato e os limites de cada componente estão em `,_jsx(_components.a,{href:`https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/template-management`,children:`gerenciamento de templates da Meta`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Criar template","openapi":"api-reference/whatsapp/openapi.json POST /v1/{waba_id}/message_templates","description":"Espelho de `POST /{waba_id}/message_templates` da Meta Cloud API. O template é enviado para análise da Meta.","href":"/api-reference/whatsapp/templates/criar-template"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Nome","slug":"nome","depth":2,"children":[]},{"title":"Categoria","slug":"categoria","depth":2,"children":[]},{"title":"Componentes","slug":"componentes","depth":2,"children":[]},{"title":"Variáveis posicionais ou nomeadas","slug":"variáveis-posicionais-ou-nomeadas","depth":2,"children":[]},{"title":"Exemplo das variáveis","slug":"exemplo-das-variáveis","depth":2,"children":[]},{"title":"Erros comuns","slug":"erros-comuns","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/datafy/105cadfd9286f76d/playground.js"],"openApiReferenceData":{"operation":{"tags":["Templates"],"summary":"Criar template","operationId":"criarTemplate","description":"Espelho de `POST /{waba_id}/message_templates` da Meta Cloud API. O template é enviado para análise da Meta.","externalDocs":{"description":"Referência de templates da Meta","url":"https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates"},"parameters":["eef707e5-9fd5-4b31-9e98-ff8810f74cb2"],"requestBody":"3509ea68-d1bb-4526-8b5c-3e7bba82efd0","responses":{"200":"28c02e58-f56d-48f3-8fb6-468766d8450f","400":"faed2553-64c4-4944-af2f-b7b0ebf29732","401":"a0ec870e-a95a-4b84-bb71-decf74503e72","402":"4744d7aa-ff73-4fe4-8e72-02fe9dd15650","429":"c36d0cd3-81ae-4e53-99c4-5a7b983796ba"},"method":"post","type":"path","servers":["fb2a2518-3e45-4a1d-af53-8b27e45755ce"],"security":["1d7699fa-0f9a-4db3-a31b-6b89e3d2ae9d"],"path":"/v1/{waba_id}/message_templates","baseUrlOptions":["https://cloud.datafyapi.com.br"],"title":"Criar template","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.name":"pedido_pronto","body.language":"pt_BR","body.category":"UTILITY","body.components.items.0":{"type":"BODY","text":"Olá, {{1}}. O equipamento da ordem de serviço {{2}} está pronto para retirada.","example":{"body_text":[["Rafael","7539"]]}}},{"body.name":"oferta_semana","body.language":"pt_BR","body.category":"MARKETING","body.components.items.0":{"type":"HEADER","format":"IMAGE","example":{"header_handle":["4::aW1hZ2UvanBlZw==:ARb..."]}},"body.components.items.1":{"type":"BODY","text":"Olá, {{1}}! Use o cupom {{2}} e aproveite até sexta-feira.","example":{"body_text":[["Camila","PASSOLEVE"]]}},"body.components.items.2":{"type":"BUTTONS","buttons":[{"type":"URL","text":"Ver oferta","url":"https://exemplo.com/oferta"}]}},{"body.name":"retirada_equipamento","body.language":"pt_BR","body.category":"UTILITY","body.components.items.0":{"type":"BODY","text":"Olá, {{nome}}. O equipamento da ordem de serviço {{numero_os}} está pronto para retirada.","example":{"body_text_named_params":[{"param_name":"nome","example":"Rafael"},{"param_name":"numero_os","example":"7539"}]}},"body.parameter_format":"NAMED"}],"disableProxy":true},"dependencies":{"parameters":{"eef707e5-9fd5-4b31-9e98-ff8810f74cb2":{"name":"waba_id","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"ID da conta do WhatsApp Business. Descubra com `GET /me`.","uniqueKey":"","typeLabel":"string"},"description":"ID da conta do WhatsApp Business. Descubra com `GET /me`."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","language","category","components"],"properties":{"name":{"type":"string","description":"Nome do template, em letras minúsculas e com `_` no lugar de espaços.","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"language":{"type":"string","description":"Código do idioma, como `pt_BR`.","isRequired":true,"uniqueKey":"language","typeLabel":"string"},"category":{"type":"string","enum":["MARKETING","UTILITY","AUTHENTICATION"],"isRequired":true,"uniqueKey":"category","typeLabel":"enum\u003cstring>"},"components":{"type":"array","description":"Cabeçalho, corpo, rodapé e botões do template.","items":{"type":"object","uniqueKey":"components.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"components","typeLabel":"object[]"},"parameter_format":{"type":"string","enum":["POSITIONAL","NAMED"],"default":"POSITIONAL","example":"POSITIONAL","description":"Formato das variáveis: `POSITIONAL` usa `{{1}}`, `{{2}}`; `NAMED` usa `{{nome}}` e exige `body_text_named_params` no exemplo.","uniqueKey":"parameter_format","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"utilidade":{"title":"utilidade","value":{"name":"pedido_pronto","language":"pt_BR","category":"UTILITY","components":[{"type":"BODY","text":"Olá, {{1}}. O equipamento da ordem de serviço {{2}} está pronto para retirada.","example":{"body_text":[["Rafael","7539"]]}}]}},"marketing_imagem":{"title":"marketing_imagem","value":{"name":"oferta_semana","language":"pt_BR","category":"MARKETING","components":[{"type":"HEADER","format":"IMAGE","example":{"header_handle":["4::aW1hZ2UvanBlZw==:ARb..."]}},{"type":"BODY","text":"Olá, {{1}}! Use o cupom {{2}} e aproveite até sexta-feira.","example":{"body_text":[["Camila","PASSOLEVE"]]}},{"type":"BUTTONS","buttons":[{"type":"URL","text":"Ver oferta","url":"https://exemplo.com/oferta"}]}]}},"nomeado":{"title":"nomeado","value":{"name":"retirada_equipamento","language":"pt_BR","category":"UTILITY","parameter_format":"NAMED","components":[{"type":"BODY","text":"Olá, {{nome}}. O equipamento da ordem de serviço {{numero_os}} está pronto para retirada.","example":{"body_text_named_params":[{"param_name":"nome","example":"Rafael"},{"param_name":"numero_os","example":"7539"}]}}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"28c02e58-f56d-48f3-8fb6-468766d8450f":{"description":"Template criado e enviado para análise.","content":{"application/json":{"example":{"id":"5400801403478858","status":"PENDING","category":"UTILITY"},"examples":{"Example":{"title":"Example","value":{"id":"5400801403478858","status":"PENDING","category":"UTILITY"}}},"exampleType":"examples"}},"exampleType":"examples"},"faed2553-64c4-4944-af2f-b7b0ebf29732":{"description":"Erro retornado pela Meta, repassado sem alteração.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"error.message","typeLabel":"string"},"type":{"type":"string","uniqueKey":"error.type","typeLabel":"string"},"code":{"type":"integer","uniqueKey":"error.code","typeLabel":"integer"},"error_subcode":{"type":"integer","uniqueKey":"error.error_subcode","typeLabel":"integer"},"fbtrace_id":{"type":"string","uniqueKey":"error.fbtrace_id","typeLabel":"string"}},"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":{"message":"(#131030) Recipient phone number not in allowed list","type":"OAuthException","code":131030,"fbtrace_id":"AbCdEfGhIjK"}},"examples":{"Example":{"title":"Example","value":{"error":{"message":"(#131030) Recipient phone number not in allowed list","type":"OAuthException","code":131030,"fbtrace_id":"AbCdEfGhIjK"}}}},"exampleType":"examples"}},"exampleType":"examples"},"a0ec870e-a95a-4b84-bb71-decf74503e72":{"description":"Token ausente ou inválido.","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","uniqueKey":"statusCode","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"statusCode":401,"message":"Token inválido ou não encontrado."},"examples":{"Example":{"title":"Example","value":{"statusCode":401,"message":"Token inválido ou não encontrado."}}},"exampleType":"examples"}},"exampleType":"examples"},"4744d7aa-ff73-4fe4-8e72-02fe9dd15650":{"description":"Assinatura da Datafy inativa.","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","uniqueKey":"statusCode","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"statusCode":402,"message":"Assinatura inativa. Ative sua assinatura no painel para voltar a usar a API."},"examples":{"Example":{"title":"Example","value":{"statusCode":402,"message":"Assinatura inativa. Ative sua assinatura no painel para voltar a usar a API."}}},"exampleType":"examples"}},"exampleType":"examples"},"c36d0cd3-81ae-4e53-99c4-5a7b983796ba":{"description":"Limite de requisições excedido.","content":{"application/json":{"schema":{"type":"object","properties":{"statusCode":{"type":"integer","uniqueKey":"statusCode","typeLabel":"integer"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"statusCode":429,"message":"Rate limit excedido (60 req/min). Tente novamente em 12s."},"examples":{"Example":{"title":"Example","value":{"statusCode":429,"message":"Rate limit excedido (60 req/min). Tente novamente em 12s."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"1d7699fa-0f9a-4db3-a31b-6b89e3d2ae9d":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Token gerado no painel da Datafy ao criar o canal. Formato: `sk_live_xxx`.","scopes":[]}}},"servers":{"fb2a2518-3e45-4a1d-af53-8b27e45755ce":{"url":"https://cloud.datafyapi.com.br","description":"Produção"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Token gerado no painel da Datafy ao criar o canal. Formato: `sk_live_xxx`.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Token gerado no painel da Datafy ao criar o canal. Formato: `sk_live_xxx`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/whatsapp/openapi.json"},"subdomain":"datafy","siteName":"Datafy API","title":"Criar template - Datafy API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/api-reference/whatsapp/templates/criar-template","matchLevel":0}}},"lastModified":"2026-09-16T04:09:03.312Z","originalFileLocation":"api-reference/whatsapp/templates/criar-template.mdx","locale":"pt-BR"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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=\"Espelho de POST /{waba_id}/message_templates da Meta Cloud API. O template é enviado para análise da Meta.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Datafy API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_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/datafy/tSg_16cLRIOW9GyE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Criar template - Datafy API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Espelho de POST /{waba_id}/message_templates da Meta Cloud API. O template é enviado para análise da Meta.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Datafy API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://datafy.mintlify.site/_mintlify/api/og/v2?division=Templates\u0026amp;title=Criar+template\u0026amp;description=Espelho+de+%60POST+%2F%7Bwaba_id%7D%2Fmessage_templates%60+da+Meta+Cloud+API.+O+template+%C3%A9+enviado+para+an%C3%A1lise+da+Meta.\u0026amp;theme=c935610a3c0106206a2e3495\u0026amp;signature=8bfa3aaec1976a3fc3d62f0b1a410454b9d12bee978c2ca55322061cd6300a1f\">\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=\"Criar template - Datafy API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Espelho de POST /{waba_id}/message_templates da Meta Cloud API. O template é enviado para análise da Meta.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://datafy.mintlify.site/_mintlify/api/og/v2?division=Templates\u0026amp;title=Criar+template\u0026amp;description=Espelho+de+%60POST+%2F%7Bwaba_id%7D%2Fmessage_templates%60+da+Meta+Cloud+API.+O+template+%C3%A9+enviado+para+an%C3%A1lise+da+Meta.\u0026amp;theme=c935610a3c0106206a2e3495\u0026amp;signature=8bfa3aaec1976a3fc3d62f0b1a410454b9d12bee978c2ca55322061cd6300a1f\">\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/datafy/tSg_16cLRIOW9GyE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Datafy API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#25d366\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-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/whatsapp/templates/criar-template.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.datafyapi.com.br/#organization\",\"name\":\"Datafy API\",\"url\":\"https://developers.datafyapi.com.br\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/datafy/q5EgWQ3VyWRmoApU/logo/light.svg?fit=max\u0026auto=format\u0026n=q5EgWQ3VyWRmoApU\u0026q=85\u0026s=3661d9e5deccd66d923760d0935cdb8a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.datafyapi.com.br#website\",\"name\":\"Datafy API\",\"url\":\"https://developers.datafyapi.com.br\",\"publisher\":{\"@id\":\"https://developers.datafyapi.com.br/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template#webpage\",\"url\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template\",\"name\":\"Criar template\",\"description\":\"Espelho de POST /{waba_id}/message_templates da Meta Cloud API. O template é enviado para análise da Meta.\",\"dateModified\":\"2026-09-16T04:09:03.312Z\",\"isPartOf\":{\"@id\":\"https://developers.datafyapi.com.br#website\"},\"breadcrumb\":{\"@id\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Datafy API\",\"item\":\"https://developers.datafyapi.com.br\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Criar template\",\"item\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template#apireference\",\"headline\":\"Criar template\",\"name\":\"Criar template\",\"description\":\"Espelho de POST /{waba_id}/message_templates da Meta Cloud API. O template é enviado para análise da Meta.\",\"url\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template\",\"mainEntityOfPage\":{\"@id\":\"https://developers.datafyapi.com.br/api-reference/whatsapp/templates/criar-template#webpage\"},\"dateModified\":\"2026-09-16T04:09:03.312Z\",\"publisher\":{\"@id\":\"https://developers.datafyapi.com.br/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.datafyapi.com.br#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Datafy API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Datafy API","nav":{"global":null,"languages":[{"language":"pt-BR","tabs":[{"tab":"Guias","icon":{"style":"regular","name":"book-open"},"pages":[{"title":"Guias","href":""}]},{"tab":"API WhatsApp","icon":{"style":"brands","name":"whatsapp"},"groups":[{"group":"Começar","icon":{"style":"regular","name":"rocket"},"pages":[{"title":"Visão geral","sidebarTitle":"Introdução","href":"/api-reference/whatsapp/introducao"},{"title":"Autenticação","href":"/api-reference/whatsapp/visao-geral/autenticacao"},{"title":"Requisições e limites","href":"/api-reference/whatsapp/visao-geral/requisicoes"}]},{"group":"Administração","icon":{"style":"regular","name":"user-gear"},"pages":[{"title":"Introdução","href":"/api-reference/administracao/introducao"},{"group":"Canais","pages":[{"title":"Listar canais","openapi":"api-reference/administracao/specs/canais.json GET /channels/whatsapp","href":"/api-reference/administracao/listar-canais"},{"title":"Criar canal","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp","href":"/api-reference/administracao/criar-canal"},{"title":"Consultar canal","openapi":"api-reference/administracao/specs/canais.json GET /channels/whatsapp/{id}","href":"/api-reference/administracao/consultar-canal"},{"title":"Editar canal","openapi":"api-reference/administracao/specs/canais.json PATCH /channels/whatsapp/{id}","href":"/api-reference/administracao/editar-canal"},{"title":"Rotacionar token","sidebarTitle":"Rotacionar token","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/token","href":"/api-reference/administracao/rotacionar-token"},{"title":"Assinar canal","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/subscribe","href":"/api-reference/administracao/assinar-canal"},{"title":"Cancelar assinatura do canal","sidebarTitle":"Cancelar assinatura","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/cancel","href":"/api-reference/administracao/cancelar-canal"},{"title":"Deletar canal","openapi":"api-reference/administracao/specs/canais.json DELETE /channels/whatsapp/{id}","href":"/api-reference/administracao/deletar-canal"}]},{"group":"Conexão","pages":[{"title":"Gerar link de conexão","sidebarTitle":"Gerar link","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/connect-link","href":"/api-reference/administracao/gerar-link-de-conexao"},{"title":"Pausar canal","sidebarTitle":"Pausar","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/pause","href":"/api-reference/administracao/pausar-canal"},{"title":"Retomar canal","sidebarTitle":"Retomar","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/resume","href":"/api-reference/administracao/retomar-canal"}]},{"group":"Webhooks do canal","pages":[{"title":"Listar webhooks","openapi":"api-reference/administracao/specs/canais.json GET /channels/whatsapp/{id}/webhooks","href":"/api-reference/administracao/listar-webhooks"},{"title":"Criar webhook","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/webhooks","href":"/api-reference/administracao/criar-webhook"},{"title":"Editar webhook","openapi":"api-reference/administracao/specs/canais.json PATCH /channels/whatsapp/{id}/webhooks/{webhookId}","href":"/api-reference/administracao/editar-webhook"},{"title":"Remover webhook","openapi":"api-reference/administracao/specs/canais.json DELETE /channels/whatsapp/{id}/webhooks/{webhookId}","href":"/api-reference/administracao/remover-webhook"},{"title":"Rotacionar webhook secret","sidebarTitle":"Rotacionar secret","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/{id}/webhook-secret","href":"/api-reference/administracao/rotacionar-webhook-secret"}]},{"group":"Webhook global","pages":[{"title":"Consultar webhook global","sidebarTitle":"Consultar","openapi":"api-reference/administracao/specs/canais.json GET /channels/whatsapp/global-webhook","href":"/api-reference/administracao/consultar-webhook-global"},{"title":"Configurar webhook global","sidebarTitle":"Configurar","openapi":"api-reference/administracao/specs/canais.json PUT /channels/whatsapp/global-webhook","href":"/api-reference/administracao/configurar-webhook-global"},{"title":"Remover webhook global","sidebarTitle":"Remover","openapi":"api-reference/administracao/specs/canais.json DELETE /channels/whatsapp/global-webhook","href":"/api-reference/administracao/remover-webhook-global"},{"title":"Rotacionar secret global","sidebarTitle":"Rotacionar secret","openapi":"api-reference/administracao/specs/canais.json POST /channels/whatsapp/global-webhook/rotate-secret","href":"/api-reference/administracao/rotacionar-secret-global"}]}]},{"group":"Mensagens","icon":{"style":"regular","name":"paper-plane"},"pages":[{"title":"Introdução","href":"/api-reference/whatsapp/mensagens/introducao"},{"title":"Enviar texto","openapi":"api-reference/whatsapp/specs/texto.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-texto"},{"title":"Enviar imagem","openapi":"api-reference/whatsapp/specs/imagem.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-imagem"},{"title":"Enviar áudio","openapi":"api-reference/whatsapp/specs/audio.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-audio"},{"title":"Enviar vídeo","openapi":"api-reference/whatsapp/specs/video.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-video"},{"title":"Enviar documento","openapi":"api-reference/whatsapp/specs/documento.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-documento"},{"title":"Enviar sticker","openapi":"api-reference/whatsapp/specs/sticker.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-sticker"},{"title":"Enviar localização","openapi":"api-reference/whatsapp/specs/localizacao.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-localizacao"},{"title":"Solicitar localização","openapi":"api-reference/whatsapp/specs/solicitar-localizacao.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/solicitar-localizacao"},{"title":"Enviar contato","openapi":"api-reference/whatsapp/specs/contato.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-contato"},{"title":"Enviar reação","openapi":"api-reference/whatsapp/specs/reacao.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-reacao"},{"title":"Enviar botões","openapi":"api-reference/whatsapp/specs/botoes.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-botoes"},{"title":"Enviar lista","openapi":"api-reference/whatsapp/specs/lista.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-lista"},{"title":"Enviar botão com link","openapi":"api-reference/whatsapp/specs/botao-link.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-botao-link"},{"title":"Enviar carrossel","openapi":"api-reference/whatsapp/specs/carrossel.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/mensagens/enviar-carrossel"}]},{"group":"Recursos de mensagens","icon":{"style":"regular","name":"comment-dots"},"pages":[{"title":"Marcar como lida","openapi":"api-reference/whatsapp/specs/marcar-como-lida.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/recursos/marcar-como-lida"},{"title":"Indicador de digitação","openapi":"api-reference/whatsapp/specs/indicador-de-digitacao.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/recursos/indicador-de-digitacao"},{"title":"Respostas contextuais","href":"/api-reference/whatsapp/recursos/respostas-contextuais"}]},{"group":"Mídias","icon":{"style":"regular","name":"image"},"pages":[{"title":"Upload de mídia","openapi":"api-reference/whatsapp/openapi.json POST /v1/{phone_number_id}/media","href":"/api-reference/whatsapp/recursos/midia/upload-de-midia"},{"title":"Obter URL da mídia","openapi":"api-reference/whatsapp/specs/obter-url-midia.json GET /v1/{media_id}","href":"/api-reference/whatsapp/recursos/midia/obter-url-da-midia"},{"title":"Deletar mídia","description":"Remova da Meta uma mídia enviada pelo upload.","openapi":"api-reference/whatsapp/specs/deletar-midia.json DELETE /v1/{media_id}","href":"/api-reference/whatsapp/recursos/midia/deletar-midia"}]},{"group":"Templates","icon":{"style":"regular","name":"file-lines"},"pages":[{"title":"Criar template","openapi":"api-reference/whatsapp/openapi.json POST /v1/{waba_id}/message_templates","href":"/api-reference/whatsapp/templates/criar-template"},{"title":"Editar template","openapi":"api-reference/whatsapp/openapi.json POST /v1/{template_id}","description":"Espelho de `POST /{template_id}` da Meta Cloud API. Envia a nova versão do template para análise.","href":"/api-reference/whatsapp/templates/editar-template"},{"title":"Listar templates","openapi":"api-reference/whatsapp/openapi.json GET /v1/{waba_id}/message_templates","href":"/api-reference/whatsapp/templates/listar-templates"},{"title":"Deletar template","openapi":"api-reference/whatsapp/openapi.json DELETE /v1/{waba_id}/message_templates","href":"/api-reference/whatsapp/templates/deletar-template"},{"title":"Enviar template","openapi":"api-reference/whatsapp/specs/enviar-template.json POST /v1/{phone_number_id}/messages","href":"/api-reference/whatsapp/templates/enviar-template"}]},{"group":"Conta e número","icon":{"style":"regular","name":"address-card"},"pages":[{"title":"Status do número","openapi":"api-reference/whatsapp/openapi.json GET /v1/{waba_id}/phone_numbers","href":"/api-reference/whatsapp/numero/status-e-limites"},{"title":"Sincronizar histórico","openapi":"api-reference/whatsapp/specs/sincronizar-historico.json POST /v1/{phone_number_id}/smb_app_data","href":"/api-reference/whatsapp/sincronizacao/sincronizar-historico"},{"title":"Sincronizar contatos","openapi":"api-reference/whatsapp/specs/sincronizar-contatos.json POST /v1/{phone_number_id}/smb_app_data","href":"/api-reference/whatsapp/sincronizacao/sincronizar-contatos"},{"title":"Outros endpoints da Meta","href":"/api-reference/whatsapp/proxy/outros-endpoints"}]},{"group":"Endpoints Datafy","icon":{"style":"regular","name":"bolt"},"pages":[{"title":"Dados da conta","openapi":"api-reference/whatsapp/openapi.json GET /me","href":"/api-reference/whatsapp/datafy/me"},{"title":"Baixar mídia recebida","openapi":"api-reference/whatsapp/openapi.json GET /media/{id}","href":"/api-reference/whatsapp/datafy/baixar-midia"},{"title":"Baixar o arquivo da mídia","openapi":"api-reference/whatsapp/openapi.json GET /media/{id}/download","href":"/api-reference/whatsapp/datafy/baixar-arquivo-midia"},{"title":"Gerar handle de arquivo","openapi":"api-reference/whatsapp/openapi.json POST /uploads","href":"/api-reference/whatsapp/datafy/gerar-handle-de-arquivo"}]},{"group":"Webhooks","icon":{"style":"regular","name":"webhook"},"pages":[{"title":"Introdução","href":"/api-reference/whatsapp/webhooks/receber-eventos"},{"title":"Assinatura","href":"/api-reference/whatsapp/webhooks/validar-assinatura"},{"group":"Eventos","pages":[{"title":"Mensagens recebidas","href":"/api-reference/whatsapp/webhooks/eventos/mensagens"},{"title":"Status de mensagem","href":"/api-reference/whatsapp/webhooks/eventos/status-de-mensagem"},{"title":"Mensagens do app","href":"/api-reference/whatsapp/webhooks/eventos/mensagens-do-celular"},{"title":"Histórico de conversas","href":"/api-reference/whatsapp/webhooks/eventos/historico"},{"title":"Contatos sincronizados","href":"/api-reference/whatsapp/webhooks/eventos/contatos-sincronizados"},{"title":"Templates","href":"/api-reference/whatsapp/webhooks/eventos/templates"},{"title":"Qualidade do número","href":"/api-reference/whatsapp/webhooks/eventos/qualidade-do-numero"},{"title":"Conta","href":"/api-reference/whatsapp/webhooks/eventos/conta"}]}]}]},{"tab":"API Instagram","icon":{"style":"brands","name":"instagram"},"pages":[{"title":"API Instagram","href":"/api-reference/instagram/introducao"}]}]}]},"basePath":"","title":"Criar template - Datafy API","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","Page-CxAy5y67.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}