Webhooks and Events

Recent Webhook Deliveries

Lists the latest webhook deliveries of this instance (recent window, for debugging): event, whether it was delivered, HTTP status, latency, attempt number and time. Useful to check whether your endpoint is receiving and responding with 2xx.

GEThttps://api.zapzapapi.com/api/v1/instances/{id}/webhook/deliveries

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

Parameters

NameTypeInRequiredDescription
idtextpathYesInstance ID
limittextqueryNoQuantity (max 100)

Request example

curl

curl -X GET "https://api.zapzapapi.com/api/v1/instances/{id}/webhook/deliveries" \
  -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/instances/{id}/webhook/deliveries", {
  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/instances/{id}/webhook/deliveries",
    headers={"x-api-key": "YOUR_API_KEY", "x-api-secret": "YOUR_API_SECRET"},
)
print(res.json())

Response example

JSON

{
  "deliveries": [
    {
      "delivery_id": "uuid",
      "event": "messages",
      "event_id": "abc",
      "ts": 1725600000000,
      "ok": true,
      "status": 200,
      "latency_ms": 142,
      "attempt": 1
    }
  ]
}

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.