Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs(triggers): unify around one webhook-endpoint concept; drop V1/V2 framing
Anshu Garg68390b0cd974
diff --git a/docs/content/docs/glossary.mdx b/docs/content/docs/glossary.mdxindex 19788d0e5..2fad78e40 100644--- a/docs/content/docs/glossary.mdx+++ b/docs/content/docs/glossary.mdx@@ -116,7 +116,7 @@ Pinning a toolkit to a specific version so your integration uses a consistent se</GlossaryTerm><GlossaryTerm name="Trigger">-Sends structured payloads to your application when something happens in a connected app. Three delivery models: **polling** (Composio polls the provider, e.g. Gmail), **user-level webhook** (Composio auto-registers a per-user webhook with the provider, e.g. Asana, GitHub), and **app-level webhook endpoint** (V2; you configure a webhook endpoint per OAuth app, e.g. Slack). See [Triggers](/docs/triggers).+Sends structured payloads to your application when something happens in a connected app. Two delivery types: **webhook** (the provider pushes events in real time, e.g. Slack, GitHub, Asana) and **polling** (Composio polls the provider on a schedule, e.g. Gmail). See [Triggers](/docs/triggers).</GlossaryTerm><GlossaryTerm name="Trigger Instance">@@ -124,7 +124,7 @@ A specific, active trigger scoped to a user's connected account.</GlossaryTerm><GlossaryTerm name="Webhook Endpoint">-A V2 ingress URL Composio creates per OAuth app for toolkits where the provider posts events at the app level (currently Slack). Stores the provider's signing secret so Composio can verify every inbound request before fanning out to triggers. See [Configuring webhook endpoints](/docs/setting-up-triggers/configuring-webhook-endpoints).+The ingress URL Composio issues per OAuth app for webhook triggers, plus the signing secret used to verify each inbound request. Composio configures the endpoint for you in most cases; for some toolkits (today: Slack, Notion) when you bring your own OAuth app, you configure it yourself. See [Configuring the webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint).</GlossaryTerm><GlossaryTerm name="Webhook Subscription">diff --git a/docs/content/docs/setting-up-triggers/configuring-webhook-endpoints.mdx b/docs/content/docs/setting-up-triggers/configuring-webhook-endpoints.mdxdeleted file mode 100644index 807db5508..000000000--- a/docs/content/docs/setting-up-triggers/configuring-webhook-endpoints.mdx+++ /dev/null@@ -1,214 +0,0 @@-----title: Configuring webhook endpoints-description: One-time setup for V2 toolkits — create a dedicated ingress URL per OAuth app, store the signing secret, and point the provider at it-keywords: [webhook endpoints, V2, slack, ingress, signing secret, app token, signature verification]------Some toolkits — currently **Slack**, with more arriving on the same model — deliver events at the OAuth-app level rather than per-user. For these toolkits, you need to create a `webhook_endpoint` once per OAuth app, store the provider's signing secret on it, and point the provider's app dashboard at the URL Composio returns.--This is the only piece of trigger setup that's not automatic. Once it's done, [creating triggers](/docs/setting-up-triggers/creating-triggers) and [subscribing to events](/docs/setting-up-triggers/subscribing-to-events) work the same as for any other toolkit.--<Callout>-Most toolkits don't need this — Composio registers per-user webhooks with the provider automatically when you create a trigger. See the [delivery models](/docs/triggers#three-delivery-models) table for which model your toolkit uses. If yours is **user-level webhook** or **polling**, skip this page entirely.-</Callout>--## What a webhook endpoint is--A `webhook_endpoint` is a project-scoped resource keyed by `(toolkit_slug, project_id, client_id)`. It exposes one ingress URL containing a random `we_*` identifier:--```-https://backend.composio.dev/api/v3.1/webhook_ingress/{toolkit_slug}/{we_xxx}/trigger_event-```--Provider events posted to this URL are verified at ingress against the signing secret stored on the endpoint, then fanned out only to trigger instances on that endpoint's project. Unsigned or tampered requests are rejected before any trigger fires.--<Callout type="warn">-**OAuth apps are project-scoped on V2.** A `webhook_endpoint` ties one OAuth app (`client_id`) to exactly one project. If you share a single OAuth app across multiple Composio projects today, either consolidate to one project or register separate OAuth apps per project before creating a V2 endpoint. The provider dashboard accepts only one callback URL per OAuth app, so a single OAuth app cannot feed multiple projects on V2. See the [V2 announcement](/docs/changelog/2026/04/27#heads-up-oauth-apps-are-project-scoped-on-v2) for the full reasoning.-</Callout>--## End-to-end setup (Slack)--The flow below uses Slack because it's the first toolkit on V2. Substitute `slack` with any other V2 toolkit slug as more come online — the API surface is identical.--<Steps>-<Step>-### Discover required fields--Each V2 toolkit has its own list of secrets it needs (signing secret, optionally an app-level token, etc.). Fetch the schema before creating the endpoint so you know what to collect from the provider's dashboard:--```bash-curl "https://backend.composio.dev/api/v3.1/webhook_endpoints/schema?toolkit_slug=slack" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"-```--Sample response:--```json-{- "toolkit_slug": "slack",- "setup_fields": {- "webhook_signing_secret": {- "display_name": "Signing Secret",- "description": "Webhook request signing secret from your Slack app dashboard",- "is_required": true,- "is_secret": true- },- "app_token": {- "display_name": "App-Level Token",- "description": "Slack xapp- token with authorizations:read scope for event authorization",- "is_required": true,- "is_secret": true- }- }-}-```--</Step>-<Step>-### Create the endpoint--```bash-curl -X POST "https://backend.composio.dev/api/v3.1/webhook_endpoints" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \- -H "Content-Type: application/json" \- -d '{- "toolkit_slug": "slack",- "client_id": "<YOUR_SLACK_CLIENT_ID>"- }'-```--Sample response:--```json-{- "id": "we_abc123",- "toolkit_slug": "slack",- "client_id": "<YOUR_SLACK_CLIENT_ID>",- "webhook_url": "https://backend.composio.dev/api/v3.1/webhook_ingress/slack/we_abc123/trigger_event",- "data": null,- "created_at": "2026-04-24T10:00:00.000Z"-}-```--Hold on to two values from the response: `id` (used as `<ENDPOINT_ID>` below) and `webhook_url` (you'll paste this into the provider's dashboard in step 5).--<Callout>-The call is **idempotent per `(toolkit_slug, client_id)` within a project** — calling it again with the same pair returns the existing endpoint without rotating the URL or wiping the secret.-</Callout>-</Step>-<Step>-### Store the signing secret--```bash-curl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \- -H "Content-Type: application/json" \- -d '{- "data": {- "webhook_signing_secret": "<YOUR_SLACK_SIGNING_SECRET>"- }- }'-```--For Slack, the signing secret lives at **Slack app → Basic Information → App Credentials → Signing Secret**.--<Callout type="warn">-**Store the signing secret before switching the provider's callback URL.** If the provider posts to a V2 URL without a secret available, every request fails with `400` and the provider may auto-disable the endpoint. Slack, for example, disables URLs after ~36 hours of consecutive failures.-</Callout>-</Step>-<Step>-### Add an app-level token (Slack-specific, optional)--Slack uses an app-level token to resolve which connected user is authorized for a given event. This unlocks events that aren't otherwise scoped to a single user — DMs, private channels, and reactions:--- `SLACK_DIRECT_MESSAGE_RECEIVED` — always required.-- `SLACK_CHANNEL_MESSAGE_RECEIVED` — required for **private channels** and **multi-person DMs**; public-channel messages are delivered without it.-- `SLACK_MESSAGE_REACTION_ADDED` — always required (reactions don't carry channel-type metadata, so per-user authorization runs unconditionally).--Skip this step if you only need public-channel messages today. You can add the token later by re-running the `PATCH` below.--```bash-curl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \- -H "Content-Type: application/json" \- -d '{- "data": {- "app_token": "xapp-..."- }- }'-```--Generate the token from **Slack app → Basic Information → App-Level Tokens** with scope `authorizations:read`.--<Callout>-**Other V2 toolkits will have different secondary fields.** Always read `setup_fields` from the schema endpoint (step 1) — the field names, descriptions, and which are required are the source of truth.-</Callout>-</Step>-<Step>-### Point the provider's app dashboard at the V2 URL--For Slack, set **Event Subscriptions → Request URL** to the `webhook_url` returned in step 2. Composio responds to Slack's `url_verification` challenge automatically — you don't need to write any handshake code on your side.--The same applies to other providers Composio supports on V2: Composio handles the verification challenge (Asana `X-Hook-Secret`, Outlook validation tokens, and so on) so the URL verifies on first save.-</Step>-<Step>-### Confirm the endpoint is verified--```bash-curl "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"-```--A populated `verified_at` timestamp on the response means the provider has successfully completed the handshake against your endpoint. Once `verified_at` is set, you can [create V2 trigger instances](/docs/setting-up-triggers/creating-triggers) that route through this endpoint.-</Step>-</Steps>--## Updating an endpoint--Use `PATCH` to update one field at a time (e.g. rotate just the signing secret):--```bash-curl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \- -H "Content-Type: application/json" \- -d '{ "data": { "webhook_signing_secret": "<NEW_SECRET>" } }'-```--Use `POST` to **replace** `data` wholesale — any field you don't include is cleared:--```bash-curl -X POST "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \- -H "Content-Type: application/json" \- -d '{ "data": { "webhook_signing_secret": "<NEW_SECRET>", "app_token": "<NEW_APP_TOKEN>" } }'-```--The `webhook_url` itself is immutable — it's tied to the endpoint's `we_*` id for the lifetime of the endpoint. Rotating the signing secret on the provider side is a `PATCH` on the existing endpoint, not a new endpoint.--## Listing endpoints--```bash-curl "https://backend.composio.dev/api/v3.1/webhook_endpoints" \- -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"-```--Returns every endpoint in the current project with `verified_at` populated for the ones that have completed the handshake. Use this when you're operating across many OAuth apps and want a quick health view.--## Migrating from V1--If you already have V1 trigger instances running, your existing setup is unchanged — V1 ingress URLs (`/api/v3/trigger_instances/{toolkit}/{project_id}/handle`) are not deprecated and every legacy slug (`SLACK_RECEIVE_*`, `SLACKBOT_*`, etc.) keeps routing through V1.--You only need to set up a V2 webhook endpoint in two cases:--1. **You want to use a V2 trigger slug.** For Slack, that's `SLACK_CHANNEL_MESSAGE_RECEIVED`, `SLACK_DIRECT_MESSAGE_RECEIVED`, or `SLACK_MESSAGE_REACTION_ADDED`. Without an endpoint, the upsert call returns `400`.-2. **You want to consolidate an OAuth app onto V2.** Pick the project that should own the OAuth app on V2, set up an endpoint there, and update the provider's callback URL.--Even outside these cases, moving an OAuth app to V2 is recommended for the security wins — ingress signature verification, project-scoped fan-out, and per-user authorization for app-level events. See the [V2 announcement](/docs/changelog/2026/04/27) for the full migration walkthrough and the V1 → V2 slug mapping for Slack.--## What to read next--<Cards>- <Card icon={<Zap />} title="Creating triggers" href="/docs/setting-up-triggers/creating-triggers" description="Create trigger instances once your endpoint is configured" />- <Card icon={<Plug />} title="Subscribing to events" href="/docs/setting-up-triggers/subscribing-to-events" description="Set up the URL Composio delivers events to" />- <Card icon={<ShieldCheck />} title="Verifying webhooks" href="/docs/webhook-verification" description="Verify the signature on every Composio-to-your-endpoint delivery" />-</Cards>diff --git a/docs/content/docs/setting-up-triggers/creating-triggers.mdx b/docs/content/docs/setting-up-triggers/creating-triggers.mdxindex 8a6bb0193..7666a112e 100644--- a/docs/content/docs/setting-up-triggers/creating-triggers.mdx+++ b/docs/content/docs/setting-up-triggers/creating-triggers.mdx@@ -1,7 +1,7 @@---title: Creating triggers-description: Create trigger instances via the dashboard or SDK-keywords: [triggers, create trigger, trigger config]+description: Configure the webhook endpoint when needed, then create trigger instances via the dashboard or SDK+keywords: [triggers, create trigger, trigger config, webhook endpoint, signing secret]---Create a trigger to start receiving events. A trigger watches for a specific event (e.g., `GITHUB_COMMIT_EVENT`) on a specific user's connected account. For an overview of how triggers work, see [Triggers](/docs/triggers).@@ -10,10 +10,168 @@ Create a trigger to start receiving events. A trigger watches for a specific eveBefore creating triggers, ensure you have:- An [auth config](/docs/authentication#how-composio-manages-authentication) for the toolkit you want to monitor- A connected account for the user whose events you want to capture-- For V2 toolkits (Slack today), a [webhook endpoint](/docs/setting-up-triggers/configuring-webhook-endpoints) configured for the OAuth app — without it, the upsert call returns `400`. See the [delivery models](/docs/triggers#three-delivery-models) table to check whether your toolkit needs this.+- For toolkits where you need to register the webhook endpoint yourself (today: Slack and Notion, when you bring your own OAuth app), the [webhook endpoint configured](#configuring-the-webhook-endpoint) before you create any triggers — see the section below to check whether yours applies.</Callout>-You can create triggers using the [SDK](#using-the-sdk) or the Composio [dashboard](#using-the-dashboard).+## Configuring the webhook endpoint++For a webhook trigger to fire, the provider has to know where to post events. For most toolkits, Composio handles this for you — you don't see or set up anything. For a small set of toolkits (today: **Slack** and **Notion**, with more arriving on the same flow), you set up a `webhook_endpoint` once per OAuth app: paste the provider's signing secret onto it, take the URL Composio returns, and paste that URL into the provider's app dashboard.++<Callout>+**You only do this if you bring your own OAuth app.** With Composio-managed OAuth apps, the webhook endpoint is already provisioned and you can skip ahead to [Using the SDK](#using-the-sdk).+</Callout>++### Step 1: Discover whether you need to configure anything++Call the schema endpoint for your toolkit. The response is the source of truth.++```bash+curl "https://backend.composio.dev/api/v3.1/webhook_endpoints/schema?toolkit_slug={toolkit_slug}" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"+```++- **Empty / no `setup_fields`** → Composio handles the endpoint for you (e.g. Asana). Skip the rest of this section and go to [Using the SDK](#using-the-sdk).+- **One or more `setup_fields`** → You configure the endpoint yourself. The fields tell you exactly what to collect from the provider's app dashboard.++Sample response for Slack:++```json+{+ "toolkit_slug": "slack",+ "setup_fields": {+ "webhook_signing_secret": {+ "display_name": "Signing Secret",+ "description": "Webhook request signing secret from your Slack app dashboard",+ "is_required": true,+ "is_secret": true+ },+ "app_token": {+ "display_name": "App-Level Token",+ "description": "Slack xapp- token with authorizations:read scope for event authorization",+ "is_required": true,+ "is_secret": true+ }+ }+}+```++### Step 2: Create the endpoint++```bash+curl -X POST "https://backend.composio.dev/api/v3.1/webhook_endpoints" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \+ -H "Content-Type: application/json" \+ -d '{+ "toolkit_slug": "slack",+ "client_id": "<YOUR_OAUTH_CLIENT_ID>"+ }'+```++Sample response:++```json+{+ "id": "we_abc123",+ "toolkit_slug": "slack",+ "client_id": "<YOUR_OAUTH_CLIENT_ID>",+ "webhook_url": "https://backend.composio.dev/api/v3.1/webhook_ingress/slack/we_abc123/trigger_event",+ "data": null,+ "created_at": "2026-04-24T10:00:00.000Z"+}+```++Hold on to two values from the response: `id` (used as `<ENDPOINT_ID>` below) and `webhook_url` (you'll paste this into the provider's app dashboard in step 4). The call is **idempotent per `(toolkit_slug, client_id)` within a project** — calling it again with the same pair returns the existing endpoint without rotating the URL or wiping the secret.++<Callout type="warn">+**A `webhook_endpoint` ties one OAuth app to exactly one project.** If you currently share an OAuth app across multiple Composio projects, either consolidate to one project or register separate OAuth apps per project before creating an endpoint — the provider dashboard accepts only one callback URL per OAuth app.+</Callout>++### Step 3: Store the credentials returned by the schema++`PATCH` each field returned by the schema endpoint. For Slack, that's the signing secret and (when applicable) the app-level token.++```bash+curl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \+ -H "Content-Type: application/json" \+ -d '{+ "data": {+ "webhook_signing_secret": "<SIGNING_SECRET>"+ }+ }'+```++For Slack, the signing secret lives at **Slack app → Basic Information → App Credentials → Signing Secret**.++<Callout type="warn">+**Store the credentials before you switch the provider's callback URL in step 4.** If the provider posts to the URL without a secret on the endpoint, every request fails with `400`, and the provider may auto-disable the endpoint after a window of consecutive failures (Slack: ~36 hours).+</Callout>++For toolkits with additional fields — Slack's `app_token`, for instance, which is required for direct messages, private channels, and reactions — `PATCH` them in the same way:++```bash+curl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \+ -H "Content-Type: application/json" \+ -d '{+ "data": {+ "app_token": "xapp-..."+ }+ }'+```++Generate the Slack app-level token from **Slack app → Basic Information → App-Level Tokens** with scope `authorizations:read`.++<Callout>+The schema response is the source of truth for which fields each toolkit needs. Always read `setup_fields` (step 1) for the toolkit you're configuring rather than assuming the Slack shape.+</Callout>++### Step 4: Point the provider's app dashboard at the URL++Paste the `webhook_url` from step 2 into the provider's app dashboard:++- **Slack** → Event Subscriptions → Request URL+- **Notion** → Webhook Endpoints (in the integration's settings)++Composio responds to the provider's verification challenge automatically (Slack `url_verification`, Notion's verification token, and so on) — you don't write any handshake code on your side.++### Step 5: Confirm the endpoint is verified++```bash+curl "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"+```++A populated `verified_at` timestamp on the response means the provider has completed the handshake. You can now create trigger instances on this OAuth app.++### Updating an endpoint++To rotate the signing secret or update any single field, `PATCH` it (other fields are preserved):++```bash+curl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \+ -H "Content-Type: application/json" \+ -d '{ "data": { "webhook_signing_secret": "<NEW_SECRET>" } }'+```++To **replace** `data` wholesale (any field you don't include is cleared), `POST` to the same URL:++```bash+curl -X POST "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \+ -H "Content-Type: application/json" \+ -d '{ "data": { "webhook_signing_secret": "<NEW_SECRET>", "app_token": "<NEW_APP_TOKEN>" } }'+```++The `webhook_url` itself is immutable for the lifetime of the endpoint — rotating the signing secret on the provider side is a `PATCH` on the existing endpoint, not a new one.++To list every endpoint in the current project (useful when operating across many OAuth apps):++```bash+curl "https://backend.composio.dev/api/v3.1/webhook_endpoints" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"+```## Using the SDK@@ -90,7 +248,7 @@ Trigger instances default to the `'latest'` toolkit version. If your code parses## What to read next<Cards>- <Card icon={<RouteIcon />} title="Configuring webhook endpoints" href="/docs/setting-up-triggers/configuring-webhook-endpoints" description="Required for V2 toolkits (Slack today): register the provider's signing secret and ingress URL" /><Card icon={<Plug />} title="Subscribing to events" href="/docs/setting-up-triggers/subscribing-to-events" description="Receive trigger events via webhooks or SDK subscriptions" />+ <Card icon={<ShieldCheck />} title="Verifying webhooks" href="/docs/webhook-verification" description="Validate webhook signatures so you know payloads came from Composio" /><Card icon={<Wrench />} title="Managing triggers" href="/docs/setting-up-triggers/managing-triggers" description="List, enable, disable, and delete trigger instances" /></Cards>diff --git a/docs/content/docs/setting-up-triggers/meta.json b/docs/content/docs/setting-up-triggers/meta.jsonindex 250e4497e..b08a63928 100644--- a/docs/content/docs/setting-up-triggers/meta.json+++ b/docs/content/docs/setting-up-triggers/meta.json@@ -2,7 +2,6 @@"title": "Using Triggers","pages": ["creating-triggers",- "configuring-webhook-endpoints","subscribing-to-events","managing-triggers"]diff --git a/docs/content/docs/setting-up-triggers/subscribing-to-events.mdx b/docs/content/docs/setting-up-triggers/subscribing-to-events.mdxindex 6ae2f754b..8981fd536 100644--- a/docs/content/docs/setting-up-triggers/subscribing-to-events.mdx+++ b/docs/content/docs/setting-up-triggers/subscribing-to-events.mdx@@ -7,7 +7,7 @@ keywords: [webhooks, subscribe, events, webhook payload, V3]<Callout>Two webhook URLs sit on opposite sides of Composio — keep them distinct in your head.-- **Provider → Composio (ingress).** Composio handles this for you. For most toolkits there's nothing to do; for V2 toolkits like Slack you [configure a webhook endpoint](/docs/setting-up-triggers/configuring-webhook-endpoints) once per OAuth app.+- **Provider → Composio (ingress).** A webhook endpoint per OAuth app — Composio configures it for you in most cases. When you bring your own OAuth app on a toolkit like Slack or Notion, you [configure the webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint) once per OAuth app.- **Composio → your application (subscription).** This page covers this side: you tell Composio which URL to deliver events to, and Composio signs every request.</Callout>diff --git a/docs/content/docs/triggers.mdx b/docs/content/docs/triggers.mdxindex 90c902c11..a759680f5 100644--- a/docs/content/docs/triggers.mdx+++ b/docs/content/docs/triggers.mdx@@ -1,40 +1,56 @@---title: Triggersdescription: Understand how Composio delivers event data from connected apps-keywords: [triggers, webhooks, events, polling, webhook endpoints, concepts]+keywords: [triggers, webhooks, events, polling, webhook endpoint, concepts]---When events occur in apps, like a new Slack message, a GitHub commit, or an incoming email, triggers send event data to your application as structured payloads.<Figure src="/images/triggers-flow.svg" srcDark="/images/triggers-flow-dark.svg" alt="Triggers flow: Connected apps send events to Composio, which delivers them to your webhook endpoint via HTTP POST" caption="How triggers deliver events from apps to your application" />-## Three delivery models+## Two delivery types-Every Composio trigger fits one of three delivery models. The model is a property of the trigger type, not something you choose — but knowing which model your trigger uses tells you exactly what setup is required.+| Type | What happens | Examples |+|---|---|---|+| **Webhook** | The provider posts events to a Composio-issued ingress URL in real time. Composio verifies the provider's signature, then fans the event out to matching trigger instances. | Slack, GitHub, Asana, Notion, Outlook, ... |+| **Polling** | Composio polls the provider on a schedule. Composio managed auth has a 15-minute minimum interval; expect that as the worst-case delay between source event and delivery. | Gmail |++The delivery type is a property of the trigger type, not something you choose.++## Webhook endpoints-| Delivery model | What Composio does | What you do |+Every webhook trigger routes through a **webhook endpoint** — a project-scoped resource that owns the ingress URL the provider posts to and the signing secret used to verify each request. Endpoints are keyed by `(toolkit_slug, project_id, client_id)`, so each OAuth app gets its own URL:++```+https://backend.composio.dev/api/v3.1/webhook_ingress/{toolkit_slug}/{we_xxx}/trigger_event+```++There are two ways an endpoint gets configured:++| Configuration | When it applies | What you do ||---|---|---|-| **Polling** | Composio polls the provider on a schedule (15-minute minimum on Composio managed auth) | Just create the trigger |-| **User-level webhook** | Composio registers a per-user webhook with the provider when you create the trigger, and deregisters it when you delete the trigger | Just create the trigger |-| **App-level webhook endpoint** | Composio gives you one ingress URL per OAuth app; you point the provider's app dashboard at it once | Configure a [webhook endpoint](/docs/setting-up-triggers/configuring-webhook-endpoints) for the OAuth app, then create triggers normally |+| **Composio configures it for you** | Composio-managed OAuth apps (any toolkit) **or** your own OAuth app on a toolkit Composio can register webhooks for on your behalf using the connected user's credentials (e.g. **Asana**) | Nothing — endpoint setup, signature verification, and provider-side registration happen automatically when you create the trigger |+| **You configure it** | Your own OAuth app on a toolkit whose provider posts events at the OAuth-app level (today: **Slack** and **Notion**; more toolkits will follow on this same flow) | Once per OAuth app, before creating triggers — see [Configuring the webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint) |-<Accordions>-<Accordion title="Which model does each toolkit use?">-- **Polling** — toolkits without outbound webhooks (e.g. Gmail).-- **User-level webhook** — most webhook-capable toolkits (Asana, Outlook, GitHub repo events, and so on). Composio handles the provider-side webhook lifecycle for you.-- **App-level webhook endpoint** (V2) — toolkits whose providers post events at the OAuth-app level rather than per-user, currently **Slack**. More toolkits will move to V2 over time. See [Webhook Triggers V2](/docs/changelog/2026/04/27) for the full announcement.-</Accordion>-<Accordion title="What is a trigger type?">-A trigger type is a template that defines what event to listen for and what configuration is required. For example, `GITHUB_COMMIT_EVENT` requires an `owner` and `repo`. Each toolkit exposes its own set of trigger types.-</Accordion>-<Accordion title="What is a trigger instance?">-When you create a trigger from a type, it's scoped to a specific [user and connected account](/docs/users-and-sessions). For example, creating a `GITHUB_COMMIT_EVENT` trigger for user `alice` on the `composio` repo produces a trigger instance with its own `ti_*` ID that you can enable, disable, or delete independently.-</Accordion>-</Accordions>+<Callout>+**If you use Composio-managed credentials, you don't need to configure anything — skip ahead to [Creating triggers](/docs/setting-up-triggers/creating-triggers).** Manual webhook-endpoint setup only applies when you bring your own OAuth app.+</Callout>++### Checking which case applies to your toolkit++The single source of truth is the schema endpoint. Call it for the toolkit you're integrating; the response tells you exactly what to do.++```bash+curl "https://backend.composio.dev/api/v3.1/webhook_endpoints/schema?toolkit_slug={toolkit_slug}" \+ -H "x-api-key: <YOUR_COMPOSIO_API_KEY>"+```++- **`setup_fields` is empty / not present** → Composio configures the endpoint for you. Nothing to do.+- **`setup_fields` lists one or more fields** → You configure the endpoint. The fields tell you what credentials to collect from the provider (signing secret, app-level token, etc.). Today this applies to **Slack** and **Notion**; the list will grow as more toolkits move onto this flow.## End-to-end flow-For every trigger, regardless of delivery model, events take the same path on the way to your application:+For every webhook trigger, an event takes the same path on the way to your application:```provider event ──▶ Composio ingress ──▶ trigger fan-out ──▶ webhook subscription ──▶ your endpoint@@ -44,25 +60,25 @@ Two webhook URLs sit on opposite sides of Composio. Don't confuse them:| URL | Direction | Who configures it ||---|---|---|-| **Ingress** (`/api/v3.1/trigger_instances/.../handle` for V1, `/api/v3.1/webhook_ingress/...` for V2) | Provider → Composio | Composio (V1, automatic) or you, once per OAuth app (V2 — see [Configuring webhook endpoints](/docs/setting-up-triggers/configuring-webhook-endpoints)) |+| **Ingress** (`/api/v3.1/webhook_ingress/...`) | Provider → Composio | Composio for most cases; you for your-own-OAuth on toolkits like Slack and Notion — see [Webhook endpoints](#webhook-endpoints) above || **Webhook subscription** (your URL) | Composio → your application | You, once per project — see [Subscribing to triggers](/docs/setting-up-triggers/subscribing-to-events) |Composio verifies signatures on both hops:-- On ingress, V2 endpoints verify the provider's signature against the signing secret you stored on the endpoint. Unsigned or tampered requests are rejected before any trigger fires.-- On delivery, every webhook Composio sends to your endpoint is signed with your subscription secret — verify it as described in [Verifying webhooks](/docs/webhook-verification).+- **At ingress**, every inbound request is verified against the signing secret on the webhook endpoint. Unsigned or tampered requests are rejected before any trigger fires. For toolkits where Composio configures the endpoint, the signing secret is sourced from the connected account's credentials; for toolkits where you configure it, you store the secret on the endpoint yourself.+- **At delivery**, every webhook Composio sends to your endpoint is signed with your subscription secret — verify it as described in [Verifying webhooks](/docs/webhook-verification).## Working with triggers<Steps><Step>-**Configure delivery to your application.** Create a [webhook subscription](/docs/setting-up-triggers/subscribing-to-events) so Composio knows which URL to deliver events to. This is a one-time step per project.+**Configure delivery to your application.** Create a [webhook subscription](/docs/setting-up-triggers/subscribing-to-events) so Composio knows which URL to deliver events to. One-time per project.</Step><Step>-**Configure ingress (V2 toolkits only).** For toolkits on V2 (currently Slack), [create a webhook endpoint](/docs/setting-up-triggers/configuring-webhook-endpoints) and point the provider's app dashboard at the URL Composio returns. One-time per OAuth app.+**Configure ingress (only when needed).** Use the [schema endpoint](#checking-which-case-applies-to-your-toolkit) to check whether your toolkit needs a manually-configured webhook endpoint; if it does, [create one](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint) and point the provider's app dashboard at the URL Composio returns. One-time per OAuth app.</Step><Step>-**Discover** available trigger types for a toolkit (e.g. `GITHUB_COMMIT_EVENT`).+**Discover** available trigger types for the toolkit (e.g. `GITHUB_COMMIT_EVENT`).</Step><Step>**Create** an active trigger scoped to a user's connected account — see [Creating triggers](/docs/setting-up-triggers/creating-triggers).@@ -75,6 +91,15 @@ Composio verifies signatures on both hops:</Step></Steps>+<Accordions>+<Accordion title="What is a trigger type?">+A trigger type is a template that defines what event to listen for and what configuration is required. For example, `GITHUB_COMMIT_EVENT` requires an `owner` and `repo`. Each toolkit exposes its own set of trigger types.+</Accordion>+<Accordion title="What is a trigger instance?">+When you create a trigger from a type, it's scoped to a specific [user and connected account](/docs/users-and-sessions). For example, creating a `GITHUB_COMMIT_EVENT` trigger for user `alice` on the `composio` repo produces a trigger instance with its own `ti_*` ID that you can enable, disable, or delete independently.+</Accordion>+</Accordions>+<Callout>Triggers are scoped to a connected account. If you haven't set up authentication yet, see [Authentication](/docs/authentication).</Callout>@@ -82,8 +107,7 @@ Triggers are scoped to a connected account. If you haven't set up authentication## Next steps<Cards>- <Card icon={<Zap />} title="Creating triggers" href="/docs/setting-up-triggers/creating-triggers" description="Create trigger instances via the dashboard or SDK" />- <Card icon={<RouteIcon />} title="Configuring webhook endpoints" href="/docs/setting-up-triggers/configuring-webhook-endpoints" description="One-time setup for V2 toolkits like Slack: create an ingress URL, store the signing secret, point the provider at it" />+ <Card icon={<Zap />} title="Creating triggers" href="/docs/setting-up-triggers/creating-triggers" description="Configure the webhook endpoint (when needed), then create trigger instances via the dashboard or SDK" /><Card icon={<Plug />} title="Subscribing to events" href="/docs/setting-up-triggers/subscribing-to-events" description="Receive trigger events via webhooks or SDK subscriptions" /><Card icon={<ShieldCheck />} title="Verifying webhooks" href="/docs/webhook-verification" description="Verify webhook signatures and understand payload versions" /><Card icon={<Wrench />} title="Managing triggers" href="/docs/setting-up-triggers/managing-triggers" description="Discover, list, enable, disable, and delete triggers" />diff --git a/docs/content/docs/troubleshooting/triggers.mdx b/docs/content/docs/troubleshooting/triggers.mdxindex 2b958bed0..2aeeb977d 100644--- a/docs/content/docs/troubleshooting/triggers.mdx+++ b/docs/content/docs/troubleshooting/triggers.mdx@@ -14,12 +14,14 @@ Check the error message — the connected account might not have sufficient perm- **Trigger status**: Verify the trigger is enabled, not disabled.- **Logs**: Check the [trigger logs](https://platform.composio.dev?next_page=/logs/triggers) in the dashboard for delivery attempts and errors.-## V2 webhook endpoint issues (Slack and other V2 toolkits)+## Webhook endpoint issues (your-own OAuth on Slack, Notion, etc.)-- **`400` on every provider request.** The signing secret is missing or wrong on the [webhook endpoint](/docs/setting-up-triggers/configuring-webhook-endpoints). `PATCH` the endpoint with the secret before pointing the provider's dashboard at the URL — Slack auto-disables endpoints after ~36 hours of consecutive failures.-- **`400` on trigger upsert for V2 slugs.** The OAuth app's `client_id` doesn't have a webhook endpoint in this project. Create one via `POST /api/v3.1/webhook_endpoints`.+These only apply when you've configured the webhook endpoint yourself — see [Configuring the webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint). With Composio-managed OAuth apps, the endpoint is provisioned automatically and these issues don't apply.++- **`400` on every provider request.** The signing secret on the [webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint) is missing or wrong. `PATCH` the endpoint with the secret before pointing the provider's dashboard at the URL — Slack auto-disables endpoints after ~36 hours of consecutive failures.+- **`400` on trigger upsert.** The OAuth app's `client_id` doesn't have a webhook endpoint in this project. Create one via `POST /api/v3.1/webhook_endpoints`.- **`verified_at` is null on the endpoint.** The provider hasn't completed the URL verification handshake yet. Re-save the URL in the provider's dashboard; for Slack, click **Save Changes** on Event Subscriptions.-- **DMs / private channels / reactions don't fire on Slack.** The `app_token` is missing on the endpoint. `PATCH` the endpoint with an `xapp-` token that has the `authorizations:read` scope. See [Configuring webhook endpoints](/docs/setting-up-triggers/configuring-webhook-endpoints) for which Slack triggers require this.+- **DMs / private channels / reactions don't fire on Slack.** The `app_token` is missing on the endpoint. `PATCH` the endpoint with an `xapp-` token that has the `authorizations:read` scope. See [Configuring the webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint) for which Slack triggers require this.- **Replay-window rejections.** For providers that sign a timestamp (Slack), requests outside the allowed skew window are rejected. Make sure the system posting the events isn't replaying old payloads.## Type errors with trigger payloadsdiff --git a/docs/content/docs/webhook-verification.mdx b/docs/content/docs/webhook-verification.mdxindex b12d24392..36d8ac38f 100644--- a/docs/content/docs/webhook-verification.mdx+++ b/docs/content/docs/webhook-verification.mdx@@ -7,7 +7,7 @@ keywords: [webhook, verification, signature, HMAC, security]Composio signs every webhook request. Always verify signatures in production to ensure payloads are authentic.<Callout>-**Two signatures, two responsibilities.** Composio verifies provider signatures on the **ingress** hop (provider → Composio); you verify Composio's signature on the **delivery** hop (Composio → your endpoint). This page covers the delivery hop. Ingress verification is automatic for V2 endpoints — see [Ingress signature verification (V2)](#ingress-signature-verification-v2) below.+**Two signatures, two responsibilities.** Composio verifies provider signatures on the **ingress** hop (provider → Composio); you verify Composio's signature on the **delivery** hop (Composio → your endpoint). This page covers the delivery hop. Ingress verification happens automatically — see [Ingress signature verification](#ingress-signature-verification) below.</Callout>## SDK verification@@ -197,28 +197,29 @@ Metadata fields are mixed into the `data` object alongside event data.</Tab></Tabs>-## Ingress signature verification (V2)+## Ingress signature verification-For V2 toolkits — currently Slack — Composio verifies the provider's signature against the signing secret stored on the [webhook endpoint](/docs/setting-up-triggers/configuring-webhook-endpoints) **before** any trigger fires. Unsigned or tampered requests are rejected at ingress with `400`, so third parties cannot spoof events onto your triggers.+Composio verifies the provider's signature on every inbound request against the signing secret stored on the [webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint) **before** any trigger fires. Unsigned or tampered requests are rejected at ingress with `400`, so third parties cannot spoof events onto your triggers.-You don't write any code for this hop — your responsibility is to store the right signing secret on the endpoint:+This hop is automatic — you don't write any code. Your responsibility is just to make sure the signing secret on the endpoint is correct:++- **Composio-managed OAuth apps** — Composio sources the signing secret from the connected user's credentials; nothing to do.+- **Your own OAuth app on a toolkit that needs manual configuration** (today: Slack, Notion) — `PATCH` the signing secret onto the endpoint as part of [Configuring the webhook endpoint](/docs/setting-up-triggers/creating-triggers#configuring-the-webhook-endpoint):```bashcurl -X PATCH "https://backend.composio.dev/api/v3.1/webhook_endpoints/<ENDPOINT_ID>" \-H "x-api-key: <YOUR_COMPOSIO_API_KEY>" \-H "Content-Type: application/json" \- -d '{ "data": { "webhook_signing_secret": "<YOUR_SLACK_SIGNING_SECRET>" } }'+ -d '{ "data": { "webhook_signing_secret": "<SIGNING_SECRET>" } }'```-Composio uses the algorithm appropriate for each provider — HMAC-SHA256 for Slack, Ed25519 or shared-token matching for others. For providers that sign a request timestamp (Slack does), replay protection additionally rejects requests outside the allowed skew window.--V1 ingress URLs (`/api/v3/trigger_instances/{toolkit}/{project_id}/handle`) continue to work as they do today; this section is only relevant for endpoints you've created on V2.+Composio uses the algorithm each provider expects — HMAC-SHA256 for Slack, Ed25519 or shared-token matching for others. For providers that sign a request timestamp (Slack does), replay protection additionally rejects requests outside the allowed skew window.## What to read next<Cards><Card icon={<Plug />} title="Subscribing to events" href="/docs/setting-up-triggers/subscribing-to-events" description="Set up webhooks and SDK subscriptions to receive trigger events" />- <Card icon={<RouteIcon />} title="Configuring webhook endpoints" href="/docs/setting-up-triggers/configuring-webhook-endpoints" description="V2 ingress setup: store the provider's signing secret on the endpoint" />+ <Card icon={<RouteIcon />} title="Creating triggers" href="/docs/setting-up-triggers/creating-triggers" description="Configure the webhook endpoint when needed and create trigger instances" /><Card icon={<Zap />} title="Triggers overview" href="/docs/triggers" description="How Composio delivers event data from connected apps" /><Card icon={<Key />} title="Connection expiry events" href="/docs/subscribing-to-connection-expiry-events" description="Detect when OAuth connections expire and prompt re-authentication" /></Cards>