When disconnecting
#
ConceptThis webhook is responsible for disconnecting
Attention
Z-API does not accept webhooks that aren’t HTTPS
#
Updating the webhookTo update the webhook route, you can do it through the API or through the admin panel.
#
API#
/update-webhook-disconnectedPUT
https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/update-webhook-disconnected
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
Request Body#
Administrative panel#
Webhook's returnThe possible returns of the on-whatsapp-disconnected webhook are registered below:
#
ResponseAttributes | Type | Description |
---|---|---|
momment | integer | Time when the instance was disconnected from the number. |
error | string | Error’s description |
disconnected | boolean | Indication whether the instance is connected with the number or not. |
type | string | Instance event type, in this case it will be "DisconnectedCallback". |
#
200#
405In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or PUT as specified at the beginning of this topic.
#
415In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”