> ## 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.

# Editar Template

> Edita um template de mensagem existente.

<Note>
  Requer token de instância. Apenas templates com status `APPROVED` ou `REJECTED` podem ser editados.
</Note>

## Parâmetros

### Path

<ParamField path="templateId" type="string" required>
  ID do template a ser editado.
</ParamField>

### Body

<ParamField body="name" type="string">
  Nome do template.
</ParamField>

<ParamField body="components" type="array">
  Componentes atualizados do template (HEADER, BODY, FOOTER, BUTTONS).
</ParamField>

<ParamField body="language" type="string">
  Código do idioma. Exemplo: `pt_BR`.
</ParamField>

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

## Exemplo

```bash theme={null}
curl --request POST \
  --url https://apis.vectalk.com.br/api/templates/{templateId} \
  --header 'Authorization: Bearer {seu_token}' \
  --header 'Content-Type: application/json' \
  --data '{
    "components": [
      {
        "type": "BODY",
        "text": "Olá {{1}}, seu pedido #{{2}} foi atualizado."
      }
    ]
  }'
```

## Resposta

```json theme={null}
{
  "success": true
}
```
