curl --request POST \
--url https://api.hubmessage.io/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://destino/webhook",
"description": "Webhook de template",
"events": [
"UPDATE_TEMPLATE_STATUS",
"UPDATE_TEMPLATE_CATEGORY"
],
"signing": false,
"authType": "NONE"
}
'{
"id": "8F2C00000000000000000000000000A1",
"channelId": null,
"instanceId": null,
"url": "https://destino/webhook",
"description": "Webhook de template",
"events": [
"UPDATE_TEMPLATE_STATUS",
"UPDATE_TEMPLATE_CATEGORY"
],
"status": "ENABLED",
"signing": false,
"secret": null,
"auth": {
"type": "NONE",
"configured": false
},
"payloadFormat": "DEFAULT",
"customAttributes": {},
"createdAt": "2026-07-15T19:00:00.000+00:00",
"updatedAt": "2026-07-15T19:00:00.000+00:00"
}Templates
Criar webhook de template
Registre um webhook de template (independente de instância)
POST
/
v1
/
webhooks
curl --request POST \
--url https://api.hubmessage.io/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://destino/webhook",
"description": "Webhook de template",
"events": [
"UPDATE_TEMPLATE_STATUS",
"UPDATE_TEMPLATE_CATEGORY"
],
"signing": false,
"authType": "NONE"
}
'{
"id": "8F2C00000000000000000000000000A1",
"channelId": null,
"instanceId": null,
"url": "https://destino/webhook",
"description": "Webhook de template",
"events": [
"UPDATE_TEMPLATE_STATUS",
"UPDATE_TEMPLATE_CATEGORY"
],
"status": "ENABLED",
"signing": false,
"secret": null,
"auth": {
"type": "NONE",
"configured": false
},
"payloadFormat": "DEFAULT",
"customAttributes": {},
"createdAt": "2026-07-15T19:00:00.000+00:00",
"updatedAt": "2026-07-15T19:00:00.000+00:00"
}Conceituação
Cria um webhook de template. Ele não depende de uma instância — oinstanceId é gravado como null automaticamente — e recebe apenas os eventos de template do WhatsApp.
O campo events aceita somente UPDATE_TEMPLATE_STATUS e UPDATE_TEMPLATE_CATEGORY. Qualquer evento não-template resulta em 422.
payloadFormat é ignorado
Para webhooks de template o formato é sempre DEFAULT. Você pode omitir o campo; se enviado (qualquer valor), ele é silenciosamente descartado e persistido como DEFAULT.
Assinatura HMAC
Sesigning: true, o campo secret é gerado e retornado apenas nesta resposta. Armazene-o com segurança — ele não será exibido novamente.
Este endpoint requer a role ENTERPRISE na sua conta.
Após a criação, o roteamento pode levar até ~5 min para refletir (TTL de cache).
Autorizações
Corpo
application/json
Somente eventos de template. Pelo menos um obrigatório. Qualquer evento não-template resulta em 422.
Minimum array length:
1Eventos de template aceitos: UPDATE_TEMPLATE_STATUS (atualização de status do template — aprovado/rejeitado etc.) e UPDATE_TEMPLATE_CATEGORY (atualização de categoria do template).
Opções disponíveis:
UPDATE_TEMPLATE_STATUS, UPDATE_TEMPLATE_CATEGORY Exemplo:
[
"UPDATE_TEMPLATE_STATUS",
"UPDATE_TEMPLATE_CATEGORY"
]
Resposta
Webhook de template criado com sucesso. channelId e instanceId vêm null. O campo secret é retornado apenas nesta resposta quando signing é true.
Eventos de template configurados
Eventos de template aceitos: UPDATE_TEMPLATE_STATUS (atualização de status do template — aprovado/rejeitado etc.) e UPDATE_TEMPLATE_CATEGORY (atualização de categoria do template).
Opções disponíveis:
UPDATE_TEMPLATE_STATUS, UPDATE_TEMPLATE_CATEGORY Exemplo:
[
"UPDATE_TEMPLATE_STATUS",
"UPDATE_TEMPLATE_CATEGORY"
]