Update User Profile

post/v1/user_profiles/{user_profile_id}?beta=true

Path parameters

user_profile_idstring required

Path parameter user_profile_id

Headers

anthropic-versionstring
anthropic-betastring

Request body

external_idstring nullable

If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters.

metadataobject

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.

namestring nullable

If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters.

access_type'application' | 'passthrough' nullable

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.

external_user_onboarded_atstring date-time

A timestamp in RFC 3339 format

Example request

{
  "external_id": "user_12345"
}

Response

Successful response (OK)

idstring required

Unique identifier for this user profile, prefixed uprof_.

type'user_profile' required

Object type. Always user_profile.

external_idstring nullable

Platform's own identifier for this user. Not enforced unique.

namestring nullable

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.

access_type'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.

external_user_onboarded_atstring date-time nullable

A timestamp in RFC 3339 format

trust_grantsobject required

Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.

created_atstring date-time required

A timestamp in RFC 3339 format

metadataobject required

Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.

updated_atstring date-time required

A timestamp in RFC 3339 format

Example response

{
  "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
  "type": "user_profile",
  "external_id": "user_12345",
  "name": "Example User",
  "access_type": "application",
  "trust_grants": {
    "cyber": {
      "status": "active"
    }
  },
  "external_user_onboarded_at": "2024-11-02T08:15:00Z",
  "metadata": {},
  "created_at": "2026-03-15T10:00:00Z",
  "updated_at": "2026-03-15T10:00:00Z"
}

Changes

Changed in 5 of the 68 revisions of this API.6314

    • removed the request property

      request-property-removed

    • removed the optional property from the response with the status

      response-optional-property-removed

    • added the new optional request property

      new-optional-request-property

    • added the optional property to the response with the status

      response-optional-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • d3515f9e9eca12See the full diff
    • the response property became optional for the status

      response-property-became-optional

    • added the new optional request property

      new-optional-request-property

    • added the optional property to the response with the status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • d2b230555b7f515See the full diff
    • the request property became not nullable

      request-property-became-not-nullable

    • the request property became not nullable

      request-property-became-not-nullable

    • the request property became not nullable

      request-property-became-not-nullable

    • response property external_id list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • response property name list-of-types was widened by adding types null to media type application/json of response 200

      response-property-list-of-types-widened

    • removed from the request property allOf list

      request-property-all-of-removed

    • added subschema #2 to the request property anyOf list

      request-property-any-of-added

    • request property list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • request property list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • the request property's minLength was decreased from 1 to 0

      request-property-min-length-decreased

    • the request property's minLength was decreased from 1 to 0

      request-property-min-length-decreased

    • added the new optional request property

      new-optional-request-property

    • added the new optional request property

      new-optional-request-property

    • added the optional property to the response with the status

      response-optional-property-added

    • added the required property to the response with the status

      response-required-property-added

    This revision also has 22 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added