> 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 を送信します。たとえば、新しい参加者に対して特典クーポンコードが作成されたとき、event オブジェクトが作成されます。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. 上部のナビゲーションバーから、 ![](/files/173ecabf39fd91e83f3ac16fba44d8e9c845708d) **\[ユーザープロフィール] → \[設定]**.
2. 左側の列で、 *Advocate 設定*の下にある **Webhook**.
3. で *Webhook サブスクリプション* ページを開き、 **サブスクリプションを作成**.
4. の下に、 *URL に投稿*と入力します。ここには、特定のイベントに関するリアルタイム更新を送信するためにアプリケーションが使用する一意のアドレスを入力します。
5. 必要に応じて、 *Webhook 名*の下に、新しい webhook サブスクリプションの名前を入力します。
6. 次を選択します **保存**.

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

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

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

1. 上部のナビゲーションバーから、 ![](/files/173ecabf39fd91e83f3ac16fba44d8e9c845708d) **\[ユーザープロフィール] → \[設定]**.
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 の配信試行、試行のタイムスタンプ、送信先から受信した HTTP ステータスコード、送信先サーバーからの応答受信に時間がかかりすぎたために試行がタイムアウトしたかどうかが含まれます。 |

</details>

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

* Rest hook は、イベントがトリガーされた直後に配信されます。エンドポイントが配信試行に正常に応答しない場合（つまり、200 以外のステータスコードを返した場合）、その配信は失敗と見なされます。
* 失敗した配信は、成功するか 72 回の試行が行われるまで、前回の失敗後 1 時間ごとに再試行されます（1 時間に 1 回の再試行の場合、約 3 日）。
* 継続的にエラーを返す 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.
