> 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以外のステータスコードを返す場合）、その配信は失敗と見なされます。
* 失敗した配信は、前回の失敗から1時間ごとに再試行され、成功するか、72回の試行が行われるまで継続されます（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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
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=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
