> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WebhooksClient

> Reference for the WebhooksClient class in the X API TypeScript SDK. Methods, parameters, and return types for the X API v2 webhooks endpoints.

Client for webhooks operations

This client provides methods for interacting with the webhooks endpoints
of the X API. It handles authentication, request formatting, and response
parsing for all webhooks related operations.

## Constructors

### constructor

• **new WebhooksClient**(`client`): [`WebhooksClient`](/xdks/typescript/reference/classes/WebhooksClient)

Creates a new webhooks client instance

#### Parameters

| Name     | Type                                                  | Description                    |
| :------- | :---------------------------------------------------- | :----------------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | The main X API client instance |

#### Returns

[`WebhooksClient`](/xdks/typescript/reference/classes/WebhooksClient)

#### Defined in

[webhooks/client.ts:162](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L162)

## Methods

### createStreamLink

▸ **createStreamLink**(`webhookId`, `options`): `Promise`\<`Response`>

Create stream link
Creates a link to deliver FilteredStream events to the given webhook.

#### Parameters

| Name        | Type                                                                    | Description                                            |
| :---------- | :---------------------------------------------------------------------- | :----------------------------------------------------- |
| `webhookId` | `string`                                                                | The webhook ID to link to your FilteredStream ruleset. |
| `options`   | `CreateStreamLinkOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                      |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:207](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L207)

▸ **createStreamLink**(`webhookId`, `options?`): `Promise`\<[`WebhookLinksCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse)>

#### Parameters

| Name        | Type                      |
| :---------- | :------------------------ |
| `webhookId` | `string`                  |
| `options?`  | `CreateStreamLinkOptions` |

#### Returns

`Promise`\<[`WebhookLinksCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksCreateResponse)>

#### Defined in

[webhooks/client.ts:220](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L220)

***

### deleteStreamLink

▸ **deleteStreamLink**(`webhookId`, `options`): `Promise`\<`Response`>

Delete stream link
Deletes a link from FilteredStream events to the given webhook.

#### Parameters

| Name                         | Type     | Description                                            |
| :--------------------------- | :------- | :----------------------------------------------------- |
| `webhookId`                  | `string` | The webhook ID to link to your FilteredStream ruleset. |
| `options`                    | `Object` | -                                                      |
| `options.requestOptions`     | `Object` | -                                                      |
| `options.requestOptions.raw` | `true`   | -                                                      |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:433](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L433)

▸ **deleteStreamLink**(`webhookId`): `Promise`\<[`WebhookLinksDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse)>

#### Parameters

| Name        | Type     |
| :---------- | :------- |
| `webhookId` | `string` |

#### Returns

`Promise`\<[`WebhookLinksDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksDeleteResponse)>

#### Defined in

[webhooks/client.ts:446](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L446)

***

### getStreamLinks

▸ **getStreamLinks**(`options`): `Promise`\<`Response`>

Get stream links
Get a list of webhook links associated with a filtered stream ruleset.

#### Parameters

| Name                         | Type     |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:527](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L527)

▸ **getStreamLinks**(): `Promise`\<[`WebhookLinksGetResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse)>

#### Returns

`Promise`\<[`WebhookLinksGetResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookLinksGetResponse)>

#### Defined in

[webhooks/client.ts:536](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L536)

***

### createWebhookReplayJob

▸ **createWebhookReplayJob**(`options`): `Promise`\<`Response`>

Create replay job for webhook
Creates a replay job to retrieve events from up to the past 24 hours for all events delivered or attempted to be delivered to the webhook.

#### Parameters

| Name      | Type                                                                          |
| :-------- | :---------------------------------------------------------------------------- |
| `options` | `CreateWebhookReplayJobOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:605](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L605)

▸ **createWebhookReplayJob**(`options?`): `Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)>

#### Parameters

| Name       | Type                            |
| :--------- | :------------------------------ |
| `options?` | `CreateWebhookReplayJobOptions` |

#### Returns

`Promise`\<[`ReplayJobCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.ReplayJobCreateResponse)>

#### Defined in

[webhooks/client.ts:614](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L614)

***

### validate

▸ **validate**(`webhookId`, `options`): `Promise`\<`Response`>

Validate webhook
Triggers a CRC check for a given webhook.

#### Parameters

| Name                         | Type     | Description                     |
| :--------------------------- | :------- | :------------------------------ |
| `webhookId`                  | `string` | The ID of the webhook to check. |
| `options`                    | `Object` | -                               |
| `options.requestOptions`     | `Object` | -                               |
| `options.requestOptions.raw` | `true`   | -                               |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:704](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L704)

▸ **validate**(`webhookId`): `Promise`\<[`WebhookConfigPutResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse)>

#### Parameters

| Name        | Type     |
| :---------- | :------- |
| `webhookId` | `string` |

#### Returns

`Promise`\<[`WebhookConfigPutResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigPutResponse)>

#### Defined in

[webhooks/client.ts:717](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L717)

***

### delete

▸ **delete**(`webhookId`, `options`): `Promise`\<`Response`>

Delete webhook
Deletes an existing webhook configuration.

#### Parameters

| Name                         | Type     | Description                      |
| :--------------------------- | :------- | :------------------------------- |
| `webhookId`                  | `string` | The ID of the webhook to delete. |
| `options`                    | `Object` | -                                |
| `options.requestOptions`     | `Object` | -                                |
| `options.requestOptions.raw` | `true`   | -                                |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:808](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L808)

▸ **delete**(`webhookId`): `Promise`\<[`WebhookConfigDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse)>

#### Parameters

| Name        | Type     |
| :---------- | :------- |
| `webhookId` | `string` |

#### Returns

`Promise`\<[`WebhookConfigDeleteResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigDeleteResponse)>

#### Defined in

[webhooks/client.ts:821](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L821)

***

### get

▸ **get**(`options`): `Promise`\<`Response`>

Get webhook
Get a list of webhook configs associated with a client app.

#### Parameters

| Name      | Type                                                       |
| :-------- | :--------------------------------------------------------- |
| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:908](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L908)

▸ **get**(`options?`): `Promise`\<[`Get2WebhooksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse)>

#### Parameters

| Name       | Type         |
| :--------- | :----------- |
| `options?` | `GetOptions` |

#### Returns

`Promise`\<[`Get2WebhooksResponse`](/xdks/typescript/reference/interfaces/Schemas.Get2WebhooksResponse)>

#### Defined in

[webhooks/client.ts:917](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L917)

***

### create

▸ **create**(`options`): `Promise`\<`Response`>

Create webhook
Creates a new webhook configuration.

#### Parameters

| Name      | Type                                                          |
| :-------- | :------------------------------------------------------------ |
| `options` | `CreateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### Returns

`Promise`\<`Response`>

Promise resolving to the API response, or raw Response if requestOptions.raw is true

#### Defined in

[webhooks/client.ts:1023](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L1023)

▸ **create**(`options?`): `Promise`\<[`WebhookConfigCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse)>

#### Parameters

| Name       | Type            |
| :--------- | :-------------- |
| `options?` | `CreateOptions` |

#### Returns

`Promise`\<[`WebhookConfigCreateResponse`](/xdks/typescript/reference/interfaces/Schemas.WebhookConfigCreateResponse)>

#### Defined in

[webhooks/client.ts:1032](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/webhooks/client.ts#L1032)
