user-profiles changedmanage-claude/user-profiles
Nearest release: v2.1.306, published an hour 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+33added
Lines−32removed
From line
4
where the diff opens
First seen
21 Oct 2026
this site's first read of the page
Recorded edits6to this page, all time
The whole hunk
from line 4, old and new numbered
/
from line 4
44description: Attribute API requests to the end customers your platform serves, so a safety enforcement action can apply to one profile instead of your whole organization.
55---
66
7User profiles ("profiles") tell Anthropic which of your end customers each API request is for. A safety enforcement action, such as a hold or a block, can then apply to one end customer instead of your whole organization. When it does, the rest of your traffic is unaffected.
7User profiles ("profiles") tell Anthropic which of your end customers each API request is for. A safety enforcement action, such as a restriction or a ban, can then apply to one end customer instead of your whole organization. When it does, the rest of your traffic is unaffected.
88
99If you operate a platform or gateway, or resell API access, the requests you send for your end customers arrive under your organization. Anthropic runs automated safety classifiers over API traffic. Without a profile on the request, one end customer can trigger an enforcement action that applies to your whole organization.
1010
from line 150
150150 var profile = client.userProfiles().create(params);
151151
152152 IO.println(profile.id());
153 // ...
153154 }
154155 ```
155156
from line 225
224225
225226## Attribute each request
226227
227Send the profile ID in the `anthropic-user-profile-id` header on every request you make on the end customer's behalf. The SDKs and the CLI have an argument that sends the header for you: `user_profile_id` (java: `userProfileId`; php: `userProfileID`; csharp, go: `UserProfileID`; cli: `--user-profile-id`).
228Send the profile ID in the `anthropic-user-profile-id` header on every request you make on the end customer's behalf. The SDK and the CLI have an argument that sends the header for you: `user_profile_id` (java: `userProfileId`; php: `userProfileID`; csharp, go: `UserProfileID`; cli: `--user-profile-id`).
228229
229230<CodeGroup>
230231 ```bash cURL
from line 232
231232 curl https://api.anthropic.com/v1/messages \
232233 -H "x-api-key: $ANTHROPIC_API_KEY" \
233234 -H "anthropic-version: 2023-06-01" \
234 -H "anthropic-user-profile-id: uprof_011CZkZCu8hGbp5mYRQgUmz9" \
235 -H "anthropic-user-profile-id: $PROFILE_ID" \
235236 -H "content-type: application/json" \
236237 -d '{
237238 "model": "claude-opus-5-5",
from line 248
247248 --model claude-opus-5-5 \
248249 --max-tokens 1024 \
249250 --message '{role: user, content: "Hello, Claude"}' \
250 --user-profile-id uprof_011CZkZCu8hGbp5mYRQgUmz9
251 --user-profile-id "$PROFILE_ID"
251252 ```
252253
253254 ```python Python
from line 258
257258 model="claude-opus-5-5",
258259 max_tokens=1024,
259260 messages=[{"role": "user", "content": "Hello, Claude"}],
260 user_profile_id="uprof_011CZkZCu8hGbp5mYRQgUmz9",
261 user_profile_id=profile_id,
261262 )
262263
263264 print(message)
from line 271
270271 model: "claude-opus-5-5",
271272 max_tokens: 1024,
272273 messages: [{ role: "user", content: "Hello, Claude" }],
273 user_profile_id: "uprof_011CZkZCu8hGbp5mYRQgUmz9"
274 user_profile_id: profileId
274275 });
275276
276277 console.log(message);
from line 285
284285 Model = Model.ClaudeOpus5_5,
285286 MaxTokens = 1024,
286287 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }],
287 UserProfileID = "uprof_011CZkZCu8hGbp5mYRQgUmz9"
288 UserProfileID = profileId
288289 };
289290 var message = await client.Messages.Create(parameters);
290291
from line 301
300301 Messages: []anthropic.MessageParam{
301302 anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, Claude")),
302303 },
303 UserProfileID: anthropic.String("uprof_011CZkZCu8hGbp5mYRQgUmz9"),
304 UserProfileID: anthropic.String(profileID),
304305 })
305306 if err != nil {
306307 log.Fatal(err)
from line 321
320321 .model(Model.CLAUDE_OPUS_5_5)
321322 .maxTokens(1024L)
322323 .addUserMessage("Hello, Claude")
323 .userProfileId("uprof_011CZkZCu8hGbp5mYRQgUmz9")
324 .userProfileId(profileId)
324325 .build();
325326 var message = client.messages().create(params);
326327
from line 336
335336 maxTokens: 1024,
336337 messages: [['role' => 'user', 'content' => 'Hello, Claude']],
337338 model: Model::CLAUDE_OPUS_5_5,
338 userProfileID: 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
339 userProfileID: $profileId,
339340 );
340341
341342 echo json_encode($message, JSON_PRETTY_PRINT), PHP_EOL;
from line 349
348349 model: Anthropic::Model::CLAUDE_OPUS_5_5,
349350 max_tokens: 1024,
350351 messages: [{ role: "user", content: "Hello, Claude" }],
351 user_profile_id: "uprof_011CZkZCu8hGbp5mYRQgUmz9"
352 user_profile_id: profile_id
352353 )
353354
354355 puts message
from line 391
3903912. Someone who can manage IAM in the AWS account or Google Cloud project runs a command that the portal provides.
3913923. The admin or owner completes the verification in the portal.
392393
393Programs that apply to a profile apply to an account's requests only after the account is linked and the portal shows it as **Linked**. Those programs include the ones an end customer's organization is approved for after the end customer [links the profile to that organization](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal).
394Programs that apply to a profile apply to an account's requests only after the account is linked and the portal shows it as **Linked**. Those programs include the ones an end customer's organization is approved for after the end customer [links the profile to that organization](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal) and, for Cyber Verification Program access levels, turns them on for the profile in the portal.
394395
395396Claude in Amazon Bedrock and Google Cloud check the format of the ID but don't look the profile up. They reject a malformed ID with a `400`. They accept any well-formed ID, so a successful response doesn't confirm that the ID matches a profile. A request with no ID goes through unattributed, and if it triggers an enforcement action, the action applies to your whole organization.
396397
from line 415
414415
415416<CodeGroup>
416417 ```bash cURL
417 curl https://api.anthropic.com/v1/user_profiles/uprof_011CZkZCu8hGbp5mYRQgUmz9 \
418 curl "https://api.anthropic.com/v1/user_profiles/$PROFILE_ID" \
418419 -H "x-api-key: $ANTHROPIC_API_KEY" \
419420 -H "anthropic-version: 2023-06-01" \
420421 -H "content-type: application/json" \
from line 427
426427
427428 ```bash CLI
428429 ant user-profiles update \
429 --user-profile-id uprof_011CZkZCu8hGbp5mYRQgUmz9 \
430 --user-profile-id "$PROFILE_ID" \
430431 --external-user-details '{account_status: suspended}' \
431432 --metadata '{trial_cohort: ""}'
432433 ```
from line 436
435436 client = anthropic.Anthropic()
436437
437438 profile = client.user_profiles.update(
438 "uprof_011CZkZCu8hGbp5mYRQgUmz9",
439 profile_id,
439440 external_user_details={"account_status": "suspended"},
440441 metadata={"trial_cohort": ""},
441442 )
from line 447
446447 ```typescript TypeScript
447448 const client = new Anthropic();
448449
449 const profile = await client.userProfiles.update("uprof_011CZkZCu8hGbp5mYRQgUmz9", {
450 const profile = await client.userProfiles.update(profileId, {
450451 external_user_details: { account_status: "suspended" },
451452 metadata: { trial_cohort: "" }
452453 });
from line 458
457458 ```csharp C#
458459 AnthropicClient client = new();
459460
460 var profile = await client.UserProfiles.Update("uprof_011CZkZCu8hGbp5mYRQgUmz9", new()
461 var profile = await client.UserProfiles.Update(profileId, new()
461462 {
462463 ExternalUserDetails = new()
463464 {
from line 475
474475
475476 profile, err := client.UserProfiles.Update(
476477 context.Background(),
477 "uprof_011CZkZCu8hGbp5mYRQgUmz9",
478 profileID,
478479 anthropic.UserProfileUpdateParams{
479480 ExternalUserDetails: anthropic.UserProfileExternalUserDetailsParams{
480481 AccountStatus: anthropic.UserProfileExternalUserAccountStatusSuspended,
from line 500
499500 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
500501
501502 var params = UserProfileUpdateParams.builder()
502 .userProfileId("uprof_011CZkZCu8hGbp5mYRQgUmz9")
503 .userProfileId(profileId)
503504 .externalUserDetails(UserProfileExternalUserDetailsParams.builder()
504505 .accountStatus(UserProfileExternalUserAccountStatus.SUSPENDED)
505506 .build())
from line 518
517518 $client = new Client();
518519
519520 $profile = $client->userProfiles->update(
520 'uprof_011CZkZCu8hGbp5mYRQgUmz9',
521 $profileId,
521522 externalUserDetails: ['accountStatus' => 'suspended'],
522523 metadata: ['trial_cohort' => ''],
523524 );
from line 530
529530 client = Anthropic::Client.new
530531
531532 profile = client.user_profiles.update(
532 "uprof_011CZkZCu8hGbp5mYRQgUmz9",
533 profile_id,
533534 external_user_details: { account_status: :suspended },
534535 metadata: { trial_cohort: "" }
535536 )
from line 541
540541
541542### Delete a profile
542543
543`DELETE /v1/user_profiles/{id}` permanently deletes a profile and everything 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 profile ID.
544[`DELETE /v1/user_profiles/{id}`](https://platform.claude.com/docs/en/api/user_profiles/delete) permanently deletes a profile and everything 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 profile ID.
544545
545546Delete a profile when an end customer closes their account or asks you to erase their data. Before you delete a profile, stop sending its ID on that end customer's requests. If the end customer stays with you after an erasure request, create a new profile and switch to its ID. Then delete the old one.
546547
547548<CodeGroup>
548549 ```bash cURL
549 curl -X DELETE https://api.anthropic.com/v1/user_profiles/uprof_011CZkZCu8hGbp5mYRQgUmz9 \
550 curl -X DELETE "https://api.anthropic.com/v1/user_profiles/$PROFILE_ID" \
550551 -H "x-api-key: $ANTHROPIC_API_KEY" \
551552 -H "anthropic-version: 2023-06-01"
552553 ```
553554
554555 ```bash CLI
555 ant user-profiles delete --user-profile-id uprof_011CZkZCu8hGbp5mYRQgUmz9
556 ant user-profiles delete --user-profile-id "$PROFILE_ID"
556557 ```
557558
558559 ```python Python
559560 client = anthropic.Anthropic()
560561
561 deleted = client.user_profiles.delete("uprof_011CZkZCu8hGbp5mYRQgUmz9")
562 deleted = client.user_profiles.delete(profile_id)
562563
563564 print(deleted.id)
564565 ```
from line 567
566567 ```typescript TypeScript
567568 const client = new Anthropic();
568569
569 const deleted = await client.userProfiles.delete("uprof_011CZkZCu8hGbp5mYRQgUmz9");
570 const deleted = await client.userProfiles.delete(profileId);
570571
571572 console.log(deleted.id);
572573 ```
from line 575
574575 ```csharp C#
575576 AnthropicClient client = new();
576577
577 var deleted = await client.UserProfiles.Delete("uprof_011CZkZCu8hGbp5mYRQgUmz9");
578 var deleted = await client.UserProfiles.Delete(profileId);
578579
579580 Console.WriteLine(deleted.ID);
580581 ```
from line 585
584585
585586 deleted, err := client.UserProfiles.Delete(
586587 context.Background(),
587 "uprof_011CZkZCu8hGbp5mYRQgUmz9",
588 profileID,
588589 anthropic.UserProfileDeleteParams{},
589590 )
590591 if err != nil {
from line 599
598599 void main() {
599600 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
600601
601 var deleted = client.userProfiles().delete("uprof_011CZkZCu8hGbp5mYRQgUmz9");
602 var deleted = client.userProfiles().delete(profileId);
602603
603604 IO.println(deleted.id());
604605 }
from line 608
607608 ```php PHP
608609 $client = new Client();
609610
610 $deleted = $client->userProfiles->delete('uprof_011CZkZCu8hGbp5mYRQgUmz9');
611 $deleted = $client->userProfiles->delete($profileId);
611612
612613 echo $deleted->id, PHP_EOL;
613614 ```
from line 616
615616 ```ruby Ruby
616617 client = Anthropic::Client.new
617618
618 deleted = client.user_profiles.delete("uprof_011CZkZCu8hGbp5mYRQgUmz9")
619 deleted = client.user_profiles.delete(profile_id)
619620
620621 puts deleted.id
621622 ```
from line 628
627628
628629## Next steps
629630
630The API reference has each endpoint's fields, types, and limits: [Create a profile](https://platform.claude.com/docs/en/api/user_profiles/create), [Retrieve a profile](https://platform.claude.com/docs/en/api/user_profiles/retrieve), [Update a profile](https://platform.claude.com/docs/en/api/user_profiles/update), and [List profiles](https://platform.claude.com/docs/en/api/user_profiles/list).
631The API reference has each endpoint's fields, types, and limits: [Create a profile](https://platform.claude.com/docs/en/api/user_profiles/create), [Retrieve a profile](https://platform.claude.com/docs/en/api/user_profiles/retrieve), [Update a profile](https://platform.claude.com/docs/en/api/user_profiles/update), [Delete a profile](https://platform.claude.com/docs/en/api/user_profiles/delete), and [List profiles](https://platform.claude.com/docs/en/api/user_profiles/list).
631632
632633If an end customer's program approvals should apply when they use Claude through your platform, see [Send an end customer a link to the Verification Portal](https://platform.claude.com/docs/en/manage-claude/user-profiles-verification-portal).
633634
No line in this hunk matches that.