Pular para o conteúdo principal
POST
/
whatsapp
/
businesses
/
{wabaId}
/
templates
/
sync
Sync templates
curl --request POST \
  --url https://api.hubmessage.io/whatsapp/businesses/{wabaId}/templates/sync \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "1900296177408890",
      "name": "confirm_account",
      "status": "APPROVED",
      "category": "AUTHENTICATION",
      "language": "en_US",
      "parameter_format": "POSITIONAL",
      "message_send_ttl_seconds": 600,
      "components": [
        {
          "type": "BODY",
          "text": "Your verification code is *{{1}}*. For your security, do not share it.",
          "add_security_recommendation": true,
          "example": {
            "body_text": [
              [
                "123456"
              ]
            ]
          }
        }
      ]
    }
  ],
  "syncedCount": 2,
  "synced": true
}

Conceituação

Força a sincronização dos templates com a Meta, atualizando os status (PENDING, APPROVED, REJECTED) e demais informações dos templates locais. Útil quando você criou ou editou um template e quer verificar se o status de aprovação já foi atualizado pela Meta.
O wabaId é obtido através do endpoint de Listar WABAs.

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"

Resposta

Synchronization completed successfully

data
object[]

List of synced templates

syncedCount
integer

Number of synced templates

synced
boolean

Indicates whether the synchronization was successful