> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/advocate-program-settings/create-and-manage-advocate-webhook-subscriptions.md).

# AdvocateのWebhook購読を作成・管理する

Webhook は、イベントが発生したときに実行されるコードです。Advocate では、Webhook を使用して URL を登録できます。プログラム内でイベントが発生するたびに、その URL に対して POST を送信します。たとえば、新しい参加者にバニティクーポンコードが作成されると、イベントオブジェクトが作成されます。Webhook を作成・管理する方法は 2 つあります： [Advocate API 経由で](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-api/api-webhooks-for-advocate-programs) または Advocate プラットフォーム上で行う方法です。このヘルプ記事では、Advocate プラットフォームを通じて Webhook を管理する方法を説明します。

#### Webhook サブスクリプションを作成する

1. 上部のナビゲーションバーから ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2F210dEQa93qyQgoJDkieL%2FUser%20profile.svg?alt=media\&token=f84c5b17-fae4-4a30-990a-9de5e57a150b) **\[ユーザープロフィール] → 設定**.
2. 下の左列で *Advocate 設定*、次を選択します **Webhook**.
3. 上の *Webhook サブスクリプション* ページで、 **サブスクリプションを作成**.
4. 以下で *URL に POST*を選択し、アプリケーションが特定のイベントに関するリアルタイム更新を送信するために使用する一意のアドレスを入力します。
5. 必要に応じて、下に *Webhook 名*新しい Webhook サブスクリプションの名前を入力します。
6. 選択 **保存**.

#### Webhook ログのトラブルシューティング

Advocate がプログラム内でイベントが発生するたびに POST する URL を登録すると、ログを確認して、失敗した Webhook イベントのトラブルシューティングを行えます。

**Webhook ログにアクセスする**

1. 上部のナビゲーションバーから ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2F210dEQa93qyQgoJDkieL%2FUser%20profile.svg?alt=media\&token=f84c5b17-fae4-4a30-990a-9de5e57a150b) **\[ユーザープロフィール] → 設定**.
2. 下の左列で *Advocate 設定*、次を選択します **Webhook**.
3. 上の *Webhook サブスクリプション* ページで、 **ログを表示**.
4. 下のフィルターを使用して *Webhook イベントログ* Webhook を絞り込みます。
   * 次を参照してください *フィルターリファレンス* 詳細は以下をご覧ください。

<details>

<summary>フィルターリファレンス</summary>

| フィルター | 説明                                                                                                                                                                       |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 種類    | Webhook のフィルター [イベントタイプ](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-api/api-webhooks-for-advocate-programs)。このフィルターの既定値は *すべてのタイプ*. |
| 期間    | Webhook が最後に更新された期間で絞り込みます。このフィルターの既定値は *全期間*.                                                                                                                           |

</details>

**Webhook の詳細を表示**

1. 特定の Webhook を選択して *Webhook の詳細* ビューを開きます。
2. このビューには、Webhook サブスクリプションのトラブルシューティングに使用できる情報が表示されます。
   * 次を参照してください *イベント参照* 詳細は以下をご覧ください。

<details>

<summary>イベント参照</summary>

| フィルター        | 説明                                                                                                                                                              |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 種類           | その Webhook [イベントタイプ](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-api/api-webhooks-for-advocate-programs).                   |
| Webhook ID   | Webhook の一意の識別子。                                                                                                                                                |
| 作成日          | Webhook が作成された日付。                                                                                                                                               |
| イベントデータ      | その Webhook [ペイロード](https://integrations.impact.com/integration-guides/for-brands/advocate/advocate-api/api-webhooks-for-advocate-programs).                     |
| サブスクリプション    | Webhook が送信された Webhook サブスクリプションと、そのステータス。                                                                                                                      |
| サブスクリプションの詳細 | Webhook サブスクリプションのエンドポイントから受信した応答の詳細です。詳細には、Webhook の配信試行のタイムスタンプ、送信先から受け取った HTTP ステータスコード、または送信先サーバーからの応答を受信するまでにリクエストに時間がかかりすぎたために試行がタイムアウトしたかどうかを含めることができます。 |

</details>

**失敗したイベント配信のための Webhook 再試行システム**

* Rest hook は、イベントがトリガーされた直後に配信されます。エンドポイントが配信試行に正常に応答しない場合（つまり、200 以外のステータスコードを返した場合）、その配信は失敗と見なされます。
* 失敗した配信は、成功するか、72 回の試行が行われるまで（1 時間に 1 回の再試行で約 3 日）、前回の失敗試行から 1 時間ごとに再試行されます。
* エラーを継続的に返す Webhook エンドポイントは、次のエラー数に達すると自動的に無効化されます：

  | ステータスコード | 受信したエラー |
  | -------- | ------- |
  | 4xx エラー  | 1000    |
  | 5xx エラー  | 2000    |
  | 3xx エラー  | 2000    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/advocate-program/advocate-program-settings/create-and-manage-advocate-webhook-subscriptions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
