> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectalk.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Criar Template

> Crie um novo template de mensagem para aprovação da Meta

<Note>
  Requer token de instância. O WABA ID é resolvido automaticamente pelo token — não é necessário informar o `waba-id`. Templates criados ficam com status `PENDING` até aprovação da Meta (geralmente algumas horas).
</Note>

<ParamField body="name" type="string" required>
  Nome do template (snake\_case, sem espaços).
</ParamField>

<ParamField body="language" type="string" required>
  Código do idioma. Ex: `pt_BR`, `en_US`.
</ParamField>

<ParamField body="category" type="string" required>
  `MARKETING`, `UTILITY` ou `AUTHENTICATION`.
</ParamField>

<ParamField body="components" type="array" required>
  Array de componentes do template.
</ParamField>

## Exemplos

<Tabs>
  <Tab title="UTILITY com texto">
    ```json theme={null}
    {
      "name": "order_confirmation",
      "language": "pt_BR",
      "category": "UTILITY",
      "components": [
        {
          "type": "HEADER",
          "format": "TEXT",
          "text": "Pedido Confirmado ✅"
        },
        {
          "type": "BODY",
          "text": "Olá {{1}}, seu pedido *#{{2}}* foi confirmado e será entregue em {{3}} dias úteis."
        },
        {
          "type": "FOOTER",
          "text": "Obrigado pela compra!"
        }
      ]
    }
    ```
  </Tab>

  <Tab title="MARKETING com botões">
    ```json theme={null}
    {
      "name": "promo_summer",
      "language": "pt_BR",
      "category": "MARKETING",
      "components": [
        {
          "type": "HEADER",
          "format": "IMAGE",
          "example": {
            "header_handle": ["https://example.com/promo.jpg"]
          }
        },
        {
          "type": "BODY",
          "text": "Aproveite {{1}}% de desconto! Válido até {{2}}.",
          "example": {
            "body_text": [["50", "31/12/2026"]]
          }
        },
        {
          "type": "BUTTONS",
          "buttons": [
            { "type": "URL", "text": "Comprar agora", "url": "https://loja.com/promo" },
            { "type": "QUICK_REPLY", "text": "Não tenho interesse" }
          ]
        }
      ]
    }
    ```
  </Tab>

  <Tab title="AUTHENTICATION (OTP)">
    ```json theme={null}
    {
      "name": "verify_code",
      "language": "pt_BR",
      "category": "AUTHENTICATION",
      "components": [
        {
          "type": "BODY",
          "add_security_recommendation": true
        },
        {
          "type": "BUTTONS",
          "buttons": [
            { "type": "OTP", "otp_type": "COPY_CODE", "text": "Copiar código" }
          ]
        }
      ]
    }
    ```
  </Tab>
</Tabs>

## Resposta

```json theme={null}
{
  "id": "1234567890",
  "status": "PENDING",
  "category": "UTILITY"
}
```
