Skip to main content

Overview

Webhook messages represent payloads that were sent (or attempted to be sent) to your subscribed endpoints. Each message contains the event type, payload data, and delivery status information.

List Messages

/v1/webhooks/messages
Retrieve all webhook messages for your organization

Query Parameters

event_types
array
Filter messages by event type(s)Accepts multiple values: ?event_types=sync.completed&event_types=sync.failed

Response

Returns an array of webhook message objects.
id
string
required
Unique UUID identifier for this message
event_type
string
required
The type of event (e.g., sync.completed, sync.failed)
payload
object
required
The event payload data, matching what is delivered to webhooksStructure varies by event_type.
timestamp
string
required
When this message was created (ISO 8601 format, UTC)
channels
array
Channels this message was sent to

Example Request

curl "https://api.airweave.ai/v1/webhooks/messages?event_types=sync.completed" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "event_type": "sync.completed",
    "payload": {
      "event_type": "sync.completed",
      "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "collection_readable_id": "customer-support-tickets-x7k9m",
      "collection_name": "Customer Support Tickets",
      "source_connection_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "source_type": "zendesk",
      "status": "completed",
      "timestamp": "2024-03-15T09:45:32Z",
      "error": null
    },
    "timestamp": "2024-03-15T09:45:32Z",
    "channels": ["sync.completed"],
    "tags": null
  }
]

Get Message

/v1/webhooks/messages/{message_id}
Retrieve a specific webhook message by its ID

Path Parameters

message_id
string
required
UUID of the message to retrieve

Query Parameters

include_attempts
boolean
default:false
Include delivery attempts for this messageEach attempt includes the HTTP response code, response body, and timestamp.

Response

Returns a message object with optional delivery attempts.
delivery_attempts
array
Delivery attempts for this message (only when include_attempts=true)

Example Request

curl "https://api.airweave.ai/v1/webhooks/messages/a1b2c3d4-e5f6-7890-abcd-ef1234567890?include_attempts=true" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "event_type": "sync.completed",
  "payload": {
    "event_type": "sync.completed",
    "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "collection_readable_id": "customer-support-tickets-x7k9m",
    "collection_name": "Customer Support Tickets",
    "source_connection_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "source_type": "zendesk",
    "status": "completed",
    "timestamp": "2024-03-15T09:45:32Z"
  },
  "timestamp": "2024-03-15T09:45:32Z",
  "channels": ["sync.completed"],
  "delivery_attempts": [
    {
      "id": "atmpt_2bVxUn3RFnLYHa8z6ZKHMT9PqPX",
      "message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "endpoint_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
      "response": "{\"status\": \"processed\", \"id\": \"evt_123\"}",
      "response_status_code": 200,
      "status": "success",
      "timestamp": "2024-03-15T09:45:33Z",
      "url": "https://api.mycompany.com/webhooks/airweave"
    }
  ]
}

Event Types

Airweave sends webhook events for the following event types:

Sync Events

  • sync.pending: Sync job has been queued
  • sync.running: Sync job is actively running
  • sync.completed: Sync job finished successfully
  • sync.failed: Sync job encountered an error
  • sync.cancelled: Sync job was cancelled

Source Connection Events

  • source_connection.created: New source connection created
  • source_connection.auth_completed: OAuth authentication completed
  • source_connection.deleted: Source connection deleted

Collection Events

  • collection.created: New collection created
  • collection.updated: Collection updated
  • collection.deleted: Collection deleted