Define Events
PATCH/api/v2/instance/:instanceId/webhook/:webhookId/events
Webhook Events
Define the events that will be sent by the webhook to your system.
See here the table listing all events.Request
Path Parameters
ID of the instance.
ID of the Webhook
- application/json
Body
required
- qrcodeUpdate: Enables sending the qr code.
- statusInstance: Enables sending instance status.
- messagesSet: Enables batch sending of old messages.
- messagesUpsert: Enables sending of all new incoming messages.
- messagesUpdate: Enables sending all updates to the incoming or outgoing message.
- sendMessage: Enables the sending of all messages sent by the API.
- contactsSet: Enables sending the initial batch of loaded contacts.
- contactsUpsert: Enables sending a new contact with additional information.
- contactsUpdate: Enable update notification for each contact in the conversation.
- presenceUpdate: Enables notification of contact behavior in chat.
- chatsSet: Enables sending all loaded chats.
- chatsUpdate: Enable notification of each chat update in the conversation.
- chatsUpsert: Enable notification of every new chat started.
- chatsDelete: Enable notification when a chat is deleted. deprecated
- groupsUpsert: Enable notification when a group is created.
- groupUpdate: Enable notification when a group is updated.
- groupParticipantsUpdate: Enable notification when a member of a group is updated.
- connectionUpdate: Enable notification when connection status changes.
- newJwt: Enable notification when the json web token is updated.
- Only for jwt authentication type.
Default value: true
Enables sending the qr code.
Default value: true
Enables sending instance State.
Default value: true
Enables batch sending of old messages.
Default value: true
Enables sending of all new incoming messages.
Default value: true
Enables sending all updates to the incoming or outgoing message.
Default value: true
Enables the sending of all messages sent by the API.
Default value: true
Enables sending the initial batch of loaded contacts.
Default value: true
Enables sending a new contact with additional information.
Default value: true
Enable update notification for each contact in the conversation.
Default value: true
Enables notification of contact behavior in chat.
Default value: true
Enables sending all loaded chats.
Default value: true
Enable notification of each chat update in the conversation.
Default value: true
Enable notification of every new chat started.
Default value: true
Enable notification when a chat is deleted.
Default value: true
Enable notification when a group is created.
Default value: true
c
Default value: true
Enable notification when a member of a group is updated.
Default value: true
Enable notification when connection status changes.
Default value: true
Enable notification when the json web token is updated.
Responses
- 201
- 400
- 401
WebhookResponse
- application/json
- Schema
- Example (from schema)
Schema
Identification name of your webhook
Instance unique url.
Default value: false
Enable or disable the url.
WebhookEvents object
Default value: true
Enables sending the qr code.
Default value: true
Enables sending instance State.
Default value: true
Enables batch sending of old messages.
Default value: true
Enables sending of all new incoming messages.
Default value: true
Enables sending all updates to the incoming or outgoing message.
Default value: true
Enables the sending of all messages sent by the API.
Default value: true
Enables sending the initial batch of loaded contacts.
Default value: true
Enables sending a new contact with additional information.
Default value: true
Enable update notification for each contact in the conversation.
Default value: true
Enables notification of contact behavior in chat.
Default value: true
Enables sending all loaded chats.
Default value: true
Enable notification of each chat update in the conversation.
Default value: true
Enable notification of every new chat started.
Default value: true
Enable notification when a chat is deleted.
Default value: true
Enable notification when a group is created.
Default value: true
c
Default value: true
Enable notification when a member of a group is updated.
Default value: true
Enable notification when connection status changes.
Default value: true
Enable notification when the json web token is updated.
{
"name": "string",
"url": "string",
"enabled": false,
"webhookId": "string",
"createdAt": "2024-04-14T14:11:05.671Z",
"updatedAt": "2024-04-14T14:11:05.671Z",
"instanceInstanceId": "string",
"WebhookEvents": {
"qrcodeUpdate": true,
"stateInstance": true,
"messagesSet": true,
"messagesUpsert": true,
"messagesUpdate": true,
"sendMessage": true,
"contactsSet": true,
"contactsUpsert": true,
"contactsUpdate": true,
"presenceUpdate": true,
"chatsSet": true,
"chatsUpdate": true,
"chatsUpsert": true,
"groupsUpsert": true,
"groupUpdate": true,
"groupParticipantsUpdate": true,
"connectionUpdate": true,
"newJwt": true,
"webhookEventsId": "string",
"createdAt": "2024-04-14T14:11:05.671Z",
"updatedAt": "2024-04-14T14:11:05.671Z"
}
}
BadRequestException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}
UnauthorizedException
- application/json
- Schema
- Example (from schema)
Schema
Default value: string,[object Object]
{
"message": [
"string"
],
"error": "string",
"statusCode": 0
}