Account and Instances

Test Webhook

Sends a test event to the configured webhook URL. Returns the status code and response time. Useful to validate that your server is receiving events correctly. ⚠️ URL WARNING: {id} is already in the path: do NOT add it twice. ✅ Correct: POST /api/v1/instances/YOUR-INSTANCE-ID/webhook/test ❌ Wrong: POST /api/v1/YOUR-INSTANCE-ID/instances/YOUR-INSTANCE-ID/webhook/test (duplicated instanceId)

POSThttps://api.zapzapapi.com/api/v1/instances/{id}/webhook/test

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

Parameters

NameTypeInRequiredDescription
idtextpathYesInstance ID
urltextbodyNoAlternative URL for testing (optional)

Request example

curl

curl -X POST "https://api.zapzapapi.com/api/v1/instances/{id}/webhook/test" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-api-secret: YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://meusite.com/webhook"}'

Node.js

const res = await fetch("https://api.zapzapapi.com/api/v1/instances/{id}/webhook/test", {
  method: "POST",
  headers: {
    "x-api-key": "YOUR_API_KEY",
    "x-api-secret": "YOUR_API_SECRET",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://meusite.com/webhook"
  }),
});
console.log(await res.json());

Python

import requests

res = requests.post(
    "https://api.zapzapapi.com/api/v1/instances/{id}/webhook/test",
    headers={"x-api-key": "YOUR_API_KEY", "x-api-secret": "YOUR_API_SECRET"},
    json={"url":"https://meusite.com/webhook"},
)
print(res.json())

Response example

JSON

{
  "ok": true,
  "statusCode": 200,
  "responseTime": 150
}

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.