Send Events

Send Events forwards all agent communication events — inbound and outbound, across all channels — to a webhook URL you specify. Use this to sync conversations with your CRM, trigger workflows, or build custom integrations.

Webhook URL Configuration

Configuration

Navigate to your Agent → Advanced tab and enter your webhook URL.

How it works

Every time your agent sends or receives a message (or call), BookedIn POSTs a JSON payload to your webhook URL containing the event details, lead information, and channel-specific metadata.

Request format

POST https://your-webhook-url.com/endpoint
Content-Type: application/json
User-Agent: Backend-System-Webhook/1.0

Webhooks timeout after 10 seconds. BookedIn retries failed webhooks up to 2 times with exponential backoff.

Base payload structure

Every webhook follows this base structure:

1{
2 "event": {
3 "id": "evt_abc123",
4 "channel": "sms",
5 "timestamp": 1706640000.0,
6 "data": { }
7 },
8 "lead_id": "lead_xyz789",
9 "lead_contact": {
10 "number": "+15551234567",
11 "email": "john@example.com",
12 "name": "John Doe"
13 },
14 "business_id": "biz_123",
15 "lead_created": false
16}

Base fields

FieldTypeDescription
eventobjectThe communication event
event.idstringUnique event identifier
event.channelstringvoice, sms, whatsapp, instagram, gmail, outlook, linkedin
event.timestampfloatUnix epoch timestamp
event.dataobjectChannel-specific data (see channel pages)
lead_idstring | nullLead ID (null for new leads)
lead_contactobjectLead’s contact information
lead_contact.numberstringPhone number
lead_contact.emailstringEmail address
lead_contact.namestringFull name
business_idstringYour business ID
lead_createdbooleanWhether this event created a new lead

Direction values

ValueDescription
inboundLead → Business (incoming)
outboundBusiness → Lead (agent response)

Channel payloads

Each channel has specific fields in event.data. See detailed documentation:

Receiving webhooks

1const express = require('express');
2const app = express();
3
4app.use(express.json());
5
6app.post('/bookedin-webhook', (req, res) => {
7 const { event, lead_id, lead_contact } = req.body;
8
9 console.log(`${event.channel} - ${event.data.direction}`);
10
11 // Always respond quickly
12 res.status(200).json({ received: true });
13
14 // Process asynchronously
15 processEvent(event);
16});

Always respond with a 2xx status code within 10 seconds. Process heavy operations asynchronously.