Repository Public
1---2title: Update User Profile3url: https://platform.claude.com/docs/en/api/beta/user_profiles/update4---56# Update User Profile78**POST** `/v1/user_profiles/{user_profile_id}`910Update User Profile1112## Path parameters1314- `user_profile_id: string`1516## Headers1718- `"anthropic-beta": optional array of AnthropicBeta`1920 Optional header to specify the beta version(s) you want to use.2122 - `string`2324 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 43 more`2526 - `"message-batches-2024-09-24"`2728 - `"prompt-caching-2024-07-31"`2930 - `"computer-use-2024-10-22"`3132 - `"computer-use-2025-01-24"`3334 - `"pdfs-2024-09-25"`3536 - `"token-counting-2024-11-01"`3738 - `"token-efficient-tools-2025-02-19"`3940 - `"output-128k-2025-02-19"`4142 - `"files-api-2025-04-14"`4344 - `"mcp-client-2025-04-04"`4546 - `"mcp-client-2025-11-20"`4748 - `"dev-full-thinking-2025-05-14"`4950 - `"interleaved-thinking-2025-05-14"`5152 - `"code-execution-2025-05-22"`5354 - `"extended-cache-ttl-2025-04-11"`5556 - `"context-1m-2025-08-07"`5758 - `"context-management-2025-06-27"`5960 - `"model-context-window-exceeded-2025-08-26"`6162 - `"skills-2025-10-02"`6364 - `"fast-mode-2026-02-01"`6566 - `"output-300k-2026-03-24"`6768 - `"user-profiles-2026-03-24"`6970 - `"user-profiles-2026-08-18"`7172 - `"user-profiles-2026-09-04"`7374 - `"advisor-tool-2026-03-01"`7576 - `"managed-agents-2026-04-01"`7778 - `"cache-diagnosis-2026-04-07"`7980 - `"dreaming-2026-04-21"`8182 - `"thinking-token-count-2026-05-13"`8384 - `"server-side-fallback-2026-06-01"`8586 - `"server-side-fallback-2026-07-01"`8788 - `"fallback-credit-2026-06-01"`8990 - `"fallback-credit-2026-07-01"`9192 - `"agent-memory-2026-07-22"`9394 - `"mid-conversation-tool-changes-2026-07-01"`9596 - `"compact-2026-01-12"`9798 - `"computer-use-2025-11-24"`99100 - `"mcp-tunnels-2026-06-22"`101102 - `"structured-outputs-2025-11-13"`103104 - `"task-budgets-2026-03-13"`105106 - `"thinking-display-updates-2026-08-18"`107108 - `"ce-user-management-2026-07-13"`109110 - `"mid-conversation-output-config-2026-07-01"`111112 - `"thinking-binding-controls-2026-08-01"`113114 - `"mid-conversation-system-clear-at-2026-08-21"`115116 - `"compact-2026-09-04"`117118- `"anthropic-workspace-id": optional string`119120## Body parameters121122- `access_type: optional "application" or "passthrough" or null`123124 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.125126 - `"application"`127128 - `"passthrough"`129130- `external_id: optional string or null`131132 If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. Accepted under the `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers; under `user-profiles-2026-09-04` send `external_user_details.reference_id` instead.133134 minLength: 1, maxLength: 255135136- `external_user_details: optional BetaUserProfileExternalUserDetailsParams`137138 Details about the entity this profile represents, as the platform states them. Each field sent replaces the stored value; omit a field to leave it unchanged. Once set, a value cannot be cleared and `null` is rejected. Accepted under the `user-profiles-2026-09-04` beta header only.139140 - `account_status: optional "active" or "suspended" or "blocked" or null`141142 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 in `trust_grants` are Anthropic's and do not follow it.143144 - `"active"`145146 - `"suspended"`147148 - `"blocked"`149150 - `country: optional string or null`151152 The country of the entity (not of the platform), as the platform determines it: an ISO 3166-1 alpha-2 code in upper case, for example `US`. Only the form, two uppercase ASCII letters, is checked.153154 - `email_hash: optional string or null`155156 A hash of the entity's email address, computed by the platform. Anthropic treats it as an opaque string and does not prescribe the hash function. 1 to 255 characters.157158 minLength: 1, maxLength: 255159160 - `entity_type: optional "individual" or "business" or "non_profit" or "government" or null`161162 What kind of entity the profile represents, as the platform states it: `individual`, `business`, `non_profit` or `government`.163164 - `"individual"`165166 - `"business"`167168 - `"non_profit"`169170 - `"government"`171172 - `name_hash: optional string or null`173174 A hash of the entity's name, computed by the platform. Anthropic treats it as an opaque string and does not prescribe the hash function. 1 to 255 characters.175176 minLength: 1, maxLength: 255177178 - `onboarded_at: optional string`179180 A timestamp in RFC 3339 format181182 format: date-time183184 - `reference_id: optional string or null`185186 The platform's own reference for the entity, for example the key of the end-user's row in the platform's database. Not interpreted by Anthropic and not enforced unique. 1 to 255 characters.187188 minLength: 1, maxLength: 255189190- `external_user_onboarded_at: optional string`191192 A timestamp in RFC 3339 format193194 format: date-time195196- `metadata: optional map[string]`197198 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.199200- `name: optional string or null`201202 If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters.203204 minLength: 1, maxLength: 255205206## Returns207208- `BetaUserProfile object`209210 - `type: "user_profile"`211212 Object type. Always `user_profile`.213214 - `id: string`215216 Unique identifier for this user profile, prefixed `uprof_`.217218 - `created_at: string`219220 A timestamp in RFC 3339 format221222 format: date-time223224 - `metadata: map[string]`225226 Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.227228 - `trust_grants: map[BetaUserProfileTrustGrant]`229230 Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.231232 - `status: "active" or "pending" or "rejected"`233234 Status of the trust grant.235236 - `"active"`237238 - `"pending"`239240 - `"rejected"`241242 - `updated_at: string`243244 A timestamp in RFC 3339 format245246 format: date-time247248 - `access_type: optional "application" or "passthrough"`249250 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.251252 - `"application"`253254 - `"passthrough"`255256 - `external_id: optional string or null`257258 Platform's own identifier for this user. Not enforced unique. Present under the `user-profiles-2026-03-24` and `user-profiles-2026-08-18` beta headers; under `user-profiles-2026-09-04` the value is `external_user_details.reference_id`.259260 - `external_user_details: optional BetaUserProfileExternalUserDetails`261262 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.263264 - `account_status: "active" or "suspended" or "blocked" or null`265266 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 in `trust_grants` are Anthropic's and do not follow it.267268 - `"active"`269270 - `"suspended"`271272 - `"blocked"`273274 - `country: string or null`275276 The country the platform associates with the entity, as an ISO 3166-1 alpha-2 code. `null` until the platform supplies one.277278 - `email_hash: string or null`279280 The platform-computed hash of the entity's email address. `null` until the platform supplies one.281282 - `entity_type: "individual" or "business" or "non_profit" or "government" or null`283284 What kind of entity the profile represents, as the platform states it: `individual`, `business`, `non_profit` or `government`.285286 - `"individual"`287288 - `"business"`289290 - `"non_profit"`291292 - `"government"`293294 - `name_hash: string or null`295296 The platform-computed hash of the entity's name. `null` until the platform supplies one.297298 - `onboarded_at: string or null`299300 A timestamp in RFC 3339 format301302 format: date-time303304 - `reference_id: string or null`305306 The platform's own reference for the entity. `null` until the platform supplies one.307308 - `external_user_onboarded_at: optional string or null`309310 A timestamp in RFC 3339 format311312 format: date-time313314 - `name: optional string or null`315316 Real-world name of the entity this profile represents (company or individual). For a company the platform resells Claude access to (`access_type` `passthrough`) this is that company's name.317318## Example319320```bash321curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \322 -H 'Content-Type: application/json' \323 -H 'anthropic-version: 2023-06-01' \324 -H 'anthropic-beta: user-profiles-2026-08-18' \325 -H "X-Api-Key: $ANTHROPIC_API_KEY" \326 -d '{327 "external_id": "user_12345"328 }'329```330331### Response (200)332333```json334{335 "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",336 "created_at": "2026-03-15T10:00:00Z",337 "metadata": {},338 "trust_grants": {339 "cyber": {340 "status": "active"341 }342 },343 "type": "user_profile",344 "updated_at": "2026-03-15T10:00:00Z",345 "access_type": "application",346 "external_id": "user_12345",347 "external_user_details": {348 "account_status": "active",349 "country": "country",350 "email_hash": "email_hash",351 "entity_type": "individual",352 "name_hash": "name_hash",353 "onboarded_at": "2019-12-27T18:11:19.117Z",354 "reference_id": "reference_id"355 },356 "external_user_onboarded_at": "2024-11-02T08:15:00Z",357 "name": "Example User"358}359```360