{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1password/json-schema/1password-person-put-schema.json",
  "title": "PersonPut",
  "description": "The details used to create or replace a person",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1password-people-api-openapi.yml#/components/schemas/PersonPut",
  "type": "object",
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The person's SaaS Manager ID. May be supplied here instead of in the route; must match the route id if both are given."
    },
    "teamIds": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Team memberships by team ID. Mutually exclusive with teams."
    },
    "lineManagerEmail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set the line manager by email address. Mutually exclusive with lineManager and lineManagerId."
    },
    "lineManagerId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Set the line manager by SaaS Manager person ID. Mutually exclusive with lineManager and lineManagerEmail."
    },
    "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."
    },
    "aliases": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Email addresses linked to this person"
    },
    "userName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user's logon name (from integrations)",
      "readOnly": true
    },
    "firstName": {
      "type": [
        "string",
        "null"
      ],
      "description": "First name"
    },
    "lastName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Last name"
    },
    "email": {
      "type": [
        "string",
        "null"
      ],
      "description": "Primary email address"
    },
    "jobTitle": {
      "type": [
        "string",
        "null"
      ],
      "description": "Job title"
    },
    "locationId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The location's unique identifier (derived from location)",
      "readOnly": true
    },
    "location": {
      "type": [
        "string",
        "null"
      ],
      "description": "A description of the user's location. A matching location is found or created when set."
    },
    "locationCountryCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user's country (derived from location)",
      "readOnly": true
    },
    "locationTimezone": {
      "type": [
        "string",
        "null"
      ],
      "description": "The IANA time zone name of the user's location, e.g. `America/New_York` (derived from location)",
      "readOnly": true
    },
    "costCenterId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ID of the cost center (derived from costCenter)",
      "readOnly": true
    },
    "costCenter": {
      "type": [
        "string",
        "null"
      ],
      "description": "Cost center. A matching cost center is found or created when set."
    },
    "organizationalUnit": {
      "type": [
        "string",
        "null"
      ],
      "description": "The organizational unit, sourced from directory integrations (e.g. Google Workspace, Active Directory).",
      "readOnly": true
    },
    "loginName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The person's login name on the local domain. Used in conjunction with the SaaS Manager Browser Extension Helper to determine the identity of the logged in user."
    },
    "timezone": {
      "type": [
        "string",
        "null"
      ],
      "description": "The person's IANA time zone name, e.g. `America/New_York`"
    },
    "employeeId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Employee ID"
    },
    "phoneNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "Phone number",
      "readOnly": true
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/PersonStatus"
        }
      ],
      "description": "Status (new, terminated, etc)",
      "readOnly": true
    },
    "personalAddress": {
      "allOf": [
        {
          "$ref": "#/$defs/AddressDetails"
        }
      ],
      "description": "Home address",
      "readOnly": true
    },
    "lineManager": {
      "allOf": [
        {
          "$ref": "#/$defs/PersonInfo"
        }
      ],
      "description": "The person's line manager. On input, set it by the line manager's id or email (other fields are ignored); alternatively use lineManagerId or lineManagerEmail. These three forms are mutually exclusive."
    },
    "teams": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Team"
      },
      "description": "The teams the person belongs to. When creating or replacing, supply teams by ID, or by name (a team is created if the name is not found); mutually exclusive with teamIds."
    },
    "customFields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "$ref": "#/$defs/PersonCustomFieldValue"
      },
      "description": "Custom field values",
      "readOnly": true
    },
    "startDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) Date that the person joined the organization. Passing null clears the date.",
      "format": "date-time"
    },
    "leavingDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) Date that the person left the organization or is due to lave. Passing null clears the date.",
      "format": "date-time"
    },
    "createdBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that created the person record",
      "readOnly": true
    },
    "createdDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the person record was created",
      "format": "date-time",
      "readOnly": true
    },
    "lastModifiedBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that last modified the person record",
      "readOnly": true
    },
    "lastModifiedDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the person record was last modified",
      "format": "date-time",
      "readOnly": true
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AddressDetails": {
      "type": "object",
      "properties": {
        "streetAddress1": {
          "type": [
            "string",
            "null"
          ]
        },
        "streetAddress2": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "stateOrProvince": {
          "type": [
            "string",
            "null"
          ]
        },
        "zipOrPostalCode": {
          "type": [
            "string",
            "null"
          ]
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PersonCustomFieldValue": {
      "type": "object",
      "properties": {
        "numberValue": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "optionValue": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        },
        "textValue": {
          "type": [
            "string",
            "null"
          ]
        },
        "dateValue": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "linkValue": {
          "allOf": [
            {
              "$ref": "#/$defs/PersonLinkValue"
            }
          ]
        },
        "personValue": {
          "allOf": [
            {
              "$ref": "#/$defs/PersonPersonValue"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "PersonInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "personType": {
          "allOf": [
            {
              "$ref": "#/$defs/PersonValueType"
            }
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PersonLinkValue": {
      "type": "object",
      "properties": {
        "href": {
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PersonPersonValue": {
      "type": "object",
      "properties": {
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "personType": {
          "allOf": [
            {
              "$ref": "#/$defs/PersonValueType"
            }
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    },
    "PersonStatus": {
      "enum": [
        "New",
        "Terminated",
        "Active",
        "Unknown"
      ],
      "type": "string"
    },
    "PersonType": {
      "enum": [
        "Employee",
        "Contractor",
        "ServiceAccount",
        "External"
      ],
      "type": "string"
    },
    "PersonValueType": {
      "enum": [
        "Contact",
        "User"
      ],
      "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"
    },
    "UserInfo": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}