Claude Platform Docs

사용자 프로필

사용자 프로필 생성
client.Beta.UserProfiles.New(ctx, params) (*BetaUserProfile, error)
POST/v1/user_profiles
사용자 프로필 목록 조회
client.Beta.UserProfiles.List(ctx, params) (*PageCursor[BetaUserProfile], error)
GET/v1/user_profiles
사용자 프로필 조회
client.Beta.UserProfiles.Get(ctx, userProfileID, query) (*BetaUserProfile, error)
GET/v1/user_profiles/{user_profile_id}
사용자 프로필 업데이트
client.Beta.UserProfiles.Update(ctx, userProfileID, params) (*BetaUserProfile, error)
POST/v1/user_profiles/{user_profile_id}
등록 URL 생성
client.Beta.UserProfiles.NewEnrollmentURL(ctx, userProfileID, body) (*BetaUserProfileEnrollmentURL, error)
POST/v1/user_profiles/{user_profile_id}/enrollment_url
Models
type BetaUserProfile struct { Type: "user_profile"; ID; CreatedAt; /* 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 BetaUserProfileEnrollmentURL struct { Type: "enrollment_url"; ExpiresAt; URL }

A URL to give to the entity that a user profile represents, so that the entity can enroll for a trust grant.

Type BetaUserProfileEnrollmentURLType

Object type. Always enrollment_url.

ExpiresAt Time

When this enrollment URL expires, in RFC 3339 format.

formatdate-time
URL string

Enrollment URL to send to the end user. Valid until expires_at.

type BetaUserProfileExternalUserDetails struct { AccountStatus; Country; EmailHash; /* 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.

type BetaUserProfileExternalUserDetailsParams struct { AccountStatus; Country; EmailHash; /* 4 more */ }
type BetaUserProfileTrustGrant struct { Status }

The status of one trust grant on a user profile, listed in the profile's trust_grants map under the grant's name.

Status BetaUserProfileTrustGrantStatus

Status of the trust grant.

One of the following:
const BetaUserProfileTrustGrantStatusActive BetaUserProfileTrustGrantStatus = "active"
const BetaUserProfileTrustGrantStatusPending BetaUserProfileTrustGrantStatus = "pending"
const BetaUserProfileTrustGrantStatusRejected BetaUserProfileTrustGrantStatus = "rejected"