{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1password/json-schema/1password-person-patch-schema.json",
  "title": "PersonPatch",
  "description": "Selected person fields to update. Omitted fields are left unchanged; fields set to null are cleared.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1password-people-api-openapi.yml#/components/schemas/PersonPatch",
  "type": "object",
  "properties": {
    "firstName": {
      "type": [
        "string",
        "null"
      ],
      "description": "First name"
    },
    "lastName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last name"
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Primary email address"
    },
    "aliases": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Additional email addresses linked to this person"
    },
    "employeeId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Employee ID"
    },
    "employeeType": {
      "type": [
        "string",
        "null"
      ],
      "description": "A free-text employee type (e.g. full-time, part-time). Distinct from personType."
    },
    "personType": {
      "allOf": [
        {
          "$ref": "#/$defs/PersonType"
        }
      ],
      "description": "Classifies the person: Employee, Contractor, ServiceAccount or External. Distinct from the free-text employeeType."
    },
    "jobTitle": {
      "type": [
        "string",
        "null"
      ],
      "description": "Job title"
    },
    "location": {
      "type": [
        "string",
        "null"
      ],
      "description": "A description of the person's location. A matching location is found or created."
    },
    "costCenter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Cost center. A matching cost center is found or created."
    },
    "startDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) Date the person joined the organization. Pass null to clear.",
      "format": "date-time"
    },
    "leavingDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) Date the person left, or is due to leave, the organization. Pass null to clear.",
      "format": "date-time"
    },
    "loginName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The person's login name on the local domain, used by the Browser Extension Helper."
    },
    "teamIds": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Replace the person's team memberships by team ID. Mutually exclusive with teams."
    },
    "teams": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Team"
      },
      "description": "Replace the person's team memberships by team (ID or name). Mutually exclusive with teamIds."
    },
    "lineManagerEmail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set the line manager by email address. Mutually exclusive with lineManagerId."
    },
    "lineManagerId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set the line manager by SaaS Manager person ID. Mutually exclusive with lineManagerEmail."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "PersonType": {
      "enum": [
        "Employee",
        "Contractor",
        "ServiceAccount",
        "External"
      ],
      "type": "string"
    },
    "Team": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The team's unique ID. Omit when creating a team by name."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The team's name"
        }
      },
      "additionalProperties": false,
      "description": "A team that a person can belong to"
    }
  }
}