Skip to main content
A webhook is a URL on your server. When something happens in AdsEra, such as a customer message, an AI reply or a finished call, AdsEra sends a 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.
You can add several webhooks, for example one for your CRM and one for your analytics, each with its own events and numbers.

Choosing events

Showing WhatsApp chats in your own CRM? Tick message.new, message.sent and message.status_updated. Add call.ended and call.summary for calls, and addy.lead_updated and addy.handoff for what the AI agent finds out. See Use AdsEra with your own CRM.

What AdsEra sends

Every event except the live call 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-secret header 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.
Webhook URLs must be public 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 2xx status 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 read status may come before delivered. Use the times inside data to order them.
  • Duplicates: rare, but possible when WhatsApp itself repeats an event. Use data._id, data.messageId or data.id to skip ones you already saved.

Example receivers

The test event

Send a test event posts this body, with your secret and authentication headers:
Answer it with 2xx like any other event.

Troubleshooting