{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-issued-certificate-schema.json",
  "title": "IssuedCertificate",
  "description": "A leaf certificate issued under a role.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-pki-api-openapi.yml#/components/schemas/IssuedCertificate",
  "type": "object",
  "properties": {
    "serial_hex": {
      "type": "string",
      "description": "The certificate serial number (hex). Use this to revoke."
    },
    "cert_pem": {
      "type": "string",
      "description": "The leaf certificate (PEM)."
    },
    "private_key_pem": {
      "type": "string",
      "description": "The certificate's private key (PEM). **Returned exactly once and never stored by KnoxCall.**"
    },
    "ca_chain_pem": {
      "type": "string",
      "description": "The issuing chain (intermediate + root, PEM)."
    },
    "not_before": {
      "type": "string",
      "format": "date-time"
    },
    "not_after": {
      "type": "string",
      "format": "date-time"
    }
  }
}