Webhooks API
Real-time Meeting Event Notifications
The Webhooks API enables real-time notifications for meeting events, allowing your applications to receive updates about meeting starts, completions, transcription events, and more.
- Receive real-time meeting notifications
- Integrate with your existing workflow tools
- Build custom event handlers for meeting events
- Automate post-meeting processes
Webhooks provide a powerful way to build responsive applications that react to meeting lifecycle events without constant polling, enabling efficient integrations with CRMs, analytics platforms, and other business systems.
Key Features
- Meeting Lifecycle Events: Receive notifications for meeting starts, completions, and failures
- Transcription Events: Get updates when transcription is available or updated
- Calendar Events: Notifications for calendar changes and synchronization
- Retry Mechanism: API endpoint to retry failed webhook deliveries
- Customizable Endpoints: Set different webhook URLs for different event types
- Event Filtering: Control which events trigger notifications
Webhook Event Types
Meeting BaaS webhooks deliver the following event types:
- meeting.started: A bot has successfully joined a meeting
- meeting.completed: A meeting has ended and recordings are available
- meeting.failed: A bot failed to join a meeting
- transcription.available: Initial transcription is available
- transcription.updated: Transcription has been updated or refined
- calendar.synced: A calendar has been synchronized
- event.added: A new calendar event has been detected
- event.updated: A calendar event has been updated
- event.deleted: A calendar event has been removed
Setup and Configuration
Configure Webhook Endpoint
Here's an example of how to configure a webhook URL for meeting events:
This JSON configuration shows how to set up a webhook endpoint in your Meeting BaaS account.
{
"webhook_url": "https://your-app.com/webhooks/meetingbaas",
"events": [
"meeting.started",
"meeting.completed",
"meeting.failed",
"transcription.available"
],
"secret": "your-webhook-secret-key",
"enabled": true
}
List Webhook Endpoints
curl -X GET "https://api.meetingbaas.com/bots/webhooks/bot" \
-H "x-meeting-baas-api-key: <token>"
Webhook Event Formats
Here are examples of webhook event payloads:
These JSON examples show the format of meeting started and completed event notifications.
Meeting Completed Event
{
"event": "complete",
"data": {
"bot_id": "123e4567-e89b-12d3-a456-426614174000",
"transcript": [
{
"speaker": "John Doe",
"offset": 1.5,
"words": [
{
"start": 1.5,
"end": 1.9,
"word": "Hello"
},
{
"start": 2.0,
"end": 2.4,
"word": "everyone"
}
]
}
],
"speakers": [
"Jane Smith",
"John Doe"
],
"mp4": "https://storage.example.com/recordings/video123.mp4?token=abc",
"event": "complete"
}
}
Meeting Failed Event
{
"event": "failed",
"data": {
"bot_id": "123e4567-e89b-12d3-a456-426614174000",
"error": "meeting_not_found",
"message": "Could not join meeting: The meeting ID was not found or has expired"
}
}
Transcription Complete Event
{
"event": "transcription_complete",
"data": {
"bot_id": "123e4567-e89b-12d3-a456-426614174000"
}
}
Implementation Examples
Python Webhook Handler
from flask import Flask, request, jsonify
import hmac
import hashlib
app = Flask(__name__)
WEBHOOK_SECRET = "your-webhook-secret-key"
def verify_signature(payload, signature):
expected_signature = hmac.new(
WEBHOOK_SECRET.encode(),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected_signature)
@app.route('/webhooks/meetingbaas', methods=['POST'])
def webhook_handler():
signature = request.headers.get('X-MeetingBaas-Signature')
payload = request.get_data()
if not verify_signature(payload, signature):
return jsonify({"error": "Invalid signature"}), 401
event_data = request.json
if event_data['event'] == 'complete':
# Handle meeting completion
bot_id = event_data['data']['bot_id']
transcript = event_data['data']['transcript']
recording_url = event_data['data']['mp4']
# Process the meeting data
process_meeting_completion(bot_id, transcript, recording_url)
elif event_data['event'] == 'failed':
# Handle meeting failure
bot_id = event_data['data']['bot_id']
error = event_data['data']['error']
message = event_data['data']['message']
# Log the failure
log_meeting_failure(bot_id, error, message)
return jsonify({"status": "success"}), 200
def process_meeting_completion(bot_id, transcript, recording_url):
# Your custom logic here
print(f"Meeting {bot_id} completed")
print(f"Recording available at: {recording_url}")
if __name__ == '__main__':
app.run(debug=True, port=5000)
from fastapi import FastAPI, Request, HTTPException, Header
import hmac
import hashlib
from typing import Optional
app = FastAPI()
WEBHOOK_SECRET = "your-webhook-secret-key"
def verify_signature(payload: bytes, signature: str) -> bool:
expected_signature = hmac.new(
WEBHOOK_SECRET.encode(),
payload,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected_signature)
@app.post("/webhooks/meetingbaas")
async def webhook_handler(
request: Request,
x_meetingbaas_signature: Optional[str] = Header(None)
):
payload = await request.body()
if not x_meetingbaas_signature:
raise HTTPException(status_code=401, detail="Missing signature")
if not verify_signature(payload, x_meetingbaas_signature):
raise HTTPException(status_code=401, detail="Invalid signature")
event_data = await request.json()
# Process different event types
if event_data['event'] == 'complete':
await handle_meeting_completion(event_data['data'])
elif event_data['event'] == 'failed':
await handle_meeting_failure(event_data['data'])
elif event_data['event'] == 'transcription_complete':
await handle_transcription_complete(event_data['data'])
return {"status": "success"}
async def handle_meeting_completion(data):
bot_id = data['bot_id']
transcript = data['transcript']
recording_url = data['mp4']
# Your custom logic here
print(f"Meeting {bot_id} completed")
print(f"Recording available at: {recording_url}")
async def handle_meeting_failure(data):
bot_id = data['bot_id']
error = data['error']
message = data['message']
# Your custom logic here
print(f"Meeting {bot_id} failed: {error} - {message}")
async def handle_transcription_complete(data):
bot_id = data['bot_id']
# Your custom logic here
print(f"Transcription completed for meeting {bot_id}")
Node.js Webhook Handler
const express = require('express');
const crypto = require('crypto');
const app = express();
const WEBHOOK_SECRET = 'your-webhook-secret-key';
app.use(express.json());
function verifySignature(payload, signature) {
const expectedSignature = crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expectedSignature)
);
}
app.post('/webhooks/meetingbaas', (req, res) => {
const signature = req.headers['x-meetingbaas-signature'];
const payload = JSON.stringify(req.body);
if (!verifySignature(payload, signature)) {
return res.status(401).json({ error: 'Invalid signature' });
}
const eventData = req.body;
switch (eventData.event) {
case 'complete':
handleMeetingCompletion(eventData.data);
break;
case 'failed':
handleMeetingFailure(eventData.data);
break;
case 'transcription_complete':
handleTranscriptionComplete(eventData.data);
break;
default:
console.log(`Unknown event: ${eventData.event}`);
}
res.json({ status: 'success' });
});
function handleMeetingCompletion(data) {
const { bot_id, transcript, mp4 } = data;
console.log(`Meeting ${bot_id} completed`);
console.log(`Recording available at: ${mp4}`);
// Your custom logic here
// e.g., save to database, send notifications, etc.
}
function handleMeetingFailure(data) {
const { bot_id, error, message } = data;
console.log(`Meeting ${bot_id} failed: ${error} - ${message}`);
// Your custom logic here
// e.g., retry logic, alert notifications, etc.
}
function handleTranscriptionComplete(data) {
const { bot_id } = data;
console.log(`Transcription completed for meeting ${bot_id}`);
// Your custom logic here
// e.g., process transcript, update database, etc.
}
app.listen(3000, () => {
console.log('Webhook server running on port 3000');
});
Best Practices
Security
- Always verify webhook signatures
- Use HTTPS endpoints
- Implement rate limiting
- Validate event data
Reliability
- Return 200 status codes quickly
- Implement idempotency
- Handle duplicate events
- Set up monitoring and alerting
Error Handling
- Log all webhook events
- Implement retry logic for failures
- Set up dead letter queues
- Monitor webhook delivery status

Get Started
Ready to integrate real-time meeting notifications? Check out our comprehensive resources: