On this pageWhat you will learn

How to Use Anthropic API User Profiles for End-Customer Requests

GauravXtrusio9 min read

Short answer

Create one Anthropic user profile per end customer, save the returned uprof_ ID, and send it in the anthropic-user-profile-id header on every request you make for that customer. Anthropic launched profiles on 20 October 2026 so a safety action, such as a restriction or ban, can apply to one customer instead of your whole organization. On their own, profiles do not change billing or pricing. Read 27 November 2026.

Developer reviewing customer attribution for Claude API requests
Photo illustration by Xtrusio. Conceptual scene, not a Claude Platform screenshot.

Disclosure: Xtrusio is our product and is mentioned in this guide. By Gaurav. The API examples come from Anthropic documentation read on 27 November 2026; we did not send a live request.

What you will learn

  • Anthropic announced user profiles on 20 October 2026, for attributing API traffic to an end customer. It added the enforcement_status and enforcement_actions fields on 21 October 2026.
  • Create one profile per person using your application, or per company when you resell Claude access.
  • Save the returned profile ID and send it as the anthropic-user-profile-id header for that customer’s requests.
  • Profile creation is not idempotent, and profiles belong to an organization rather than a workspace.
  • The current user profile endpoints need no anthropic-beta header. Older user-profiles- beta values still appear in the reference and leave out the enforcement fields.

The five steps

  1. 1. Pick the unit One profile per end customer: a person (application) or a reselling company (passthrough).
  2. 2. Create once POST /v1/user_profiles at onboarding. It is not idempotent: a second call makes a second profile.
  3. 3. Store the ID Keep the returned uprof_ ID on your customer record and reuse it.
  4. 4. Send the header anthropic-user-profile-id on every request for that customer (SDK argument: user_profile_id).
  5. 5. Check and maintain Read enforcement_status, update details, delete the profile when the customer leaves.

Choose the customer unit before creating anything

Choose the profile unit based on your business. Use application, the default, for each end customer that uses your product. Use passthrough for each company buying Claude access through your gateway. Either way, a company gets one profile, never one per employee. Anthropic also allows an optional Messages metadata.user_id for an identifiable employee. That request field differs from profile metadata.

For example, a support app could map one subscriber to one profile. A gateway could map Acme Analytics to one passthrough profile. This is a mapping example, not a tested account.

Screenshot of an earlier version of Anthropic's guide, kept as a record: it shows who gets a profile and that a workspace does not become a separate customer profile.
Application or passthrough: which profile type to use
Decisionapplicationpassthrough
Who the profile representsOne end customer that uses your productOne company buying Claude access through you
When to create itDuring user onboardingDuring company onboarding
Default valueYesNo, set explicitly
Extra individual identifierOptional request metadata.user_id for a company profile, when you can identify the personOptional request metadata.user_id when known

Do not create a profile for your own usage or for a workspace. Anthropic counts a request with no profile ID as your own usage and advises keeping it in a separate organization. The exception is a workspace that has a profile attached through user_profile_id on Create or Update Workspace: every inference request through that workspace must then carry that profile’s ID, and the API rejects any other ID or none.

Create once, then store the returned ID

Call POST /v1/user_profiles in the organization that sends customer traffic. You can put your stable customer ID in external_user_details.reference_id. Save the returned uprof_ ID on your customer record and reuse it. Creation is not idempotent. A second call makes another profile even with the same reference ID. Anthropic does not enforce that reference ID as unique.

Every field is optional. Omit unknown values instead of sending placeholders: you can replace a value in external_user_details later but cannot clear it. If you cannot share a name or email address, send name_hash or email_hash, computed the same way for every profile. Profiles do not contain conversations, and Anthropic does not verify the details you send. Creation is rate limited; ask your Anthropic account team before registering an existing customer base in bulk. A profile itself does not change billing or pricing. If you use Linked billing, a profile is also how you identify the customer to bill.

Use the current API version (the documentation examples use anthropic-version: 2026-10-21) and no user-profiles beta header. The legacy values user-profiles-2026-03-24, user-profiles-2026-08-18 and user-profiles-2026-09-04 return an older response shape that omits the enforcement fields. Do not mix an old beta example with current response-field expectations.

Send the ID on every request for that customer

For Claude API Messages, send the returned ID in the anthropic-user-profile-id header. The SDK argument (user_profile_id in Python; --user-profile-id in the CLI) sends it for you. The header works the same way on token counting, Message Batches and OpenAI SDK compatibility requests. One batch header covers every request in that batch. Do not mix customers under one ID.

Screenshot of an earlier version of Anthropic's guide, kept as a record: it shows where the ID goes. The Bedrock and Google Cloud details have since changed, so use the platform table below. It is not our production response.

Keep internal API use apart from customer traffic. A profile works across workspaces in its creating organization, so a workspace is not a separate safety boundary.

Which platforms accept a profile ID

Platform behaviour for user profiles (Anthropic user profile guide, read 27 November 2026)
PlatformCreate profiles hereWhere the ID goesDoes it check the ID?
Claude APIYesHeaderYes, every request
Claude Platform on AWSYesHeaderYes, every request
Claude Models on Google Cloud (Anthropic managed)YesHeaderYes, every request
Microsoft Foundry, hosted on AnthropicNo: create on the Claude API, then ask Anthropic to link your Foundry resourceHeaderYes; every ID gets a 400 until the link exists
Claude Models on Google Cloud (Google managed)NoHeaderFormat only
Amazon Bedrock (bedrock-mantle and InvokeModel)Nouser_profile_id in the request bodyFormat only
Claude API
Create profiles here
Yes
Where the ID goes
Header
Does it check the ID?
Yes, every request
Claude Platform on AWS
Create profiles here
Yes
Where the ID goes
Header
Does it check the ID?
Yes, every request
Claude Models on Google Cloud (Anthropic managed)
Create profiles here
Yes
Where the ID goes
Header
Does it check the ID?
Yes, every request
Microsoft Foundry, hosted on Anthropic
Create profiles here
No: create on the Claude API, then ask Anthropic to link your Foundry resource
Where the ID goes
Header
Does it check the ID?
Yes; every ID gets a 400 until the link exists
Claude Models on Google Cloud (Google managed)
Create profiles here
No
Where the ID goes
Header
Does it check the ID?
Format only
Amazon Bedrock (bedrock-mantle and InvokeModel)
Create profiles here
No
Where the ID goes
user_profile_id in the request body
Does it check the ID?
Format only

On Bedrock, send the ID only for Claude 4.7 and later models, Claude Sonnet 4.6 and Claude Haiku 4.5. A request for any other model that carries it can fail with a 400. Leave it out of Bedrock batch inference jobs. InvokeModel requests to Sonnet 4.6 and Haiku 4.5 can return a 400 with the latest SDK; Anthropic advises the previous major SDK version for those two. The Converse API does not support user profiles. Read the platform-specific guide before you copy a Claude API example.

The endpoint map and ID validation

The API reference lists five operations. None is labelled beta, and none needs an anthropic-beta header. Update uses POST, not PATCH.

User profile operations
TaskDocumented operationUse
RegisterPOST /v1/user_profilesCreate a profile once and save its ID
Find existingGET /v1/user_profiles or GET /v1/user_profiles/{id}Reconcile a stored customer mapping; filter by enforcement_status[]
Change detailsPOST /v1/user_profiles/{id}Update known customer details or status
RemoveDELETE /v1/user_profiles/{id}Remove supplied profile data after you stop sending that ID

On the Claude API, Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed) and Anthropic-hosted Microsoft Foundry, a malformed ID, or one from another organization, returns a 400 invalid_request_error. Message Batches checks only the ID format when you create the batch. A well-formed foreign ID lets the batch be created and then fails each request inside it. Google Cloud (Google managed) and Amazon Bedrock check the format (a malformed ID gets a 400) but do not look the profile up, so a successful response does not prove a matching profile. A request with no ID goes through unattributed, and any enforcement action it triggers applies to your whole organization.

Check whether Anthropic has restricted or banned a profile

Every response that returns a profile includes enforcement_status and enforcement_actions. Retrieve one with GET /v1/user_profiles/{id}, or list profiles with enforcement_status[]=restricted and enforcement_status[]=banned to find open actions. Keep requesting pages until next_page is null, because a page can hold fewer results than limit.

What enforcement_status means (Anthropic, read 27 November 2026)
ValueMeaning
unrestrictedNo action is open.
restrictedAt least one action is open and none is a ban. Anthropic may refuse some or all requests that carry the ID.
bannedA ban is open.

