Available on crate feature
user-profiles only.Expand description
The User Profiles API (beta).
User profiles let your platform attach Anthropic-managed metadata
and trust grants to your end users. A UserProfile carries:
- your platform’s own
external_id(e.g. your DB primary key) – not enforced unique server-side, - free-form
metadata(≤16 keys), trust_grantsthe user has been granted (e.g. for elevated content categories), keyed by grant name withTrustGrantStatus.
Trust grants are not granted directly via this API. Instead, call
UserProfiles::create_enrollment_url to get a signed,
short-lived URL that you redirect the end user to so they can
complete the trust enrollment flow on Anthropic’s side.
§Beta
Every method automatically sends
anthropic-beta: user-profiles-2026-03-24
(BetaHeader::UserProfiles).
Override the beta version on the Client builder
if a newer revision is current.
§Endpoints
| Method | Path | Function |
|---|---|---|
POST | /v1/user_profiles | UserProfiles::create |
GET | /v1/user_profiles | UserProfiles::list |
GET | /v1/user_profiles/{user_profile_id} | UserProfiles::get |
POST | /v1/user_profiles/{user_profile_id} | UserProfiles::update |
POST | /v1/user_profiles/{user_profile_id}/enrollment_url | UserProfiles::create_enrollment_url |
Structs§
- Create
User Profile Request - Body for
UserProfiles::create. Both fields optional. - Enrollment
Url - A signed, short-lived enrollment URL returned by
UserProfiles::create_enrollment_url. - List
User Profiles Params - Query parameters for
GET /v1/user_profiles. - Trust
Grant - One trust grant on a
UserProfile. - Update
User Profile Request - Body for
UserProfiles::update. - User
Profile - A user profile resource.
- User
Profiles - Namespace handle for the User Profiles API.
Enums§
- List
Order - Sort order for list endpoints.
- Trust
Grant Status - Status of a single trust grant on a
UserProfile.