docs/content/changelog/02-06-26-webhook-subscriptions-api.mdx
A new API for managing webhook configurations with event filtering, HMAC signature verification, and support for platform lifecycle events. This replaces the legacy project-level webhook settings with a more flexible, subscription-based model.
| Change | Type | Action Required |
|---|---|---|
| New Webhook Subscriptions API | New Feature | No |
composio.connected_account.expired event | New Feature | Opt-in |
| Legacy webhook endpoints | Deprecated | Migration recommended |
webhook_url, webhook_secret in Project | Deprecated | Use new API |
See the API Reference for complete details.
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v3/webhook_subscriptions | Create a subscription |
GET | /api/v3/webhook_subscriptions | List all subscriptions |
GET | /api/v3/webhook_subscriptions/{id} | Get subscription details |
PATCH | /api/v3/webhook_subscriptions/{id} | Update subscription |
DELETE | /api/v3/webhook_subscriptions/{id} | Delete subscription |
POST | /api/v3/webhook_subscriptions/{id}/rotate_secret | Rotate signing secret |
GET | /api/v3/webhook_subscriptions/event_types | List available event types |
curl -X POST "https://backend.composio.dev/api/v3/webhook_subscriptions" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhook_url": "https://your-server.com/webhooks/composio",
"enabled_events": ["composio.trigger.message"],
"version": "V3"
}'
Response:
{
"id": "ws_your-subscription-id",
"webhook_url": "https://your-server.com/webhooks/composio",
"version": "V3",
"enabled_events": ["composio.trigger.message"],
"secret": "<your-webhook-secret>",
"created_at": "2026-02-06T12:00:00.000Z",
"updated_at": "2026-02-06T12:00:00.000Z"
}
composio.connected_account.expiredA new platform event that notifies you when an OAuth2 connected account's authentication expires and cannot be automatically refreshed.
<Callout type="info"> This event is **only available in V3 format**. We strongly recommend using V3 for all new integrations to access the latest features and follow standard webhook practices. </Callout>curl -X POST "https://backend.composio.dev/api/v3/webhook_subscriptions" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"webhook_url": "https://your-server.com/webhooks/composio",
"enabled_events": [
"composio.trigger.message",
"composio.connected_account.expired"
],
"version": "V3"
}'
The composio.connected_account.expired event follows the V3 envelope format:
{
"id": "evt_847cdfcd-d219-4f18-a6dd-91acd42ca94a",
"timestamp": "2026-02-06T12:00:00.000Z",
"type": "composio.connected_account.expired",
"metadata": {
"project_id": "pr_your-project-id",
"org_id": "ok_your-org-id"
},
"data": {
"toolkit": {
"slug": "gmail"
},
"auth_config": {
"id": "ac_your-auth-config-id",
"auth_scheme": "OAUTH2",
"is_composio_managed": true,
"is_disabled": false
},
"id": "ca_your-connected-account-id",
"status": "EXPIRED",
"created_at": "2025-12-01T10:00:00.000Z",
"updated_at": "2026-02-06T12:00:00.000Z",
"status_reason": "OAuth refresh token expired",
"is_disabled": false
}
}
All webhooks include an HMAC signature in the webhook-signature header. Use the SDK's built-in verification functions or see the Triggers documentation for implementation details.
Query available events and their version compatibility:
curl "https://backend.composio.dev/api/v3/webhook_subscriptions/event_types" \
-H "x-api-key: YOUR_API_KEY"
| Event Type | Description | Supported Versions |
|---|---|---|
composio.trigger.message | Trigger events from integrations | V1, V2, V3 |
composio.connected_account.expired | Connection authentication expired | V3 only |
The following legacy endpoints are deprecated and will be removed in a future release:
| Deprecated Endpoint | Replacement |
|---|---|
GET /api/v3/org/project/webhook | GET /api/v3/webhook_subscriptions |
POST /api/v3/org/project/webhook/update | POST /api/v3/webhook_subscriptions |
DELETE /api/v3/org/project/webhook | DELETE /api/v3/webhook_subscriptions/{id} |
POST /api/v3/org/project/webhook/refresh | POST /api/v3/webhook_subscriptions/{id}/rotate_secret |
| Field | Status | Notes |
|---|---|---|
webhook_url | Deprecated | Use Webhook Subscriptions API |
webhook_secret | Deprecated | Use Webhook Subscriptions API |
event_webhook_url | Deprecated | Never implemented |
is_new_webhook | Deprecated | Use Webhook Subscriptions API |
composio.trigger.message enabled by default| Version | Format | Recommendation |
|---|---|---|
| V1 | Legacy flat structure | For backward compatibility only |
| V2 | Nested with metadata | For existing integrations |
| V3 | Structured envelope with id, timestamp, type, metadata, data | Recommended for all new integrations |