@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
mdx 62 lines 3.15 KB
Raw
1 ---
2 title: "Webhook Event for Auto-Disabled Triggers"
3 description: "New composio.trigger.disabled event fires when Composio disables a trigger on your behalf — expired connection, webhook refresh failure, or unhealthy polling. Opt-in, V3-only."
4 date: "2026-04-23"
5 ---
6
7 `composio.trigger.disabled` is a new V3 webhook event that fires when Composio disables one of your triggers without a request from you — expired credentials, a failed webhook-subscription refresh, or unhealthy polling. It's opt-in: add it to a webhook subscription's `enabled_events` to receive it. Existing subscriptions for `composio.trigger.message` and `composio.connected_account.expired` are unaffected.
8
9 ## When it fires
10
11 The event is emitted only for platform-initiated disables. `data.disabled_reason` names the cause:
12
13 | `disabled_reason` | What it means |
14 |---|---|
15 | `connection_expired` | The connected account entered `EXPIRED` and the trigger was paused. Auto-re-enabled when the account returns to `ACTIVE`. |
16 | `subscription_auth_failure` | The provider rejected the credentials when Composio tried to refresh the webhook subscription. Re-auth the connection to resolve. |
17 | `subscription_refresh_failure` | Composio could not reach the provider to refresh the webhook subscription (provider error, timeout, or network issue). Re-enable the trigger once the provider is healthy. |
18 | `polling_failure_in_composio_infra` | Composio's polling service failed to fetch events for this trigger after repeated retries. Rare in practice. |
19
20 The event does not fire when you disable a trigger yourself — neither through `PATCH /api/v3/trigger_instances/manage/{id}` nor by deactivating the connected account via `PATCH /api/v3/connected_accounts/{id}/status`.
21
22 ## Subscribe
23
24 Add `composio.trigger.disabled` to your subscription's `enabled_events` — via the [dashboard webhook settings](https://dashboard.composio.dev/~/project/settings/webhook?utm_source=docs&utm_medium=content&utm_campaign=changelog-04-24-26-trigger-disabled-event) or the Webhook Subscriptions API:
25
26 ```bash
27 curl -X PATCH https://backend.composio.dev/api/v3/webhook_subscriptions/ws_your-subscription-id \
28 -H "X-API-KEY: <your-composio-api-key>" \
29 -H "Content-Type: application/json" \
30 -d '{
31 "enabled_events": [
32 "composio.trigger.message",
33 "composio.trigger.disabled"
34 ]
35 }'
36 ```
37
38 The event is V3-only. Subscriptions on V1 or V2 payloads cannot enable it.
39
40 ## Payload
41
42 ```json
43 {
44 "id": "msg_847cdfcd-d219-4f18-a6dd-91acd42ca94a",
45 "type": "composio.trigger.disabled",
46 "metadata": {
47 "project_id": "pr_your-project-id"
48 },
49 "data": {
50 "id": "ti_your-trigger-id",
51 "connected_account_id": "ca_your-connected-account-id",
52 "trigger_name": "GITHUB_COMMIT_EVENT",
53 "user_id": "your-user-id",
54 "trigger_config": { "owner": "composio", "repo": "hermes" },
55 "disabled_at": "2026-04-23T11:59:59.000Z",
56 "disabled_reason": "connection_expired"
57 },
58 "timestamp": "2026-04-23T12:00:00.000Z"
59 }
60 ```
61
62 See [subscribing to triggers](/docs/setting-up-triggers/subscribing-to-events) for handler setup and [subscribing to connection expiry events](/docs/authentication#connection-lifecycle) for re-auth flows on `connection_expired`.