> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# WebhookEndpoints

> `composio.webhooks.endpoints` — inbound webhook endpoints. Each endpoint is the ingress URL Composio exposes for one toolkit + OAuth app pair, which you register with the third-party provider so it can push events to Composio.

## Usage

Access this class through the `composio.webhookEndpoints` property:

```typescript theme={null}
const composio = new Composio({ apiKey: 'your-api-key' });
const result = await composio.webhookEndpoints.list();
```

## Methods

### create()

Create a webhook endpoint for a toolkit + OAuth app pair. Returns the existing endpoint when one already exists for that pair.

```typescript theme={null}
async create(params: WebhookEndpointCreateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `params` | `WebhookEndpointCreateParams` | `toolkitSlug` and `clientId` |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<WebhookEndpoint>` — The endpoint; register `webhookUrl` with the provider

**Example**

```typescript theme={null}
const endpoint = await composio.webhooks.endpoints.create({
  toolkitSlug: 'slack',
  clientId: 'my-slack-app-client-id',
});
```

***

### get()

Retrieve a webhook endpoint by its nano id.

```typescript theme={null}
async get(nanoId: string, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `nanoId` | `string` | The endpoint nano id (e.g. `we_abc123`) |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<WebhookEndpoint>` — The endpoint, with secret setup values masked

**Example**

```typescript theme={null}
const endpoint = await composio.webhooks.endpoints.get('we_abc123');
console.log(endpoint.webhookUrl);
```

***

### list()

List webhook endpoints, optionally filtered by toolkit.

```typescript theme={null}
async list(query?: WebhookEndpointListParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpointListResponse>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `query?` | `WebhookEndpointListParams` | Optional `toolkitSlug` filter |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<WebhookEndpointListResponse>` — The endpoints

**Example**

```typescript theme={null}
const { items } = await composio.webhooks.endpoints.list({ toolkitSlug: 'slack' });
```

***

### replace()

Replace the setup fields of a webhook endpoint. All required setup fields for the toolkit must be provided — this is the initial configuration.

```typescript theme={null}
async replace(nanoId: string, params: WebhookEndpointReplaceParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `nanoId` | `string` | The endpoint nano id |
| `params` | `WebhookEndpointReplaceParams` | `data` with every required setup field |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<WebhookEndpoint>` — The configured endpoint

**Example**

```typescript theme={null}
await composio.webhooks.endpoints.replace('we_abc123', {
  data: { signing_secret: process.env.SLACK_SIGNING_SECRET! },
});
```

***

### update()

Merge setup fields into a webhook endpoint. Omitted fields are preserved.

```typescript theme={null}
async update(nanoId: string, params: WebhookEndpointUpdateParams, requestOptions?: ComposioRequestOptions): Promise<WebhookEndpoint>
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `nanoId` | `string` | The endpoint nano id |
| `params` | `WebhookEndpointUpdateParams` | `data` with the fields to change |
| `requestOptions?` | `ComposioRequestOptions` | |

**Returns**

`Promise<WebhookEndpoint>` — The updated endpoint

**Example**

```typescript theme={null}
await composio.webhooks.endpoints.update('we_abc123', {
  data: { signing_secret: 'rotated-secret' },
});
```

***
