{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/writerslogic-com/json-schema/writerslogic-com-enroll-request-schema.json",
  "title": "EnrollRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-writerslogic-openapi.json#/components/schemas/EnrollRequest",
  "type": "object",
  "required": [
    "deviceId",
    "publicKey",
    "platform",
    "attestationType",
    "proofDeviceId"
  ],
  "properties": {
    "deviceId": {
      "type": "string",
      "pattern": "^[a-f0-9]{32}$",
      "description": "SHA-256(publicKey), first 16 bytes, lowercase hex"
    },
    "publicKey": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$|^[a-f0-9]{130}$"
    },
    "platform": {
      "type": "string",
      "enum": [
        "macos",
        "windows",
        "linux"
      ]
    },
    "attestationType": {
      "type": "string",
      "enum": [
        "secure_enclave",
        "tpm",
        "software"
      ]
    },
    "attestationCertificate": {
      "type": "string",
      "maxLength": 8192
    },
    "attestationData": {
      "type": "string",
      "maxLength": 8192
    },
    "proofDeviceId": {
      "type": "string",
      "pattern": "^[a-f0-9]{128}$",
      "description": "Ed25519 signature over DST(\"witnessd-enroll-v1\") || deviceId bytes, proving possession of the private key being enrolled"
    },
    "requestCertificate": {
      "type": "boolean"
    }
  }
}