Set webhook
POST /instances//webhook — saves webhook URL and subscribed events on the instance configuration
Webhook events
In thePOST /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.
| Value | Description |
|---|---|
All | All webhook event types |
Connected | WhatsApp paired / session connected |
Disconnected | WhatsApp or session disconnected |
Message | Incoming and outgoing messages |
ReadReceipt | Delivery and read receipts. The payload uses state to distinguish Delivered, Read, and ReadSelf. |
Presence | Presence updates |
HistorySync | History sync progress |
ChatPresence | Chat presence (typing, recording, …) |
GroupParticipantsAdd | Participants added to a group |
GroupParticipantsRemove | Participants removed from a group |
events in the body, the event list already configured for the instance is not changed; only the webhook URL may be updated.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./instances/{id}/chat/send/text, /instances/{id}/chat/markread, and /instances/{id}/chat/react.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identificador publico da instancia no formato gerado pela plataforma: prefixo VZ seguido de caracteres alfanumericos.
"VZ9K2M4N8P1Q3R5S7T0WABCD01EF"
Body
URL HTTPS para onde os payloads do webhook serao enviados. Envie string vazia para limpar a configuracao.
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.
"Message,ReadReceipt,Connected,Disconnected"