The API reference also lists pending (a restriction that an identity check can clear, where the customer has submitted the check and Anthropic’s review is ongoing; not used while an account_compromise action is open). Anthropic can add values, so treat an unrecognized status as restricted. Each action carries a type (restriction or ban), an enac_ ID, a reason, opened_at, expires_at (null for a ban) and an action field (verify when the customer can clear it with an identity check, otherwise null). Anthropic sets both fields: a create or update request that includes either returns a 400. They are separate from external_user_details.account_status, which records your own decision. On Claude Platform on AWS the fields do not report actions.

Organization webhooks are meant to announce two events, user_profile.enforcement_action_opened and user_profile.enforcement_action_resolved. Webhooks are a beta that needs the webhooks-2026-10-07 header and access that most organizations request from their Anthropic account team. Anthropic’s webhook page says delivery of these two events is not live. For now, poll the profile list and compare both enforcement fields with what you saw last; do not rely on updated_at.

Update and delete a profile

POST /v1/user_profiles/{id} changes only the fields you send. name and access_type replace the stored value, each external_user_details field replaces its value (null is rejected), and metadata merges key by key, with an empty string deleting a key.

DELETE /v1/user_profiles/{id} permanently removes what you supplied, including name, details and metadata. It does not remove the trust and safety records Anthropic keeps about that ID. Stop sending the ID first. Requests that carry a deleted ID can still succeed for up to about 10 minutes; after that, platforms that check IDs return a 400. Google Cloud (Google managed) and Amazon Bedrock keep accepting the ID, because they do not look profiles up. For Claude Models on Google Cloud (Anthropic managed) the guide lists create, retrieve, list and update; delete on the Claude API. If a customer stays after an erasure request, create a new profile and switch to it before deleting the old one.

Profiles are not an AI visibility feature

Profiles attribute customer requests. They do not measure whether Claude names or cites your brand. For that separate question, Xtrusio is built for enterprise software (SaaS) companies: it is free for the first month, scanning 50 prompts (300 answers) across six AI platforms: ChatGPT, Claude, Gemini, Perplexity, Google AI Overviews and Google AI Mode (Grok on request), then from $1,500 a month, and it records the answers and their citations. A profile ID says whose request reached Anthropic; an answer record shows what the assistant said.

Frequently asked questions

Does a user profile replace a workspace or separate billing?

No. Anthropic says profiles belong to an organization, work across its workspaces, and on their own do not change billing or pricing. Use a separate organization for your own internal traffic.

What happens if I send the wrong profile ID?

The Claude API checks format and organization ownership and returns a 400 invalid_request_error for a malformed or foreign ID. Message Batches checks format when the batch is created, then reports a per-request error for a foreign ID.

Can I register the same customer twice using the same reference ID?

Yes. Profile creation is not idempotent and the reference ID is not enforced as unique. Store and reuse the returned profile ID rather than creating a new one for each request.

Do profiles include conversation text?

No. A profile holds the customer details you send and program or enforcement status Anthropic sets, not conversation content.

Are user profiles an AI visibility measurement feature?

No. They identify whose traffic a platform sends to Anthropic. To study how assistants mention or cite a brand, use a separate answer and citation measurement workflow.

How do I know if Anthropic restricted one of my customers?

Retrieve the profile and read enforcement_status and enforcement_actions , or list profiles filtered to restricted and banned. The webhook events for this are not sent yet, so poll.

Does a profile ID work on Amazon Bedrock?

Yes for Claude 4.7 and later, Sonnet 4.6 and Haiku 4.5, sent as user_profile_id in the request body. Create the profile on the Claude API or Claude Platform on AWS. The Converse API does not support it.

What happens when I delete a profile?

Its profile endpoints then return 404. Requests carrying the ID can still succeed for up to about 10 minutes, then platforms that check IDs return a 400 (Google Cloud Google managed and Bedrock keep accepting it). Anthropic keeps its trust and safety records for that ID.

Sources

Topics

  • How to Use Anthropic API User Profiles for End-Customer Requests

Gaurav

AI visibility research at Xtrusio, Xtrusio

Xtrusio is the Perception Engine for B2B brands.

Free check

See how AI engines answer about you

Get your free AI visibility check

Talk to us about the managed plan (free trial)