{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lune/json-schema/lune-partial-update-account-request-schema.json",
  "title": "PartialUpdateAccountRequest",
  "description": "Providing null on a property will result in clearing the existing value (if present).\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lune-accounts-api-openapi.yml#/components/schemas/PartialUpdateAccountRequest",
  "type": "object",
  "properties": {
    "name": {
      "description": "The account name.",
      "type": "string"
    },
    "beneficiary": {
      "description": "The account beneficiary. Leading and trailing spaces are removed.",
      "type": [
        "string",
        "null"
      ],
      "minLength": 1
    },
    "bundle_portfolio_id": {
      "description": "The bundle portfolio unique identifier.",
      "type": [
        "string",
        "null"
      ]
    },
    "handle": {
      "type": "string",
      "pattern": "^[a-z0-9-_]+$",
      "description": "`handle` is a client defined URL-friendly string that identifies the account.\n\nThe `handle` is unique per organisation and account type.\n"
    },
    "external_pages_visibility": {
      "$ref": "#/$defs/AccountExternalPagesVisibility"
    },
    "idempotency_key": {
      "$ref": "#/$defs/AccountIdempotencyKey"
    }
  },
  "$defs": {
    "AccountExternalPagesVisibility": {
      "description": "Controls the visibility of external pages such as sustainability and analytics pages.\n\n`public` pages are visible to everyone.\n`private` pages are only visible through a verified JWT.\n`hidden` pages not visible.\n\nDefaults to `hidden`.\n",
      "type": "string",
      "enum": [
        "public",
        "hidden",
        "private"
      ]
    },
    "AccountIdempotencyKey": {
      "type": "string",
      "maxLength": 100,
      "description": "A unique identifier provided by the client.\n\n`idempotency_key` is unique per account type.\n\nIf an account with the same `idempotency_key` already exists, the API returns\nHTTP 409 Conflict with error code `account_idempotency_already_exists`.\n"
    }
  }
}