Referência/Legacy - Webhooks/legacySetInstanceWebhook
Legacy - Webhooks

Configura webhook pelo alias legado

Configura webhook pelo alias legado

Deprecated
PUThttp://localhost:8084/webhook/set/{instanceName}

Autenticação

InstanceBearerobrigatório

JWT HS256 da própria instância.

Header
Authorization
Exemplo
Bearer <INSTANCE_TOKEN>

Parâmetros

instanceNamepathobrigatório
string

Nome público da instância na rota legada ou no segundo segmento de logout

minLength 1

Request body

obrigatório
bodyobject
Exemplo: {"url":"https://example.com/webhooks/codechat","enabled":true,"events":{"messagesUpsert":true,"connectionUpdated":true}}
urlstringobrigatórioformat: uri · maxLength: 500 · pattern: ^https?://
enabledbooleanpadrão: true
eventsobject
callUpsertboolean
chatsDeletedboolean
chatsUpdatedboolean
connectionUpdatedboolean
contactsUpdatedboolean
contactsUpsertboolean
groupsParticipantsUpdatedboolean
groupsUpdatedboolean
groupsUpsertboolean
historySyncboolean
identityUpdatedboolean
labelsAssociationboolean
labelsEditboolean
mediaRetryboolean
messagesDeletedboolean
messagesStarredboolean
messagesUndecryptableboolean
messagesUpdatedboolean
messagesUpsertboolean
newsLetterboolean
presenceUpdatedboolean
profilePictureUpdatedboolean
qrcodeUpdatedboolean
sendMessageboolean
settingsUpdatedboolean
statusInstanceboolean
userAboutUpdatedboolean
Exemplo JSONgerado do schema
{
"url": "https://example.com/webhooks/codechat",
"enabled": true,
"events": {
"messagesUpsert": true,
"connectionUpdated": true
}
}

Respostas

application/json
200

Webhook configurado

response 200object
idintegerobrigatório
urlstringobrigatórioformat: uri
enabledbooleanobrigatório
eventsobjectobrigatório
callUpsertboolean
chatsDeletedboolean
chatsUpdatedboolean
connectionUpdatedboolean
contactsUpdatedboolean
contactsUpsertboolean
groupsParticipantsUpdatedboolean
groupsUpdatedboolean
groupsUpsertboolean
historySyncboolean
identityUpdatedboolean
labelsAssociationboolean
labelsEditboolean
mediaRetryboolean
messagesDeletedboolean
messagesStarredboolean
messagesUndecryptableboolean
messagesUpdatedboolean
messagesUpsertboolean
newsLetterboolean
presenceUpdatedboolean
profilePictureUpdatedboolean
qrcodeUpdatedboolean
sendMessageboolean
settingsUpdatedboolean
statusInstanceboolean
userAboutUpdatedboolean
createdAtstring | nullobrigatórioformat: date-time
updatedAtstringobrigatórioformat: date-time
instanceIdintegerobrigatório
Exemplo 200gerado do schema
{
"id": 1,
"url": "https://api.example.com/webhooks/codechat",
"enabled": true,
"events": {
"callUpsert": true,
"chatsDeleted": true,
"chatsUpdated": true,
"connectionUpdated": true,
"contactsUpdated": true,
"contactsUpsert": true,
"groupsParticipantsUpdated": true,
"groupsUpdated": true,
"groupsUpsert": true,
"historySync": true,
"identityUpdated": true,
"labelsAssociation": true,
"labelsEdit": true,
"mediaRetry": true,
"messagesDeleted": true,
"messagesStarred": true,
"messagesUndecryptable": true,
"messagesUpdated": true,
"messagesUpsert": true,
"newsLetter": true,
"presenceUpdated": true,
"profilePictureUpdated": true,
"qrcodeUpdated": true,
"sendMessage": true,
"settingsUpdated": true,
"statusInstance": true,
"userAboutUpdated": true
},
"createdAt": "2026-07-13T15:10:00Z",
"updatedAt": "2026-07-13T15:10:00Z",
"instanceId": 1
}