Claude Platform Docs

User Profiles

Create User Profile
client.userProfiles.create(params, options?): UserProfile
POST/v1/user_profiles
List User Profiles
client.userProfiles.list(params?, options?): PageCursor<UserProfile>
GET/v1/user_profiles
Get User Profile
client.userProfiles.retrieve(userProfileID, params?, options?): UserProfile
GET/v1/user_profiles/{user_profile_id}
Update User Profile
client.userProfiles.update(userProfileID, params, options?): UserProfile
POST/v1/user_profiles/{user_profile_id}
Delete User Profile
client.userProfiles.delete(userProfileID, params?, options?): DeletedUserProfile
DELETE/v1/user_profiles/{user_profile_id}
Models
interface DeletedUserProfile { type: "user_profile_deleted"; id }
type: "user_profile_deleted"

Object type. Always user_profile_deleted.

id: string

Identifier of the deleted user profile, prefixed uprof_.

interface UserProfile { type: "user_profile"; id; access_type; /* 8 more */ }

A record of an entity that the platform serves through the API, such as an end-user of the platform's product or a company that the platform resells Claude access to.

A Messages, Message Batches or token counting request can send a profile's id in the anthropic-user-profile-id header to attribute the request to that entity.

type UserProfileAccessType = "application" | "passthrough"

How the platform uses the API on behalf of the entity this profile represents. application: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. passthrough: the platform resells raw inference, and the profile identifies the resold-to company.

One of the following:
"application"

The user profile represents an individual end-user of a product that the platform builds on the API. New profiles get this value by default.

"passthrough"

The user profile represents a company that the platform resells Claude access to.

interface UserProfileBillingNotAuthorizedErrorDetails { error_code }
error_code: "user_profile_billing_not_authorized"
interface UserProfileCyberProgram { requirements; status; tiers }

A user profile's standing in the Cyber Verification Program, which relaxes cyber safeguards for requests that name the profile.

interface UserProfileCyberRequirements { data_retention; human_review }

What a request that names the profile must allow to get the relaxed safeguards of the profile's active tiers. A field reads true when at least one of those tiers has the requirement and Anthropic has not waived it on that tier for the profile. A request that does not meet a requirement is still served, without the relaxed safeguards of the tiers that have it. The values differ between profiles and can change, so read them rather than assuming them.

data_retention: boolean

Whether Anthropic must be able to retain the request's inference data.

human_review: boolean

Whether Anthropic personnel must be allowed to review the data retained from the request.

interface UserProfileCyberTier { status }

One tier of the Cyber Verification Program.

status: "active" | "inactive"

active when the tier applies to the profile, otherwise inactive. The response does not say why a tier is inactive: it can be in review, declined, withdrawn, never applied for, or approved but not applied to this profile.

One of the following:
"active"
"inactive"
interface UserProfileEfsFeature { status }

One feature of Enterprise Frontier Safeguards.

status: "active" | "inactive"

active when Anthropic has approved the entity the profile represents to use the feature, otherwise inactive. active does not mean that the feature is set up or switched on, which is a separate step.

One of the following:
"active"
"inactive"
interface UserProfileEfsProgram { features; status }

A user profile's standing in Enterprise Frontier Safeguards, a program under which Anthropic approves the entity the profile represents and may approve any of the program's features.

features: Record<string, UserProfileEfsFeature { status }>

The program's features, keyed by feature: data_retention_exemption (use of models that normally require data retention, without the data being retained), cmek (customer-managed encryption keys) and storage (customer-owned storage). Every feature that the caller's organization may read has a key, whether or not it is approved; a missing key does not mean that the feature is inactive. Anthropic may add features; ignore a key you do not recognize.

status: "active" | "inactive"

active when Anthropic has approved the entity the profile represents to use the feature, otherwise inactive. active does not mean that the feature is set up or switched on, which is a separate step.

One of the following:
"active"
"inactive"

Anthropic's decision on the entity the profile represents: pending while it is awaited, active once Anthropic has approved the entity for the program, or rejected once Anthropic has declined or has removed the entity from the program. active does not mean that any one feature is approved: read the feature you need in features.

One of the following:
"active"

The profile is in the program.

"pending"

The profile is not in the program yet, and something is still awaited.

"rejected"

The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

A limit Anthropic has placed on the entity this profile represents and not yet resolved, discriminated by type: restriction or ban. More types may be added; read a type you do not recognize as restriction.

One of the following:
interface UserProfileEnforcementActionBan { type: "ban"; id; action; /* 3 more */ }

Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

type: "ban"
id: string

The action's ID (enac_...), stable while the action is open.

Always null: the end user cannot clear a ban.

expires_at: string | null

Always null: a ban has no end date.

formatdate-time
opened_at: string

When Anthropic opened the action, in RFC 3339 format.

formatdate-time

Why Anthropic placed the limit: unsupported_region, fraud_or_abuse, high_harm, usage_policy_violation, account_compromise or unspecified.

One of the following:
"unsupported_region"
"fraud_or_abuse"
"high_harm"
"usage_policy_violation"
"account_compromise"
"unspecified"
type UserProfileEnforcementActionNextStep = "verify"

The next step on this enforcement action: verify means the end user can clear the action by passing an identity check. More values may be added; read a value you do not recognize as null.

type UserProfileEnforcementActionReason = "unsupported_region" | "fraud_or_abuse" | "high_harm" | 3 more

Why Anthropic placed this enforcement action: unsupported_region, fraud_or_abuse, high_harm, usage_policy_violation, account_compromise or unspecified. More values may be added; read a value you do not recognize as unspecified.

