Pular para o conteúdo principal
PUT
/
whatsapp
/
businesses
/
{wabaId}
/
templates
/
{templateId}
Edit template
curl --request PUT \
  --url https://api.hubmessage.io/whatsapp/businesses/{wabaId}/templates/{templateId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "order_update_v1",
  "category": "UTILITY",
  "language": "en_US",
  "components": [
    {
      "type": "BODY",
      "text": "Hello {{1}}, your order {{2}} has been updated to {{3}}.",
      "example": {
        "body_text": [
          [
            "Ana",
            "ORD-1024",
            "in transit"
          ]
        ]
      }
    }
  ]
}
'
{
  "success": true
}

Conceituação

Edita um template existente e reenvia para aprovação da Meta. O body é o mesmo utilizado na criação do template.
Ao editar um template aprovado, ele volta para o status PENDING até ser revisado novamente pela Meta.
O templateId é obtido através do endpoint de Listar templates.

Autorizações

Authorization
string
header
obrigatório

Secret Key generated in the Hub Message Security panel

Parâmetros de caminho

wabaId
string
obrigatório

WABA ID (obtained via List WABAs)

Exemplo:

"428083093730937"

templateId
string
obrigatório

Template ID (obtained via List templates)

Exemplo:

"1900296177408890"

Corpo

application/json
name
string
obrigatório

Template name (snake_case, no spaces)

category
enum<string>
obrigatório

Template category

Opções disponíveis:
UTILITY,
MARKETING,
AUTHENTICATION
language
string
obrigatório

Template language (e.g. en_US, pt_BR)

components
object[]
obrigatório

Template components (HEADER, BODY, FOOTER, BUTTONS)

Resposta

Template edited successfully

success
boolean

Indicates whether the operation was successful