POST request to that URL with the details. You don’t need to poll the API.
Set up a webhook
1
Open Settings → Webhooks
In AdsEra, go to Settings → Webhooks and click Add webhook.
2
Enter your URL
A public
https:// address on your server, for example https://crm.example.com/hooks/adsera.3
Pick the events
Tick only what you use. See Choosing events below.
4
Pick your WhatsApp numbers
Message events only arrive for the numbers you select here.
5
Protect it (recommended)
Add a secret, or Basic, Bearer or custom-header authentication. See Security.
6
Send a test
Click the Send a test event button on the webhook’s row. AdsEra posts a
test event and shows whether your server answered, with the HTTP status and the time taken.Choosing events
What AdsEra sends
Every event except the livecall signals arrives in the same envelope:
Security
Anyone who finds your URL could post to it, so check that each request came from AdsEra. Use any of these:- Secret: set a secret on the webhook. It arrives in the
x-secretheader on every request; reject requests where it doesn’t match. - Basic auth: AdsEra sends
Authorization: Basic …with your username and password. - Bearer token: AdsEra sends
Authorization: Bearer <your token>. - Custom headers: any header names and values you choose, for example
x-api-token.
https:// addresses. Local and private network addresses, such as localhost or 10.x.x.x, are refused. To test on your computer, use a tunnel such as ngrok or Cloudflare Tunnel.
Answering
- Answer fast: reply with any
2xxstatus within 5 seconds. Save the event, answer, then do slow work, such as calling other APIs, afterwards. - No retries: a failed delivery (timeout, non-
2xx, server down) is not retried, and redirects are not followed. If your server was down, catch up with the read endpoints: Get a Conversation, List Calls and List Contacts. - Order: events are sent as they happen but can arrive out of order. For example, a
readstatus may come beforedelivered. Use the times insidedatato order them. - Duplicates: rare, but possible when WhatsApp itself repeats an event. Use
data._id,data.messageIdordata.idto skip ones you already saved.
Example receivers
The test event
Send a test event posts this body, with your secret and authentication headers:2xx like any other event.