Skip to main content
BrokerOS exposes public webhook endpoints to receive real-time events from external marketing networks, PSTN telecom carriers, AI voice engines, and ad platforms. All webhook endpoints process events asynchronously to guarantee rapid 200 OK acknowledgment to third-party providers.

Webhook Endpoints Directory


1. Meta Lead Ads Webhook

Used by Meta’s Graph API to push leads the moment a user submits a form on Facebook or Instagram.

Verification Handshake (GET)

BrokerOS validates hub.verify_token against the META_WEBHOOK_VERIFY_TOKEN environment variable and returns hub.challenge with HTTP 200.

Event Payload (POST)

The server automatically queries Meta Graph API for field values (Name, Phone, Email, Budget, Project Interest) and instantiates a new CRM Lead.

2. Voice Agent & Carrier Webhooks

Carrier Call Answer XML (Twilio / Vobiz / Telnyx)

When an outbound call placed via PSTN carrier connects to the customer’s phone, the carrier requests call instructions from BrokerOS:

Response (Vobiz XML)

Response (Telnyx TeXML WebSocket Stream)

Voice Platform Event Webhook

When the AI agent terminates the call, Vapi or Retell sends call analytics:

3. WhatsApp Meta Cloud API Webhook

Receives real-time message status updates (sent, delivered, read, failed) and inbound customer replies. Updates are dispatched over the Socket.IO whatsapp-realtime.gateway.ts to reflect instantly on the web and mobile team inboxes.

4. CRM In-Browser Telephony & Softphone Webhooks

Managed by CrmTelephonyWebhooksController to handle softphone dialing, duration tracking, and call recording uploads:

Twilio Voice Dial TwiML (POST)

Called by Twilio when an in-browser WebRTC agent clicks to call a lead. Responds with dynamic TwiML enabling dual-channel recording and status callbacks:

Twilio Recording Callback (POST)

Carrier delivers recording URL upon call completion:
  1. Server downloads audio buffer using authenticated Basic Auth.
  2. Streams audio to Vercel Blob storage (calls/:targetId-:timestamp-:id.mp3).
  3. Resets User.isOnCall = false.
  4. Enqueues Groq Whisper AI transcription, next step extraction, and non-destructive lead profile updates.