{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-inspect-result-schema.json",
  "title": "InspectResult",
  "description": "Metadata about a `kc:` ciphertext. When `encrypted` is false the value is not a valid `kc:` ciphertext and all other fields are omitted.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-encryption-api-openapi.yml#/components/schemas/InspectResult",
  "type": "object",
  "required": [
    "encrypted"
  ],
  "properties": {
    "encrypted": {
      "type": "boolean",
      "description": "Whether the value is a parseable `kc:` ciphertext."
    },
    "scheme": {
      "type": "string",
      "enum": [
        "kc"
      ],
      "description": "Ciphertext scheme identifier."
    },
    "version": {
      "type": "integer",
      "description": "Ciphertext format version."
    },
    "datatype": {
      "type": "string",
      "enum": [
        "s",
        "n",
        "b",
        "j",
        "x"
      ],
      "description": "Encoded plaintext type: `s` string, `n` number, `b` boolean, `j` JSON, `x` bytes."
    },
    "key_ref": {
      "type": "object",
      "description": "Which key (and version) produced the ciphertext.",
      "properties": {
        "tenantId": {
          "type": "string"
        },
        "appKeyId": {
          "type": "string"
        },
        "keyVersion": {
          "type": "integer"
        }
      }
    },
    "fingerprint": {
      "type": "string",
      "description": "Non-reversible SHA-256 fingerprint of the ciphertext bytes (not the plaintext), truncated to 32 hex chars. Safe to use for correlation/dedupe."
    }
  }
}