Webhooks Overview

Beta Feature

The Webhooks API is currently in beta. The API is stable but may receive enhancements based on feedback.

What are Webhooks?

Webhooks are real-time notifications that Airweave sends when things happen in your organization: syncs completing, source connections being created, collections being updated. Instead of constantly polling the API, you register a webhook endpoint and Airweave pushes updates to you the moment they occur.

This is the foundation for building reactive integrations. Trigger downstream workflows, update dashboards, send alerts, or sync state with external systems automatically.

Why Use Webhooks?

PollingWebhooks
You repeatedly ask “is it done yet?”Airweave tells you when it’s done
Wastes API calls when nothing changedOnly fires when something happens
Delays depend on poll intervalNear-instant notifications
Simple but inefficientEfficient and scalable

Webhooks are the preferred approach for production integrations where you need to react to events in real-time.

Available Event Types

Airweave publishes events across three lifecycle domains:

Sync Events

EventDescriptionWhen it fires
sync.pendingSync job queuedJob created and waiting to start
sync.runningSync job startedJob begins processing
sync.completedSync job finished successfullyAll data synced without errors
sync.failedSync job failedJob encountered an error
sync.cancelledSync job cancelledJob was manually cancelled

Source Connection Events

EventDescriptionWhen it fires
source_connection.createdConnection record createdNew source connection added (may or may not be authenticated)
source_connection.auth_completedOAuth flow completedConnection is now authenticated and ready to use
source_connection.deletedConnection removedSource connection and associated data deleted

Collection Events

EventDescriptionWhen it fires
collection.createdNew collection createdA new collection is set up
collection.updatedCollection properties changedCollection name or configuration modified
collection.deletedCollection removedCollection and all associated data deleted

Most integrations only need sync.completed and sync.failed. Subscribe to source connection and collection events if you need to track infrastructure changes, for example, to audit when connections are added or removed, or to react when collections are created.

How It Works

┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Airweave │ ──── │ Svix │ ──── │ Your Server │
│ (Events) │ │ (Delivery) │ │ (Webhook) │
└─────────────┘ └─────────────┘ └─────────────┘
  1. Something happens. A sync job completes, a source connection is created, or a collection is updated.
  2. Airweave creates an event. The event is recorded with full payload data.
  3. Svix delivers it. Our webhook infrastructure (powered by Svix) sends an HTTP POST to your registered endpoints.
  4. You process it. Your server receives the payload and takes action.

Svix handles retries, delivery guarantees, and signs every outbound delivery. You verify signatures on your end using the signing secret (see the Setup Guide for examples).

Use Cases

Trigger Workflows

Start a data pipeline, refresh a cache, or kick off downstream processing when a sync completes.

Send Alerts

Notify your team via Slack, email, or PagerDuty when a sync fails or a connection is removed.

Track Infrastructure Changes

Know the moment a source connection is added, authenticated, or deleted, or when collections change.

Audit & Logging

Record every lifecycle event to your own logging system for compliance or debugging.

Quick Example

Here’s what a webhook delivery looks like when a sync completes:

HTTP Request to your endpoint:

1POST /webhooks/airweave HTTP/1.1
2Host: your-server.com
3Content-Type: application/json
4svix-id: msg_2xKvB8LPqM4nRst
5svix-timestamp: 1705329000
6svix-signature: v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE=
7
8{
9 "event_type": "sync.completed",
10 "sync_id": "440e8400-e29b-41d4-a716-446655440099",
11 "sync_job_id": "550e8400-e29b-41d4-a716-446655440000",
12 "collection_id": "770e8400-e29b-41d4-a716-446655440002",
13 "collection_readable_id": "sales-data-ab123",
14 "collection_name": "Sales Data",
15 "source_connection_id": "660e8400-e29b-41d4-a716-446655440001",
16 "source_type": "salesforce",
17 "entities_inserted": 42,
18 "entities_updated": 10,
19 "entities_deleted": 3,
20 "entities_skipped": 120,
21 "chunks_written": 215,
22 "timestamp": "2025-01-15T14:30:00Z"
23}

Your server responds with 200 OK to acknowledge receipt.

Next Steps