{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tracetail-io/json-schema/tracetail-io-server-identification-schema.json",
  "title": "ServerIdentification",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tracetail-io-openapi.json#/components/schemas/ServerIdentification",
  "type": "object",
  "required": [
    "visitorId",
    "requestId",
    "domain",
    "endpoint",
    "createdAt",
    "ipAddress",
    "userAgent",
    "browser",
    "os",
    "confidence",
    "riskScore",
    "quality",
    "verification",
    "isBot"
  ],
  "properties": {
    "visitorId": {
      "type": "string",
      "pattern": "^(?:fp3_|(?:free_)?fp2_)[0-9a-f]{16}$",
      "description": "`fp3_` followed by 16 hex characters, computed by the TraceTail SDK (IDs from 2.x SDKs start with `fp2_`)."
    },
    "requestId": {
      "type": "string",
      "format": "uuid",
      "description": "The ID of one registered identification."
    },
    "domain": {
      "type": "string",
      "description": "The page host the identification came from."
    },
    "endpoint": {
      "type": "string",
      "enum": [
        "/api/id",
        "/api/id/detail"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "ipAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "userAgent": {
      "type": [
        "string",
        "null"
      ]
    },
    "browser": {
      "type": [
        "string",
        "null"
      ],
      "description": "From the visitor's latest record."
    },
    "os": {
      "type": [
        "string",
        "null"
      ],
      "description": "From the visitor's latest record."
    },
    "confidence": {
      "type": [
        "number",
        "null"
      ],
      "description": "This request’s signal completeness. Null for historical events without an assessment."
    },
    "riskScore": {
      "type": [
        "number",
        "null"
      ],
      "description": "This request’s risk assessment. Null for historical events without an assessment."
    },
    "quality": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "score",
            "reasons"
          ],
          "description": "Signal completeness, not match probability or physical-device uniqueness.",
          "properties": {
            "score": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "reasons": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "verification": {
      "type": "string",
      "enum": [
        "consistent",
        "unverified"
      ],
      "description": "consistent means the server recomputed the ID from the signals. It does not authenticate a device. Legacy requests are unverified."
    },
    "isBot": {
      "type": [
        "boolean",
        "null"
      ]
    }
  }
}