Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

organization-webhooks changedmanage-claude/organization-webhooks

Recorded here
Lines+143added
Lines−12removed
From line 1 where the diff opens
First seen 21 Oct 2026 this site's first read of the page
Recorded edits10to this page, all time

## User profile events ## Encryption key events ### Respond to an encryption key event ### When encryption key events arrive ### When an encryption key event might not arrive ### Catch up on missed events ## If your Default Workspace uses an encryption key

The whole hunk

from line 1, old and new numbered
/
lines
from line 1
11---
22title: Organization webhooks
33url: https://platform.claude.com/docs/en/manage-claude/organization-webhooks
4description: Register webhook endpoints for events about enforcement actions on your organization's user profiles.
4description: Register webhook endpoints for events about your organization's user profiles and customer-managed encryption keys, and respond to each event.
55featureMetadata:
66 status: beta
77 betaHeader: webhooks-2026-10-07
from line 9
99 Claude API: beta
1010---
1111 
12An organization webhook endpoint receives an event when Anthropic restricts or bans one of your organization’s [user profiles](https://platform.claude.com/docs/en/manage-claude/user-profiles), and when the restriction or ban ends. You manage it with the Admin API under `/v1/organizations/webhooks`.
12An organization webhook endpoint is a URL where Anthropic sends events about your organization, such as an encryption key that stops working. Use this page to choose the events you need, register an endpoint, respond to each event, and catch up when an event doesn’t arrive. You manage endpoints with the Admin API under `/v1/organizations/webhooks`, or [in the Claude Console](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#manage-endpoints) for some event types.
1313 
1414<Note>
15 Event delivery isn’t live: Anthropic doesn’t send the two events, so an endpoint you register receives nothing. You can register endpoints and build your handler from the event format on this page.
15 Delivery of the two [user profile events](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#user-profile-events) isn’t live: Anthropic doesn’t send them. You can register endpoints for them and build your handler from the event format on this page.
1616</Note>
1717 
1818## Before you start
from line 19
1919 
2020You need the following:
2121 
22* An organization on the Claude API that has organization webhooks turned on and doesn’t have [HIPAA readiness](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-readiness) enabled. To request access, contact your Anthropic account team.
22* An organization on the Claude API that has organization webhooks turned on. Without them, [requests return a `404`](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#errors). The first case that fits your organization applies:
2323 
24 * It has [HIPAA readiness](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-readiness) enabled: it can’t use organization webhooks.
25 * It can use [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek): it has organization webhooks.
26 * Any other organization: contact your Anthropic account team to request access.
27 
2428* One of these credentials:
2529 
2630 * An [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys).
from line 38
3438 
3539## Event types
3640 
37Organization webhook endpoints accept two event types. Both are about [enforcement actions](https://platform.claude.com/docs/en/manage-claude/user-profiles#check-whether-anthropic-has-restricted-or-banned-a-profile) on user profiles.
41An endpoint receives the event types that you list in its [`enabled_events`](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#endpoint-fields) when you [create or update it](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#manage-endpoints). This page covers these groups of event types:
3842 
43* [User profile events](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#user-profile-events): Anthropic restricts or bans one of your [user profiles](https://platform.claude.com/docs/en/manage-claude/user-profiles), or the restriction or ban ends.
44* [Encryption key events](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#encryption-key-events): your key management service (KMS) keeps refusing one of your customer-managed encryption keys, or the key works again.
45 
46For other event types, see `enabled_events` in the [API reference for creating an endpoint](https://platform.claude.com/docs/en/api/beta/organization/webhooks/create).
47 
48## User profile events
49 
50The following event types are about [enforcement actions](https://platform.claude.com/docs/en/manage-claude/user-profiles#check-whether-anthropic-has-restricted-or-banned-a-profile) on user profiles. Anthropic doesn’t send them.
51 
3952| Event | Trigger |
4053| ----- | ----- |
4154| `user_profile.enforcement_action_opened` | Anthropic opens an enforcement action on a user profile. |
from line 58
4558 
4659### Before your first event
4760 
48In any request whose `anthropic-beta` header has `user-profiles-2026-09-04` or an earlier value, responses leave out the `enforcement_status` and `enforcement_actions` fields and the `enforcement_status[]` list filter returns a `400`. To get the fields, remove that value from your requests.
61In any request whose `anthropic-beta` header has `user-profiles-2026-09-04` or an earlier user profiles beta, responses leave out the `enforcement_status` and `enforcement_actions` fields. In such a request, the `enforcement_status[]` list filter returns a `400`. To get the fields, remove that beta from your requests.
4962 
5063If an enforcement action opened before Anthropic turned on event delivery for your organization, or before you registered your endpoint, you don’t get a `user_profile.enforcement_action_opened` event for it. The action still appears on the profile. To find these actions, [list your profiles](https://platform.claude.com/docs/en/api/user_profiles/list) with `enforcement_status[]=restricted` and `enforcement_status[]=banned`. A response might return fewer profiles than `limit`, or none, before the list ends, so keep requesting pages until `next_page` is `null`.
5164 
5265### What an event contains
5366 
54Events carry IDs, not the action or the profile. `data.id` is the profile’s ID, and `data.enforcement_action_id` is the action’s ID, which starts with `enac_`:
67User profile events carry IDs, not the action or the profile. `data.id` is the profile’s ID, and `data.enforcement_action_id` is the action’s ID, which starts with `enac_`:
5568 
5669```json
5770{
from line 84
7184 
7285Anthropic sends an event only after the profile shows the change, so the profile you retrieve shows that change or a later one. Events might arrive late or out of order, so use the profile’s current state, not the order events arrive in. After `user_profile.enforcement_action_resolved`, the resolved action is no longer in the list. A `404` means the profile was deleted.
7386 
87## Encryption key events
88 
89These events are about your organization’s [customer-managed encryption keys](https://platform.claude.com/docs/en/manage-claude/cmek) (CMEK). The Admin API calls such a key an external key, so the event types start with `external_key`:
90 
91| Event | Trigger |
92| ----- | ----- |
93| `external_key.failed` | Your KMS keeps refusing Anthropic’s use of a key, for example because someone disabled the key or removed Anthropic’s access to it. |
94| `external_key.recovered` | After Anthropic sends `external_key.failed`, the key works again when Anthropic uses it. |
95 
96Only a real refusal starts these events. There’s no test event.
97 
98When a key fails or recovers, Anthropic usually also emails the members of your organization who can manage encryption keys. The failure email names workspaces that your KMS recently refused, but it might not list all of them.
99 
100The event names the key in `data.id`, which starts with `ekey_`:
101 
102```json
103{
104 "type": "event",
105 "id": "whe_8c1d5e2a9f4b7036d1e8a5c2f9b40d73",
106 "created_at": "2026-11-20T09:14:07.482913Z",
107 "data": {
108 "type": "external_key.failed",
109 "id": "ekey_011CZkZFr7KpXc4nMgSvQh3w",
110 "organization_id": "org_011CZkZBj9RsYd3wNcHvKq6t"
111 }
112}
113```
114 
115* **Time:** `created_at` is when Anthropic first tried to send the event, not when the key failed or recovered. It can include fractional seconds.
116* **Workspaces:** The event doesn’t name a workspace, because several can use one key.
117 
118### Respond to an encryption key event
119 
120After you return `2xx` for either event, [validate the key](https://platform.claude.com/docs/en/api/organization/external_keys/validate) with `POST /v1/organizations/external_keys/{external_key_id}/validate`. Use `data.id` as the ID, and an Admin API key or an `org:admin` token. What you do next depends on the `status` in the response:
121 
122* **`failure`, and the `error` message says to try again:** Do what it says, and validate again.
123* **`failure`, with any other message:** Find the fix in [Troubleshoot CMEK](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting).
124* **`success`:** Check each workspace that uses the key, because validation tests one at most. Your KMS might refuse others, as with an [AWS key policy that lists workspaces](https://platform.claude.com/docs/en/manage-claude/cmek-aws-kms-workspaces).
125 
126To check the workspaces:
127 
1281. [List your workspaces](https://platform.claude.com/docs/en/api/organization/workspaces/list) with `include_default=true`.
1292. Find those with the key’s ID in `external_key_id`.
1303. Send a Messages API request in each one, with an API key that can act in that workspace.
131 
132| Result of the request | What it means for the workspace |
133| ----- | ----- |
134| [`cmek_key_disabled`](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cmek-key-disabled) or [`cmek_key_network_blocked`](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cmek-key-network-blocked) error | Your KMS refuses Anthropic. |
135| [`cmek_key_unreachable`](https://platform.claude.com/docs/en/manage-claude/cmek-troubleshooting#cmek-key-unreachable) error | Anthropic can’t reach your KMS. |
136| Success | The key works, or it stopped working less than an hour ago. |
137 
138[Requests can succeed for up to 1 hour](https://platform.claude.com/docs/en/manage-claude/cmek-key-lifecycle#what-each-action-does) after a key stops working, so if a request succeeds, send it again an hour after `external_key.failed`. An error can last a few minutes after a fix.
139 
140After a fix, repeat these checks. Don’t wait for `external_key.recovered`, which might not arrive.
141 
142### When encryption key events arrive
143 
144If each workspace that uses the key gets about one Messages API request a minute, the events usually arrive at these times. With less traffic, they take longer:
145 
146* **`external_key.failed`:** Within 30 minutes of someone disabling the key or removing Anthropic’s access to it. Requests might still succeed when it arrives.
147* **`external_key.recovered`:** About 30 minutes after the key works again.
148 
149### When an encryption key event might not arrive
150 
151Don’t make these events your only signal. Also, alert on the three `cmek_key` errors from the Messages API, and [catch up on missed events](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#catch-up-on-missed-events) at a regular interval.
152 
153In these cases, you might miss one or both events:
154 
155| Case | What you might miss |
156| ----- | ----- |
157| No request uses the key | `external_key.failed`, because Anthropic sees a refusal only when a request uses the key |
158| No request uses the key within about a day of the last refusal | `external_key.recovered`, because Anthropic stops waiting for a success |
159| Your KMS has an outage or times out | Both events, because an outage isn’t a refusal |
160| Keys at several organizations start to fail at about the same time | Both events and the emails, because the cause might be Anthropic or a cloud provider |
161| [Your Default Workspace’s key](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#if-your-default-workspace-uses-an-encryption-key) fails, and it encrypts a value of your endpoint | Every event until the key works again, including its own `external_key.failed` |
162 
163Because you can miss either event, you might receive `external_key.failed` twice in a row, or `external_key.recovered` with no `external_key.failed` before it.
164 
74165## Endpoint fields
75166 
76167An organization webhook endpoint has these fields:
from line 206
115206 
116207* **Duplicates:** An endpoint might receive the same event more than once, with the same event `id` (the same value as the `webhook-id` header). Deduplicate on it.
117208 
118* **Retries:** If a delivery fails, Anthropic retries it a few times over the next few minutes. If every attempt fails, Anthropic drops the event. To catch up, list your profiles by enforcement status, as in [Before your first event](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#before-your-first-event).
209* **Retries:** If a delivery fails, Anthropic retries it a few times over the next few minutes. If every attempt fails, Anthropic drops the event, so even a short outage of your endpoint can lose events.
119210 
120211* **Automatic disabling:** Anthropic disables an endpoint when:
121212 
from line 216
125216 
126217 Anthropic skips events for a disabled endpoint and doesn’t send them later.
127218 
219### Catch up on missed events
220 
221Anthropic doesn’t tell you when it drops an event, disables an endpoint, or skips an event for a disabled endpoint. Catch up at a regular interval, such as once a day, and at these times:
222 
223* When you first add event types to an endpoint
224* After an outage of your endpoint
225* After you turn an endpoint back on
226 
227Each time, check that your endpoint’s `state` is `enabled`. Then, check the resources behind each group of events that you use:
228 
229* **User profiles:** List your profiles by enforcement status, as in [Before your first event](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#before-your-first-event). A profile that’s missing from those lists has no open action.
230* **Encryption keys:** [List your keys](https://platform.claude.com/docs/en/api/organization/external_keys/list), and [validate each one](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#respond-to-an-encryption-key-event). If you received no event for the key, a `success` needs no more checks unless Messages API requests fail.
231 
128232## Manage endpoints
129233 
130234With the Admin API, you can make these requests:
from line 348
244348 
245349A list returns up to 20 endpoints by default. Set `limit` to get up to 100. If `has_more` is `true`, pass the response’s `last_id` as `after_id` to get the next page.
246350 
247This example creates an endpoint that receives both event types:
351This example creates an endpoint for the two user profile events, which Anthropic doesn’t send. To receive other events, such as `external_key.failed` and `external_key.recovered`, list their types in `enabled_events` instead:
248352 
249353<CodeGroup>
250354 ```bash cURL
from line 494
390494 
391495The response is the new endpoint, as shown in [Endpoint fields](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#endpoint-fields), plus its `signing_secret`.
392496 
497If you have the `admin` organization role, you can instead manage endpoints for encryption key events in the Claude Console. Use the **Organization** tab of the [Webhooks](https://platform.claude.com/settings/webhooks) page, which shows the signing secret once, when you create an endpoint or replace its secret.
498 
499## If your Default Workspace uses an encryption key
500 
501Anthropic stores your organization’s endpoints in your [Default Workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#how-workspaces-work). If that workspace uses a [customer-managed encryption key](https://platform.claude.com/docs/en/manage-claude/cmek), Anthropic encrypts these values with the key:
502 
503| Value | Requests that encrypt it |
504| ----- | ----- |
505| `name` and `description` | Create the endpoint, or send any update to it |
506| Signing secret | Create the endpoint, or replace the secret |
507 
508Anthropic doesn’t encrypt other fields, such as `url`, with your key.
509 
510On an endpoint created before [your key takes effect](https://platform.claude.com/docs/en/manage-claude/cmek-how-it-works#when-your-key-takes-effect), each value stays under Anthropic’s key until one of those requests encrypts it. No field shows which key protects a value. To move an endpoint’s values under your key, update the endpoint and replace its secret.
511 
512Once your key encrypts any value of an endpoint, the endpoint depends on the key. While Anthropic can’t use the key, deliveries and requests that need it fail. Requests usually return a `500` error:
513 
514| What fails | For which endpoints |
515| ----- | ----- |
516| Deliveries of every event type | Those that depend on the key |
517| Get and delete requests | Those that depend on the key |
518| List requests | All, if any endpoint depends on the key |
519| Create, update, and replace-secret requests | Usually all |
520 
521Anthropic drops the events that it can’t deliver, and doesn’t send them later. The endpoints stay enabled, and deliveries resume once Anthropic can use the key. Then, [catch up on missed events](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#catch-up-on-missed-events).
522 
523If you delete the key in your KMS, all of these failures are permanent, and you can’t create another endpoint. For what else stops Anthropic from using a key, see [What happens when you rotate, disable, or delete your encryption key](https://platform.claude.com/docs/en/manage-claude/cmek-key-lifecycle).
524 
393525## Errors
394526 
395527A request returns a `400` if:
396528 
397529* Its `url` doesn’t meet the rules in [Endpoint fields](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#endpoint-fields), or a create request lists no event types. The error message says what’s wrong.
398* Your organization has no default workspace.
399* Organization webhooks aren’t available for your organization because its default workspace uses a [customer-managed encryption key](https://platform.claude.com/docs/en/manage-claude/cmek). The error message says so.
530* Your organization has no Default Workspace.
400531* It would give your organization more than 32 organization webhook endpoints.
401* It puts an event type other than the two in [Event types](https://platform.claude.com/docs/en/manage-claude/organization-webhooks#event-types) in `enabled_events`. The error message lists the accepted types.
532* Its `enabled_events` includes an event type that organization webhook endpoints don’t accept. The error message lists the accepted types.
402533 
403534A request returns a `403` if your account’s role doesn’t include the permission the request needs. The error names that permission.
404535 
Feedback