{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/anthropic/main/json-schema/anthropic-beta-update-user-profile-request-body-schema.json",
  "title": "BetaUpdateUserProfileRequestBody",
  "x-generated": "2026-09-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/anthropic-user-profiles-api-openapi.yml#/components/schemas/BetaUpdateUserProfileRequestBody",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "external_id": {
      "description": "If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ]
    },
    "metadata": {
      "description": "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.",
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "name": {
      "description": "If present, replaces the stored name. Omit to leave unchanged. Maximum 255 characters.",
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ]
    },
    "relationship": {
      "description": "If present, replaces the stored relationship. Omit to leave unchanged.",
      "anyOf": [
        {
          "$ref": "#/$defs/BetaUserProfileRelationship"
        },
        {
          "type": "null"
        }
      ],
      "x-anthropic-beta-required": [
        "user-profiles-2026-03-24"
      ]
    },
    "access_type": {
      "description": "If present, replaces the stored access type. Omit to leave unchanged.",
      "anyOf": [
        {
          "$ref": "#/$defs/BetaUserProfileAccessType"
        },
        {
          "type": "null"
        }
      ],
      "x-anthropic-beta-required": [
        "user-profiles-2026-08-18"
      ]
    }
  },
  "$defs": {
    "BetaUserProfileAccessType": {
      "type": "string",
      "description": "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.",
      "enum": [
        "application",
        "passthrough"
      ]
    },
    "BetaUserProfileRelationship": {
      "type": "string",
      "description": "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.",
      "enum": [
        "external",
        "resold",
        "internal"
      ]
    }
  }
}