{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/1password/json-schema/1password-device-schema.json",
  "title": "Device",
  "description": "An asset (device)",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/1password-devices-api-openapi.yml#/components/schemas/Device",
  "type": "object",
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "The asset's SaaS Manager ID. Supply to replace an existing asset."
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The asset's external ID, sourced from the integration that imported it.",
      "readOnly": true
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device's status. This is the status's reference ID; custom statuses are prefixed `user_`. Defaults to New on creation."
    },
    "statusType": {
      "enum": [
        "New",
        "ReadyToDeploy",
        "Deployed",
        "OutForRepair",
        "Retired"
      ],
      "type": [
        "string",
        "null"
      ],
      "description": "The base status the device's status maps to. Custom statuses always map to one of these.",
      "readOnly": true
    },
    "hardwareVendor": {
      "type": [
        "string",
        "null"
      ],
      "description": "The hardware vendor (manufacturer). Required when creating an asset."
    },
    "modelName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The model name. Required when creating an asset."
    },
    "assetType": {
      "type": [
        "string",
        "null"
      ],
      "description": "The asset type, e.g. Laptop"
    },
    "serialNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "The serial number"
    },
    "description": {
      "type": [
        "string",
        "null"
      ],
      "description": "A description of the asset, sourced from integrations.",
      "readOnly": true
    },
    "deviceName": {
      "type": [
        "string",
        "null"
      ],
      "description": "The device name, sourced from integrations.",
      "readOnly": true
    },
    "assetTag": {
      "type": [
        "string",
        "null"
      ],
      "description": "The asset tag"
    },
    "purchasedDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The purchase date",
      "format": "date-time"
    },
    "disposalDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The disposal date",
      "format": "date-time"
    },
    "warrantyExpirationDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The warranty expiration date",
      "format": "date-time"
    },
    "lifespanExpirationDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The end of the asset's useful life",
      "format": "date-time"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Notes about the asset"
    },
    "assignedTo": {
      "allOf": [
        {
          "$ref": "#/$defs/DeviceAssignee"
        }
      ],
      "description": "The person the asset is assigned to. To set the assignee, use assignedToEmail.",
      "readOnly": true
    },
    "assignedToEmail": {
      "type": [
        "string",
        "null"
      ],
      "description": "Assign the asset to a person by email address. Pass null to unassign."
    },
    "netPrice": {
      "type": [
        "number",
        "null"
      ],
      "description": "The net price, in the currency given by netPriceCurrency",
      "format": "double"
    },
    "netPriceCurrency": {
      "type": [
        "string",
        "null"
      ],
      "description": "The ISO currency code for netPrice. Defaults to your base currency."
    },
    "enrolledDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "(ISO format) The date the asset was enrolled",
      "format": "date-time"
    },
    "lastSyncDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp of the asset's last sync from an integration.",
      "format": "date-time",
      "readOnly": true
    },
    "platform": {
      "allOf": [
        {
          "$ref": "#/$defs/DevicePlatform"
        }
      ],
      "description": "The asset's operating system platform"
    },
    "osVersion": {
      "type": [
        "string",
        "null"
      ],
      "description": "The operating system version"
    },
    "isEncrypted": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the asset's storage is encrypted"
    },
    "customFields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {},
      "description": "Custom field values, keyed by the field's lookup key. Each value is the field's value directly: a string (text/single-select), a number, an ISO-8601 date, an array of strings (multi-select), or a link object ({ href, description })."
    },
    "createdBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that created the asset record",
      "readOnly": true
    },
    "createdDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the asset record was created",
      "format": "date-time",
      "readOnly": true
    },
    "lastModifiedBy": {
      "allOf": [
        {
          "$ref": "#/$defs/UserInfo"
        }
      ],
      "description": "The user that last modified the asset record",
      "readOnly": true
    },
    "lastModifiedDtm": {
      "type": [
        "string",
        "null"
      ],
      "description": "The timestamp for when the asset record was last modified",
      "format": "date-time",
      "readOnly": true
    },
    "location": {
      "allOf": [
        {
          "$ref": "#/$defs/DeviceLocation"
        }
      ],
      "description": "The asset's location. To set the location, use locationName.",
      "readOnly": true
    },
    "locationName": {
      "type": [
        "string",
        "null"
      ],
      "description": "Assign the asset to a location by name (a location is found or created). Pass null to clear."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DeviceAssignee": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The assignee's SaaS Manager person ID"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The assignee's name"
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "The assignee's email address"
        }
      },
      "additionalProperties": false,
      "description": "The person an asset is assigned to"
    },
    "DeviceLocation": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The location's unique ID"
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The location's name"
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ],
          "description": "The location's ISO country code"
        }
      },
      "additionalProperties": false,
      "description": "A real world location"
    },
    "DevicePlatform": {
      "enum": [
        "Mac",
        "Windows",
        "iOS",
        "Android",
        "ChromeOS",
        "Linux"
      ],
      "type": "string"
    },
    "UserInfo": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}