---
title: 組織Webhook
url: https://platform.claude.com/docs/ja/manage-claude/organization-webhooks
description: 組織のユーザープロファイルに対する措置に関するイベントを受け取るWebhookエンドポイントを登録します。
featureMetadata:
  status: beta
  betaHeader: webhooks-2026-10-07
  supportedPlatforms:
    Claude API: beta
---

「organization webhook endpoint」（組織Webhookエンドポイント）は、Anthropicが組織の[ユーザープロファイル](https://platform.claude.com/docs/ja/manage-claude/user-profiles)のいずれかを制限または利用禁止にしたとき、およびその制限または利用禁止が終了したときにイベントを受け取ります。これは`/v1/organizations/webhooks`配下のAdmin APIで管理します。

<Note>
  イベント配信は稼働していません。Anthropicは2つのイベントを送信しないため、登録したエンドポイントは何も受け取りません。エンドポイントを登録し、このページのイベント形式に基づいてハンドラーを構築することはできます。
</Note>

組織のメンバーであれば誰でもAPIで組織Webhookエンドポイントを一覧表示および閲覧できますが、エンドポイントの作成、変更、削除、または署名シークレットの置き換えができるのは、admin、owner、またはprimary ownerのロールを持つメンバーのみです。

## 始める前に

以下が必要です。

* 組織Webhookが有効になっており、[HIPAA対応](https://platform.claude.com/docs/ja/manage-claude/api-and-data-retention#hipaa-readiness)が有効になっていないClaude API上の組織。アクセスをリクエストするには、Anthropicのアカウントチームにお問い合わせください。

* 次のいずれかの認証情報：

  * [Admin APIキー](https://platform.claude.com/docs/ja/manage-claude/admin-api-keys)。
  * `org:admin`スコープを持つ[OAuthベアラートークン](https://platform.claude.com/docs/ja/manage-claude/admin-api#oauth-bearer-token)。
  * ワークスペースにスコープされていない[個人またはサービスアカウントのキー](https://platform.claude.com/docs/ja/manage-claude/authentication#key-types)。

## イベントタイプ

組織Webhookエンドポイントは2つのイベントタイプを受け付けます。どちらもユーザープロファイルに対する「enforcement action」（措置）に関するものです。措置とは、プロファイルが表すエンドカスタマーに対してAnthropicが課す制限または利用禁止のことです。

| イベント                                       | トリガー                                                  |
| ------------------------------------------ | ----------------------------------------------------- |
| `user_profile.enforcement_action_opened`   | Anthropicがユーザープロファイルに対して措置を開始したとき。                    |
| `user_profile.enforcement_action_resolved` | 措置が終了したとき。Anthropicが解決するか、その`expires_at`の時刻が経過した場合です。 |

プロファイルを削除すると、そのプロファイルの有効な措置は`user_profile.enforcement_action_resolved`イベントなしで終了します。

### 最初のイベントの前に

組織で措置が有効になるまで、プロファイルには`enforcement_status`および`enforcement_actions`フィールドがありません。それまでの間、および`anthropic-beta`ヘッダーに`user-profiles-2026-09-04`またはそれ以前の値を含むリクエストでは、レスポンスにこれらのフィールドが含まれず、`enforcement_status[]`リストフィルターは`400`を返します。これらのフィールドを取得するには、リクエストからその値を削除してください。

Anthropicが組織で措置とイベント配信を有効にする前、またはエンドポイントを登録する前に措置が開始された場合、その措置に対する`user_profile.enforcement_action_opened`イベントは届きません。措置はプロファイル上には引き続き表示されます。これらの措置を見つけるには、`enforcement_status[]=restricted`および`enforcement_status[]=banned`を指定して[プロファイルを一覧表示](https://platform.claude.com/docs/ja/api/user_profiles/list)してください。リストが終わる前に、レスポンスが`limit`より少ないプロファイルを返したり、まったく返さなかったりする場合があるため、`next_page`が`null`になるまでページのリクエストを続けてください。

### イベントの内容

イベントには措置やプロファイルそのものではなく、IDが含まれます。`data.id`はプロファイルのIDで、`data.enforcement_action_id`は措置のIDであり、`enac_`で始まります。

```json
{
  "type": "event",
  "id": "whe_4f2a9c1e7b3d5a8f0e6c2b9d1a7f3e5c",
  "created_at": "2026-10-15T17:02:41Z",
  "data": {
    "type": "user_profile.enforcement_action_opened",
    "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
    "enforcement_action_id": "enac_011CZkZEq4TnWb7xLfRgPm2v",
    "organization_id": "org_011CZkZBj9RsYd3wNcHvKq6t"
  }
}
```

何が変わったかを確認するには、`data.id`を使用して`GET /v1/user_profiles/{id}` (python, ruby: `client.user_profiles.retrieve()`; typescript: `client.userProfiles.retrieve()`; go: `client.UserProfiles.Get()`; java: `client.userProfiles().retrieve()`; csharp: `client.UserProfiles.Retrieve()`; php: `$client->userProfiles->retrieve()`; cli: `ant user-profiles retrieve`)で[プロファイルを取得](https://platform.claude.com/docs/ja/api/user_profiles/retrieve)します。その`enforcement_actions`リストには有効な措置が表示されます。各措置には、`type`（`restriction`または`ban`）、`id`、`reason`、`opened_at`の時刻、および`expires_at`の時刻または`null`があります。`enforcement_status`はそれらを要約したもので、利用禁止が有効な間は`banned`、その他の措置が有効な間は`restricted`、何もない場合は`unrestricted`になります。その他の値は`restricted`として扱ってください。

Anthropicはプロファイルに変更が反映された後にのみイベントを送信するため、取得したプロファイルにはその変更またはそれ以降の変更が反映されています。イベントは遅れて届いたり、順序が入れ替わって届いたりする場合があるため、イベントが届いた順序ではなく、プロファイルの現在の状態を使用してください。`user_profile.enforcement_action_resolved`の後、解決された措置はリストに含まれなくなります。`404`はプロファイルが削除されたことを意味します。

## エンドポイントのフィールド

組織Webhookエンドポイントには次のフィールドがあります。

| フィールド             | 型                | 説明                                                                                                                                           |
| ----------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`              | string           | エンドポイントのIDで、`wep_`で始まります。Anthropicが設定します。                                                                                                    |
| `url`             | string           | Anthropicがイベントを送信する先です。ポート443のHTTPSで、IPアドレスではなく公開ドメイン名である必要があります。組織内の有効な2つの組織Webhookエンドポイントが同じURLを共有することはできません。                              |
| `enabled_events`  | array of strings | このエンドポイントが受け取る[イベントタイプ](https://platform.claude.com/docs/ja/manage-claude/organization-webhooks#event-types)です。作成リクエストでは少なくとも1つを指定する必要があります。 |
| `name`            | string           | 独自に使用するための任意のラベルです。                                                                                                                          |
| `description`     | string           | 独自に使用するための任意の説明です。                                                                                                                           |
| `state`           | string           | `enabled`または`disabled`です。                                                                                                                    |
| `disabled_reason` | string           | Anthropicがエンドポイントを無効にした理由です。それ以外の場合は空です。                                                                                                     |
| `created_at`      | string           | エンドポイントが作成された日時です。Anthropicが設定します。                                                                                                           |
| `updated_at`      | string           | エンドポイントが最後に変更された日時です。Anthropicが設定します。                                                                                                        |
| `signing_secret`  | string           | エンドポイントとともに作成される、`whsec_`プレフィックス付きのシークレットです。エンドポイントを作成するレスポンスまたはシークレットを置き換えるレスポンスにのみ含まれるため、安全に保管してください。                                      |

```json
{
  "id": "wep_011CZkZDf8HnUq2mTxRbVn4s",
  "url": "https://example.com/anthropic-webhooks",
  "name": "Enforcement actions",
  "description": "",
  "enabled_events": [
    "user_profile.enforcement_action_opened",
    "user_profile.enforcement_action_resolved"
  ],
  "state": "enabled",
  "disabled_reason": "",
  "created_at": "2026-10-20T19:00:00Z",
  "updated_at": "2026-10-20T19:00:00Z"
}
```

1つの組織は最大32個の組織Webhookエンドポイントを持つことができます。無効化されたWebhookエンドポイントもこの合計に含まれます。

## 配信

配信は[Standard Webhooks](https://www.standardwebhooks.com/)仕様に従います。各配信には`webhook-id`、`webhook-timestamp`、および`webhook-signature`ヘッダーが含まれます。イベントを信頼する前に、任意のStandard Webhooksライブラリを使用して、エンドポイントの署名シークレットでその署名を検証してください。

5秒以内に任意の`2xx`ステータスを返し、時間のかかる処理はその後に行ってください。それ以外のレスポンス、またはレスポンスがない場合は、失敗した試行としてカウントされます。

* **重複：** エンドポイントは同じイベントを、同じイベント`id`（`webhook-id`ヘッダーと同じ値）で複数回受け取る場合があります。これを使って重複を排除してください。

* **再試行：** 配信が失敗した場合、Anthropicはその後数分間にわたって数回再試行します。すべての試行が失敗した場合、Anthropicはそのイベントを破棄します。取りこぼしを補うには、[最初のイベントの前に](https://platform.claude.com/docs/ja/manage-claude/organization-webhooks#before-your-first-event)と同様に、措置ステータスでプロファイルを一覧表示してください。

* **自動無効化：** Anthropicは次の場合にエンドポイントを無効にします。

  * リダイレクト（`3xx`）を返した場合。
  * URLが非公開のIPアドレスに解決される場合。
  * 配信が失敗し続ける場合。

  Anthropicは無効化されたエンドポイントへのイベントをスキップし、後から送信することはありません。

## エンドポイントの管理

Admin APIでは、次のリクエストを行うことができます。

| タスク                                                                 | リクエスト                                                                                                                                                                             |
| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 組織のエンドポイントを一覧表示する                                                   | [`GET /v1/organizations/webhooks`](https://platform.claude.com/docs/ja/api/beta/organization/webhooks/list)                                                                       |
| エンドポイントを作成する                                                        | [`POST /v1/organizations/webhooks`](https://platform.claude.com/docs/ja/api/beta/organization/webhooks/create)                                                                    |
| 1つのエンドポイントを取得する                                                     | [`GET /v1/organizations/webhooks/{webhook_endpoint_id}`](https://platform.claude.com/docs/ja/api/beta/organization/webhooks/retrieve)                                             |
| エンドポイントの`url`、`name`、`description`、`enabled_events`、または`state`を更新する | [`POST /v1/organizations/webhooks/{webhook_endpoint_id}`](https://platform.claude.com/docs/ja/api/beta/organization/webhooks/update)                                              |
| エンドポイントを削除する                                                        | [`DELETE /v1/organizations/webhooks/{webhook_endpoint_id}`](https://platform.claude.com/docs/ja/api/beta/organization/webhooks/delete)                                            |
| 署名シークレットを置き換える                                                      | [`POST /v1/organizations/webhooks/{webhook_endpoint_id}/regenerate_signing_secret`](https://platform.claude.com/docs/ja/api/beta/organization/webhooks/regenerate_signing_secret) |

更新では、`enabled_events`はエンドポイントのイベントタイプのリスト全体を置き換えます。空のリストではリストはクリアされず、エンドポイントは既存のイベントタイプを保持します。配信を停止するには、`"state": "disabled"`を送信するか、エンドポイントを削除してください。

Anthropicによって無効化された後も含め、エンドポイントを再度有効にするには、更新リクエストで`"state": "enabled"`を送信してください。

署名シークレットを置き換えると、古いシークレットは直ちに機能しなくなります。それ以降の配信は、以前のイベントの再試行も含めて新しいシークレットで署名されるため、すぐにレシーバーを更新してください。

すべてのリクエストで`anthropic-beta: webhooks-2026-10-07`ヘッダーを送信してください。SDKとCLIは自動的にこれを送信します。この例では、`ANTHROPIC_API_KEY`のAdmin APIキーを使用して、組織のエンドポイントを一覧表示します。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/webhooks" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "anthropic-beta: webhooks-2026-10-07"
  ```

  ```bash CLI
  ant beta:organization:webhooks list
  ```

  ```python Python
  client = anthropic.Anthropic()

  endpoints = client.beta.organization.webhooks.list()

  for endpoint in endpoints:
      print(f"{endpoint.id}: {endpoint.url} ({endpoint.state})")
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const endpoints = await client.beta.organization.webhooks.list();

  for await (const endpoint of endpoints) {
    console.log(`${endpoint.id}: ${endpoint.url} (${endpoint.state})`);
  }
  ```

  ```csharp C#
  AnthropicClient client = new();

  var page = await client.Beta.Organization.Webhooks.List();

  await foreach (var endpoint in page.Paginate())
  {
      Console.WriteLine($"{endpoint.ID}: {endpoint.Url} ({endpoint.State.Raw()})");
  }
  ```

  ```go Go
  client := anthropic.NewClient()

  endpoints := client.Beta.Organization.Webhooks.ListAutoPaging(context.Background(), anthropic.BetaOrganizationWebhookListParams{})

  for endpoints.Next() {
  	endpoint := endpoints.Current()
  	fmt.Printf("%s: %s (%s)\n", endpoint.ID, endpoint.URL, endpoint.State)
  }
  if err := endpoints.Err(); err != nil {
  	log.Fatal(err)
  }
  ```

  ```java Java
  AnthropicClient client = AnthropicOkHttpClient.fromEnv();

  var endpoints = client.beta().organization().webhooks().list();

  for (var endpoint : endpoints.autoPager()) {
      IO.println(endpoint.id() + ": " + endpoint.url() + " (" + endpoint.state().asString() + ")");
  }
  ```

  ```php PHP
  $client = new Client();

  $endpoints = $client->beta->organization->webhooks->list();

  foreach ($endpoints->pagingEachItem() as $endpoint) {
      echo "{$endpoint->id}: {$endpoint->url} ({$endpoint->state})\n";
  }
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  endpoints = client.beta.organization.webhooks.list

  endpoints.auto_paging_each do |endpoint|
    puts "#{endpoint.id}: #{endpoint.url} (#{endpoint.state})"
  end
  ```
</CodeGroup>

エンドポイントがない場合、APIは空のリストを返します。

```json
{
  "data": [],
  "has_more": false
}
```

一覧表示では、デフォルトで最大20個のエンドポイントが返されます。最大100個を取得するには`limit`を設定してください。`has_more`が`true`の場合は、レスポンスの`last_id`を`after_id`として渡すと次のページを取得できます。

この例では、両方のイベントタイプを受け取るエンドポイントを作成します。

<CodeGroup>
  ```bash cURL
  curl "https://api.anthropic.com/v1/organizations/webhooks" \
    -H "x-api-key: $ANTHROPIC_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "anthropic-beta: webhooks-2026-10-07" \
    -H "content-type: application/json" \
    -d '{
      "url": "https://example.com/anthropic-webhooks",
      "name": "Enforcement actions",
      "enabled_events": [
        "user_profile.enforcement_action_opened",
        "user_profile.enforcement_action_resolved"
      ]
    }'
  ```

  ```bash CLI
  ant beta:organization:webhooks create \
    --url https://example.com/anthropic-webhooks \
    --name "Enforcement actions" \
    --enabled-event user_profile.enforcement_action_opened \
    --enabled-event user_profile.enforcement_action_resolved
  ```

  ```python Python
  client = anthropic.Anthropic()

  endpoint = client.beta.organization.webhooks.create(
      url="https://example.com/anthropic-webhooks",
      name="Enforcement actions",
      enabled_events=[
          "user_profile.enforcement_action_opened",
          "user_profile.enforcement_action_resolved",
      ],
  )

  print(endpoint.id)
  ```

  ```typescript TypeScript
  const client = new Anthropic();

  const endpoint = await client.beta.organization.webhooks.create({
    url: "https://example.com/anthropic-webhooks",
    name: "Enforcement actions",
    enabled_events: [
      "user_profile.enforcement_action_opened",
      "user_profile.enforcement_action_resolved"
    ]
  });

  console.log(endpoint.id);
  ```

  ```csharp C#
  using Anthropic.Models.Beta.Organization.Webhooks;

  AnthropicClient client = new();

  var endpoint = await client.Beta.Organization.Webhooks.Create(new WebhookCreateParams
  {
      UrlValue = "https://example.com/anthropic-webhooks",
      Name = "Enforcement actions",
      EnabledEvents =
      [
          EnabledEvent.UserProfileEnforcementActionOpened,
          EnabledEvent.UserProfileEnforcementActionResolved,
      ],
  });

  Console.WriteLine(endpoint.ID);
  ```

  ```go Go
  client := anthropic.NewClient()

  endpoint, err := client.Beta.Organization.Webhooks.New(context.Background(), anthropic.BetaOrganizationWebhookNewParams{
  	URL:  "https://example.com/anthropic-webhooks",
  	Name: anthropic.String("Enforcement actions"),
  	EnabledEvents: []string{
  		"user_profile.enforcement_action_opened",
  		"user_profile.enforcement_action_resolved",
  	},
  })
  if err != nil {
  	log.Fatal(err)
  }

  fmt.Println(endpoint.ID)
  ```

  ```java Java
  import com.anthropic.models.beta.organization.webhooks.WebhookCreateParams;

  void main() {
      AnthropicClient client = AnthropicOkHttpClient.fromEnv();

      var params = WebhookCreateParams.builder()
          .url("https://example.com/anthropic-webhooks")
          .name("Enforcement actions")
          .addEnabledEvent(WebhookCreateParams.EnabledEvent.USER_PROFILE_ENFORCEMENT_ACTION_OPENED)
          .addEnabledEvent(WebhookCreateParams.EnabledEvent.USER_PROFILE_ENFORCEMENT_ACTION_RESOLVED)
          .build();

      var endpoint = client.beta().organization().webhooks().create(params);

      IO.println(endpoint.id());
  }
  ```

  ```php PHP
  $client = new Client();

  $endpoint = $client->beta->organization->webhooks->create(
      url: 'https://example.com/anthropic-webhooks',
      name: 'Enforcement actions',
      enabledEvents: [
          'user_profile.enforcement_action_opened',
          'user_profile.enforcement_action_resolved',
      ],
  );

  echo $endpoint->id, "\n";
  ```

  ```ruby Ruby
  client = Anthropic::Client.new

  endpoint = client.beta.organization.webhooks.create(
    url: "https://example.com/anthropic-webhooks",
    name: "Enforcement actions",
    enabled_events: [
      "user_profile.enforcement_action_opened",
      "user_profile.enforcement_action_resolved"
    ]
  )

  puts endpoint.id
  ```
</CodeGroup>

レスポンスは、[エンドポイントのフィールド](https://platform.claude.com/docs/ja/manage-claude/organization-webhooks#endpoint-fields)に示すとおりの新しいエンドポイントに、その`signing_secret`を加えたものです。

## エラー

次の場合、リクエストは`400`を返します。

* `url`が[エンドポイントのフィールド](https://platform.claude.com/docs/ja/manage-claude/organization-webhooks#endpoint-fields)のルールを満たしていない場合、または作成リクエストでイベントタイプが指定されていない場合。エラーメッセージに問題点が示されます。
* 組織にデフォルトワークスペースがない場合。
* 組織のデフォルトワークスペースが[顧客管理の暗号化キー](https://platform.claude.com/docs/ja/manage-claude/cmek)を使用しているため、組織で組織Webhookを利用できない場合。エラーメッセージにその旨が示されます。
* 組織の組織Webhookエンドポイントが32個を超えることになる場合。
* `enabled_events`に[イベントタイプ](https://platform.claude.com/docs/ja/manage-claude/organization-webhooks#event-types)の2つ以外のイベントタイプを指定した場合。エラーメッセージに受け付けられるタイプが一覧表示されます。

アカウントのロールにリクエストに必要な権限が含まれていない場合、リクエストは`403`を返します。エラーにはその権限の名前が示されます。

次の場合、リクエストは`404`を返します。

* `anthropic-beta: webhooks-2026-10-07`ヘッダーを送信していない場合。
* Anthropicが組織で組織Webhookを有効にしていない場合。
* 組織でHIPAA対応が有効になっている場合。
* これらのリクエストが受け付けない種類の認証情報を使用している場合。
* `webhook_endpoint_id`が組織内のエンドポイントと一致しない場合。

次の場合、リクエストは`409`を返します。

* 有効な2つの組織Webhookエンドポイントが同じURLを共有することになる場合。
* 別のリクエストが同時に組織のエンドポイントを変更した場合。リクエストを再試行してください。
