User Profiles
api/beta/user_profiles
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/beta/user_profiles Changed · +68 / -53 lines
### Headers ### Body parameters #### Response (200) ### Query parameters ### Headers #### Response (200) ### Path parameters ### Headers #### Response (200) ### Path parameters ### Headers ### Body parameters #### Response (200) ### Path parameters ### Headers #### Response (200) ## Domain types ### Header Parameters ### Body Parameters #### Response ### Query Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters #### Response ### Path Parameters ### Header Parameters ### Body Parameters #### Response ### Path Parameters ### Header Parameters #### Response ## Domain Types
---- -title: User Profiles -url: https://platform.claude.com/docs/en/api/beta/user_profiles ---- - # User Profiles ## Create User Profile -**post** `/v1/user_profiles` +**POST** `/v1/user_profiles` Create User Profile -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Body Parameters +### Body parameters - `access_type: optional "application" or "passthrough"`
Platform's own identifier for this user. Not enforced unique. Maximum 255 characters. + minLength: 1, maxLength: 255 + - `metadata: optional map[string]` Free-form key-value data to attach to this user profile. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters. Values must be non-empty strings.
Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters. + minLength: 1, maxLength: 255 + - `relationship: optional "external" or "resold" or "internal"` How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage.
### Returns -- `BetaUserProfile object { id, created_at, metadata, 7 more }` +- `BetaUserProfile object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `metadata: map[string]` Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
Object type. Always `user_profile`. - - `"user_profile"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `access_type: optional "application" or "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.
### Example -```http +```bash curl https://api.anthropic.com/v1/user_profiles \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## List User Profiles -**get** `/v1/user_profiles` +**GET** `/v1/user_profiles` List User Profiles -### Query Parameters +### Query parameters - `limit: optional number` Query parameter for limit + format: int32 + - `order: optional "asc" or "desc"` Query parameter for order
Query parameter for page -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
A timestamp in RFC 3339 format + format: date-time + - `metadata: map[string]` Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
Object type. Always `user_profile`. - - `"user_profile"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `access_type: optional "application" or "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.
### Example -```http +```bash curl https://api.anthropic.com/v1/user_profiles \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: user-profiles-2026-08-18' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Get User Profile -**get** `/v1/user_profiles/{user_profile_id}` +**GET** `/v1/user_profiles/{user_profile_id}` Get User Profile -### Path Parameters +### Path parameters - `user_profile_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
### Returns -- `BetaUserProfile object { id, created_at, metadata, 7 more }` +- `BetaUserProfile object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `metadata: map[string]` Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
Object type. Always `user_profile`. - - `"user_profile"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `access_type: optional "application" or "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.
### Example -```http +```bash curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'anthropic-version: 2023-06-01' \ -H 'anthropic-beta: user-profiles-2026-08-18' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
## Update User Profile -**post** `/v1/user_profiles/{user_profile_id}` +**POST** `/v1/user_profiles/{user_profile_id}` Update User Profile -### Path Parameters +### Path parameters - `user_profile_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
- `"mid-conversation-tool-changes-2026-07-01"` -### Body Parameters +### Body parameters - `access_type: optional "application" or "passthrough" or null`
If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. + minLength: 1, maxLength: 255 + - `metadata: optional map[string]` Key-value pairs to merge into the stored metadata. Keys provided overwrite existing values. To remove a key, set its value to an empty string. Keys not provided are left unchanged. Maximum 16 keys, with keys up to 64 characters and values up to 512 characters.
If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters. + minLength: 1, maxLength: 255 + - `relationship: optional "external" or "resold" or "internal" or null` How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage.
### Returns -- `BetaUserProfile object { id, created_at, metadata, 7 more }` +- `BetaUserProfile object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `metadata: map[string]` Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
Object type. Always `user_profile`. - - `"user_profile"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `access_type: optional "application" or "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.
### Example -```http +```bash curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +#### Response (200) ```json {
## Create Enrollment URL -**post** `/v1/user_profiles/{user_profile_id}/enrollment_url` +**POST** `/v1/user_profiles/{user_profile_id}/enrollment_url` Create Enrollment URL -### Path Parameters +### Path parameters - `user_profile_id: string` -### Header Parameters +### Headers - `"anthropic-beta": optional array of AnthropicBeta`
### Returns -- `BetaUserProfileEnrollmentURL object { expires_at, type, url }` +- `BetaUserProfileEnrollmentURL object` - `expires_at: string` A timestamp in RFC 3339 format + format: date-time + - `type: "enrollment_url"` Object type. Always `enrollment_url`. - - `"enrollment_url"` - - `url: string` Enrollment URL to send to the end user. Valid until `expires_at`.
### Example -```http +```bash curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ -X POST \ -H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" ``` -#### Response +#### Response (200) ```json {
} ``` -## Domain Types +## Domain types ### Beta User Profile -- `BetaUserProfile object { id, created_at, metadata, 7 more }` +- `BetaUserProfile object` - `id: string`
A timestamp in RFC 3339 format + format: date-time + - `metadata: map[string]` Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
Object type. Always `user_profile`. - - `"user_profile"` - - `updated_at: string` A timestamp in RFC 3339 format + format: date-time + - `access_type: optional "application" or "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.
### Beta User Profile Enrollment URL -- `BetaUserProfileEnrollmentURL object { expires_at, type, url }` +- `BetaUserProfileEnrollmentURL object` - `expires_at: string` A timestamp in RFC 3339 format + format: date-time + - `type: "enrollment_url"` Object type. Always `enrollment_url`. - - `"enrollment_url"` - - `url: string` Enrollment URL to send to the end user. Valid until `expires_at`.
### Beta User Profile Trust Grant -- `BetaUserProfileTrustGrant object { status }` +- `BetaUserProfileTrustGrant object` - `status: "active" or "pending" or "rejected"`