manage-profiles changedmanage-claude/user-profiles/manage-profiles
Nearest release: v2.1.334, published 8 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+34added
Lines−26removed
From line
29
where the diff opens
First seen
30 Nov 2026
this site's first read of the page
Recorded edits2to this page, all time
### If you check `updated_at` for changes
The whole hunk
from line 29, old and new numbered
/
from line 29
2929
3030A list response might hold no user profiles or fewer than `limit` before the list ends, so keep requesting pages until `next_page` is `null`.
3131
32To find out when an action opens or ends, list your user profiles at regular intervals. Compare `enforcement_status` and `enforcement_actions` with what you saw last time. If a user profile drops out of the list, it either has no open action or was deleted. Don’t rely on `updated_at` to spot a change, because changes to these fields don’t reliably update it.
32To find out when an action opens or ends, list your user profiles at regular intervals. Compare `enforcement_status` and `enforcement_actions` with what you saw last time. If a user profile drops out of the list, it either shows no open action or was deleted.
3333
3434Anthropic doesn’t send webhook events for these changes.
3535
3636### Read the enforcement fields
3737
38Each user profile in a create, retrieve, update, or list response carries two fields, `enforcement_status` and `enforcement_actions`. If a response has neither, see [If the enforcement fields are missing](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-the-enforcement-fields-are-missing). On Claude Platform on AWS, the fields don’t report actions (see [If you use Claude Platform on AWS](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-you-use-claude-platform-on-aws)).
38Each user profile in a create, retrieve, update, or list response carries two fields, `enforcement_status` and `enforcement_actions`.
3939
40Anthropic sets both fields, so if a create or update request includes either one, the API returns a `400`.
41
4240The following example shows these two fields on a retrieved user profile and leaves out most of its other fields:
4341
4442```json
from line 59
6159
6260`enforcement_status` summarizes the open actions in one value:
6361
64* `unrestricted`: No action is open.
65* `restricted`: At least one action is open and none of them is a ban.
62* `unrestricted`: The user profile shows no open action.
63* `restricted`: At least one action is open and none of them is a ban. If a restriction has an end date, you don’t need to stop serving the end customer. Such a restriction might cover only some models.
6664* `banned`: A ban is open.
6765
68`enforcement_status` is separate from `external_user_details.account_status`, which records your own decision about the account.
66`enforcement_actions` lists the open actions and is empty when there are none. Each action has these fields:
6967
70`enforcement_actions` lists the open actions and is empty when there are none. An action drops off the list once it ends, so if you need a history, store the actions you read. Each action has these fields:
71
7268* `type`: `restriction` or `ban`.
7369* `id`: The action’s ID, which starts with `enac_`.
7470* `reason`: Why Anthropic opened the action. It’s one of `unsupported_region`, `fraud_or_abuse`, `high_harm`, `usage_policy_violation`, `account_compromise`, or `unspecified`.
from line 72
7672* `opened_at`: When Anthropic opened the action.
7773* `expires_at`: When the action ends by itself. It’s `null` when the action has no end date.
7874
79Anthropic can add values to these fields, so make sure your code can handle [a value it doesn’t recognize](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-a-field-has-a-value-that-you-dont-recognize).
75Anthropic can add values to these fields, so make sure your code can handle [a value it doesn’t recognize](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-a-field-has-a-value-that-you-dont-recognize). An action drops off the `enforcement_actions` list once it ends, so if you need a history, store the actions you read.
8076
77Even when `enforcement_status` is `unrestricted`, Anthropic can refuse a request that carries the user profile’s ID for a reason that the enforcement fields don’t show. If you ask Anthropic about a refused request, include its [request ID](https://platform.claude.com/docs/en/api/errors#request-id) and the user profile’s ID.
78
79On Claude Platform on AWS, the enforcement fields don’t always report actions (see [If you use Claude Platform on AWS](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-you-use-claude-platform-on-aws)). If a response has neither `enforcement_status` nor `enforcement_actions`, see [If the enforcement fields are missing](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#if-the-enforcement-fields-are-missing).
80
8181## Update a user profile
8282
8383Update a user profile when the end customer’s details or account status change, for example when a company rebrands or you suspend an account. [`POST /v1/user_profiles/{id}`](https://platform.claude.com/docs/en/api/user_profiles/update) changes only the fields you send:
from line 86
8686* Each field you send in [`external_user_details`](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#what-to-tell-anthropic-about-an-end-customer) replaces the stored value. You can’t clear a value, because the API rejects `null` with a `400`.
8787* `metadata` merges key by key. A key you send overwrites its stored value, an empty string deletes the key, and any key you leave out stays as it is.
8888
89The cURL samples on this page send an access token, such as a [workload identity federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation#authenticate-from-your-workload) token, from `ANTHROPIC_AUTH_TOKEN`. Because that variable takes precedence over federation environment variables and federation profiles, set it only in the shell where you run the samples.
90
9189The following example marks the account as suspended and deletes a `trial_cohort` metadata key:
9290
9391<CodeGroup>
94 ```bash cURL
95 curl "https://api.anthropic.com/v1/user_profiles/$PROFILE_ID" \
96 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
97 -H "anthropic-version: 2026-10-21" \
98 -H "content-type: application/json" \
99 -d '{
100 "external_user_details": {"account_status": "suspended"},
101 "metadata": {"trial_cohort": ""}
102 }'
103 ```
92 <CodeGroupItem>
93 This sample and others like it on this page send an access token from `ANTHROPIC_AUTH_TOKEN`, such as a [workload identity federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation#authenticate-from-your-workload) token. Set that variable only in the shell where you run them. The SDK and the CLI also read it, and it takes precedence over federation environment variables and federation profiles.
10494
95 ```bash cURL
96 curl "https://api.anthropic.com/v1/user_profiles/$PROFILE_ID" \
97 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
98 -H "anthropic-version: 2026-10-21" \
99 -H "content-type: application/json" \
100 -d '{
101 "external_user_details": {"account_status": "suspended"},
102 "metadata": {"trial_cohort": ""}
103 }'
104 ```
105 </CodeGroupItem>
106
105107 ```bash CLI
106108 ant user-profiles update \
107109 --user-profile-id "$PROFILE_ID" \
from line 218
216218 ```
217219</CodeGroup>
218220
221`enforcement_status` is separate from `external_user_details.account_status`, which records your own decision about the account. Anthropic sets `enforcement_status` and `enforcement_actions`, so if a create or update request includes either of these fields, the API returns a `400`.
222
219223## Delete a user profile
220224
221225[`DELETE /v1/user_profiles/{id}`](https://platform.claude.com/docs/en/api/user_profiles/delete) deletes a user profile and the details you supplied for it, including `name`, `external_user_details`, and `metadata`. It doesn’t remove the trust and safety records that Anthropic keeps about that user profile ID. You can delete user profiles on the Claude API and Claude Platform on AWS.
from line 226
222226
223227Delete a user profile when an end customer closes their account or asks you to erase their data:
224228
225* **The customer leaves:** Stop sending the user profile’s ID on their requests, and then delete the user profile.
226* **The customer stays with you after an erasure request:** Create a new user profile, switch their requests to its ID, and then delete the old user profile.
229* **The end customer leaves:** Stop sending the user profile’s ID on their requests, and then delete the user profile.
230* **The end customer stays with you after an erasure request:** Create a new user profile, switch their requests to its ID, and then delete the old user profile.
227231
228232If the customer stays and a workspace has the old user profile attached, that workspace rejects requests that carry the new ID. Before you switch, see [If a workspace has a user profile attached](https://platform.claude.com/docs/en/manage-claude/user-profiles/attribute-requests#if-a-workspace-has-a-profile-attached).
229233
from line 331
327331| `enforcement_actions[].reason` | `unspecified` |
328332| `enforcement_actions[].action` | `null` |
329333
334### If you check `updated_at` for changes
335
336Don’t rely on `updated_at` to spot a change, because changes to `enforcement_status` and `enforcement_actions` don’t reliably update it. For what to compare instead, see [Find user profiles that have an open action](https://platform.claude.com/docs/en/manage-claude/user-profiles/manage-profiles#find-profiles-that-have-an-open-action).
337
330338### If the enforcement fields are missing
331339
332If a response has neither `enforcement_status` nor `enforcement_actions`, check the request’s `anthropic-beta` header. The `user-profiles-2026-09-04` beta and any earlier user profiles beta leave both fields out and make the `enforcement_status[]` list filter return a `400`. Remove that beta, but keep any others.
340If a response has neither `enforcement_status` nor `enforcement_actions`, check the request’s `anthropic-beta` header. The `user-profiles-2026-09-04` beta and any earlier user profiles beta leave both fields out and make the `enforcement_status[]` list filter return a `400`. Remove that beta, but keep any other betas.
333341
334342With the SDK or the CLI, call `client.user_profiles` (typescript: `client.userProfiles`; csharp, go: `client.UserProfiles`; java: `client.userProfiles()`; php: `$client->userProfiles`; cli: `ant user-profiles`) instead of `client.beta.user_profiles` (typescript: `client.beta.userProfiles`; csharp, go: `client.Beta.UserProfiles`; java: `client.beta().userProfiles()`; php: `$client->beta->userProfiles`; cli: `ant beta:user-profiles`), because the beta namespace sends the `user-profiles-2026-08-18` beta.
335343
336344### If you use Claude Platform on AWS
337345
338On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), the enforcement fields don’t report actions: `enforcement_status` is always `unrestricted`, and `enforcement_actions` is always empty. Anthropic also doesn’t refuse requests there because of an open action.
346On [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), don’t rely on the enforcement fields to report actions. A user profile there can show an open action, or it can show `unrestricted` and an empty `enforcement_actions` while one is open.
339347
No line in this hunk matches that.