One of the following:
"unsupported_region"
"fraud_or_abuse"
"high_harm"
"usage_policy_violation"
"account_compromise"
"unspecified"
interface UserProfileEnforcementActionRestriction { type: "restriction"; id; action; /* 3 more */ }

Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

type: "restriction"
id: string

The action's ID (enac_...), stable while the action is open.

The next step on the action: verify or null. verify: the end user can clear it now by passing an identity check. null: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

expires_at: string | null

When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. null when it has no end date, and always null when reason is account_compromise.

formatdate-time
opened_at: string

When Anthropic opened the action, in RFC 3339 format.

formatdate-time

Why Anthropic placed the limit: unsupported_region, fraud_or_abuse, high_harm, usage_policy_violation, account_compromise or unspecified.

One of the following:
"unsupported_region"
"fraud_or_abuse"
"high_harm"
"usage_policy_violation"
"account_compromise"
"unspecified"
type UserProfileEnforcementStatus = "unrestricted" | "pending" | "restricted" | "banned"

Anthropic's enforcement status of this profile: unrestricted, pending, restricted or banned. More values may be added; read a value you do not recognize as restricted.

One of the following:
"unrestricted"
"pending"
"restricted"
"banned"
type UserProfileExternalUserAccountStatus = "active" | "suspended" | "blocked"

The status of the entity's account on the platform, as the platform states it: active; suspended, when the platform has restricted the account and may restore it; or blocked, when the platform has barred it. It records the platform's decision only. The statuses that Anthropic itself reports for the profile, such as its status in a program, are Anthropic's decisions and do not change with it.

One of the following:
"active"

The platform has neither restricted nor barred the account of the entity that the user profile represents.

"suspended"

The platform has restricted the account of the entity that the user profile represents and may restore it.

"blocked"

The platform has barred the account of the entity that the user profile represents.

interface UserProfileExternalUserDetails { account_status; country; email_hash; /* 4 more */ }

Details about the entity this profile represents, as the platform states them. Anthropic does not verify them. Every field is present, null until the platform supplies a value.

interface UserProfileExternalUserDetailsParams { account_status; country; email_hash; /* 4 more */ }
type UserProfileExternalUserEntityType = "individual" | "business" | "non_profit" | "government"

What kind of entity the profile represents, as the platform states it: individual, business, non_profit or government.

One of the following:
"individual"
"business"
"non_profit"
"government"
type UserProfileListOrder = "asc" | "desc"

The direction that a list of user profiles is sorted in.

One of the following:
"asc"

Oldest first when order_by is created_at, or names in ascending order when order_by is name.

"desc"

Newest first when order_by is created_at, or names in descending order when order_by is name. This is the default.

type UserProfileListOrderBy = "created_at" | "name"

Sort field for listing user profiles: created_at (default) or name (case-insensitive; profiles without a name sort last).

One of the following:
"created_at"

Sort by when each user profile was created. This is the default.

"name"

Sort by name, ignoring the case of ASCII letters. Profiles without a name come last in either direction.

interface UserProfileNotBillableErrorDetails { error_code }
error_code: "user_profile_not_billable"
interface UserProfileNotFoundErrorDetails { error_code }
error_code: "user_profile_not_found"
type UserProfileProgramStatus = "active" | "pending" | "rejected"

A user profile's status in a program. Each program's status field says what the values mean there.

One of the following:
"active"

The profile is in the program.

"pending"

The profile is not in the program yet, and something is still awaited.

"rejected"

The profile is not in the program and nothing is awaited: Anthropic has declined, or has withdrawn an earlier approval.

interface UserProfilePrograms { cyber; efs }

A user profile's standing in each program. A program is a set of capabilities or exemptions that Anthropic approves for the entity the profile represents. A program reads null when the profile has no status in it, when the caller's organization is not entitled to read programs, or when the response does not report that program. Retrieving the profile reports every program. Anthropic may add programs; ignore a key you do not recognize.

interface UserProfileRequiredErrorDetails { error_code }
error_code: "user_profile_required"
Errors
class UserProfileNotFoundError extends BadRequestError { errorCode; details }⁠HTTP status 400

The request depends on a user profile that does not exist in the organization or is no longer active. The request either names this user profile by ID, or names a resource, such as an External Key, that is bound to it.

errorCode: "user_profile_not_found"
details: UserProfileNotFoundErrorDetails { error_code }
error_code: "user_profile_not_found"
class UserProfileRequiredError extends BadRequestError { errorCode; details }⁠HTTP status 400

The request sets billing_policy.bill_to to "user_profile" but names no user profile. Name the profile to bill in the anthropic-user-profile-id header.

errorCode: "user_profile_required"
details: UserProfileRequiredErrorDetails { error_code }
error_code: "user_profile_required"
class UserProfileBillingNotAuthorizedError extends PermissionDeniedError { errorCode; details }⁠HTTP status 403

The customer that the request's user profile represents has not authorized the caller to bill them, or the authorization that the request's credential uses has ended. The response does not say which applies.

errorCode: "user_profile_billing_not_authorized"
error_code: "user_profile_billing_not_authorized"
class UserProfileNotBillableError extends PermissionDeniedError { errorCode; details }⁠HTTP status 403

The request's user profile cannot be billed. The response gives no more specific error code and does not say what the reason is.

errorCode: "user_profile_not_billable"
details: UserProfileNotBillableErrorDetails { error_code }
error_code: "user_profile_not_billable"

User ProfilesAction URLs

Create Action URL
client.userProfiles.actionURLs.create(userProfileID, params, options?): UserProfileActionURL
POST/v1/user_profiles/{user_profile_id}/action_urls