Webhooks and Events

View Instance Webhook

Returns the webhook configuration of the instance. The response is always an array, even with a single webhook.

GEThttps://api.zapzapapi.com/api/v1/{instanceId}/webhook

Authentication with the x-api-key and x-api-secret headers.

Parameters

This endpoint takes no parameters.

Request example

curl

curl -X GET "https://api.zapzapapi.com/api/v1/{instanceId}/webhook" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET"

Node.js

const res = await fetch("https://api.zapzapapi.com/api/v1/{instanceId}/webhook", {
  method: "GET",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "x-api-secret": "YOUR_API_SECRET",
  },
});
console.log(await res.json());

Python

import requests

res = requests.get(
    "https://api.zapzapapi.com/api/v1/{instanceId}/webhook",
    headers={"x-api-key": "YOUR_API_KEY", "x-api-secret": "YOUR_API_SECRET"},
)
print(res.json())

Response example

JSON

[
  {
    "url": "https://example.com",
    "enabled": false,
    "events": [],
    "id": "r1234"
  }
]

Values are illustrative; the fields follow the real response format.

See the full reference

Get your API keys

Create your account, connect a number in minutes and start using the API. R$15 per active number/month, with a welcome credit when you create the account, subject to the current campaign.