Skip to main content
POST
/
instances
/
{id}
/
webhook
Set webhook
curl --request POST \
  --url https://api.vzaps.com/instances/{id}/webhook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "webhookURL": "https://cliente.exemplo.com/webhooks/whatsapp",
  "events": "Message,ReadReceipt,Connected,Disconnected"
}
'
{
  "code": 200,
  "success": true,
  "data": {
    "webhook": "https://cliente.exemplo.com/webhooks/vzaps",
    "events": "Message,ReadReceipt,Connected,Disconnected"
  }
}

Webhook events

In the POST /instances/{id}/webhook body, the optional events field is a string of one or more event type names, comma-separated with no spaces between tokens, e.g. Message,Connected,Disconnected. Names must match the table below exactly (same values as in the web app). Any other value is invalid. In particular, do not use Receipt, MessageDelivered, or MessageRead.
ValueDescription
AllAll webhook event types
ConnectedWhatsApp paired / session connected
DisconnectedWhatsApp or session disconnected
MessageIncoming and outgoing messages
ReadReceiptDelivery and read receipts. The payload uses state to distinguish Delivered, Read, and ReadSelf.
PresencePresence updates
HistorySyncHistory sync progress
ChatPresenceChat presence (typing, recording, …)
GroupParticipantsAddParticipants added to a group
GroupParticipantsRemoveParticipants removed from a group
If you omit events in the body, the event list already configured for the instance is not changed; only the webhook URL may be updated.
To receive delivery and read confirmations, subscribe the instance to ReadReceipt. There are no separate MessageDelivered or MessageRead event names; use the webhook payload state field: Delivered means delivered to the recipient device, Read means read by the recipient, and ReadSelf means read by the connected account itself.
Use the documented path for each operation, such as /instances/{id}/chat/send/text, /instances/{id}/chat/markread, and /instances/{id}/chat/react.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Identificador publico da instancia no formato gerado pela plataforma: prefixo VZ seguido de caracteres alfanumericos.

Example:

"VZ9K2M4N8P1Q3R5S7T0WABCD01EF"

Body

application/json
webhookURL
string<uri>
required

URL HTTPS para onde os payloads do webhook serao enviados. Envie string vazia para limpar a configuracao.

events
string

Lista separada por virgulas dos tipos a inscrever. Valores aceitos exatamente: Message, ReadReceipt, Presence, HistorySync, ChatPresence, Connected, Disconnected, GroupParticipantsAdd, GroupParticipantsRemove, All. Para entregue/lido, use somente ReadReceipt; nao use Receipt, MessageDelivered ou MessageRead.

Example:

"Message,ReadReceipt,Connected,Disconnected"

Response

200 - application/json

Webhook saved

code
integer
required
success
boolean
required
data
object