> ## 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

> X API TypeScript SDK の WebhooksClient クラスのリファレンス。 X API v2 の webhooks エンドポイントのメソッド、パラメーター、戻り値の型。

webhooks 操作向けのクライアント

このクライアントは X API の webhooks エンドポイントと対話するためのメソッドを提供します。認証、リクエストの整形、webhooks に関連するすべての操作のレスポンス解析を扱います。

## コンストラクター

### コンストラクター

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

新しい webhooks クライアントインスタンスを作成します

#### パラメーター

| 名前       | 型                                                     | 説明                      |
| :------- | :---------------------------------------------------- | :---------------------- |
| `client` | [`Client`](/xdks/typescript/reference/classes/Client) | メインの X API クライアントインスタンス |

#### 戻り値

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

#### 定義場所

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

## メソッド

### createStreamLink

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

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

#### パラメーター

| 名前          | 型                                                                       | 説明                                                     |
| :---------- | :---------------------------------------------------------------------- | :----------------------------------------------------- |
| `webhookId` | `string`                                                                | The webhook ID to link to your FilteredStream ruleset. |
| `options`   | `CreateStreamLinkOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } | -                                                      |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前          | 型                         |
| :---------- | :------------------------ |
| `webhookId` | `string`                  |
| `options?`  | `CreateStreamLinkOptions` |

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前                           | 型        | 説明                                                     |
| :--------------------------- | :------- | :----------------------------------------------------- |
| `webhookId`                  | `string` | The webhook ID to link to your FilteredStream ruleset. |
| `options`                    | `Object` | -                                                      |
| `options.requestOptions`     | `Object` | -                                                      |
| `options.requestOptions.raw` | `true`   | -                                                      |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前                           | 型        |
| :--------------------------- | :------- |
| `options`                    | `Object` |
| `options.requestOptions`     | `Object` |
| `options.requestOptions.raw` | `true`   |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前        | 型                                                                             |
| :-------- | :---------------------------------------------------------------------------- |
| `options` | `CreateWebhookReplayJobOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前         | 型                               |
| :--------- | :------------------------------ |
| `options?` | `CreateWebhookReplayJobOptions` |

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前                           | 型        | 説明                              |
| :--------------------------- | :------- | :------------------------------ |
| `webhookId`                  | `string` | The ID of the webhook to check. |
| `options`                    | `Object` | -                               |
| `options.requestOptions`     | `Object` | -                               |
| `options.requestOptions.raw` | `true`   | -                               |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前                           | 型        | 説明                               |
| :--------------------------- | :------- | :------------------------------- |
| `webhookId`                  | `string` | The ID of the webhook to delete. |
| `options`                    | `Object` | -                                |
| `options.requestOptions`     | `Object` | -                                |
| `options.requestOptions.raw` | `true`   | -                                |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前          | 型        |
| :---------- | :------- |
| `webhookId` | `string` |

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前        | 型                                                          |
| :-------- | :--------------------------------------------------------- |
| `options` | `GetOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前         | 型            |
| :--------- | :----------- |
| `options?` | `GetOptions` |

#### 戻り値

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

#### 定義場所

[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.

#### パラメーター

| 名前        | 型                                                             |
| :-------- | :------------------------------------------------------------ |
| `options` | `CreateOptions` & \{ `requestOptions`: \{ `raw`: `true`  }  } |

#### 戻り値

`Promise`\<`Response`>

API レスポンスに解決される Promise。requestOptions.raw が true の場合は生の Response を返します

#### 定義場所

[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)>

#### パラメーター

| 名前         | 型               |
| :--------- | :-------------- |
| `options?` | `CreateOptions` |

#### 戻り値

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

#### 定義場所

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