{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/knoxcall/json-schema/knoxcall-create-client-credential-request-schema.json",
  "title": "CreateClientCredentialRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/knoxcall-clients-api-openapi.yml#/components/schemas/CreateClientCredentialRequest",
  "type": "object",
  "required": [
    "kind",
    "data"
  ],
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "ip",
        "mtls_thumbprint"
      ],
      "description": "The credential kind. v1 supports `ip` and `mtls_thumbprint`."
    },
    "label": {
      "type": "string",
      "description": "Human-readable label."
    },
    "data": {
      "type": "object",
      "description": "Kind-specific data:\n- `ip` — `value` (IP address or CIDR) is required.\n- `mtls_thumbprint` — either `sha256_thumbprint` (register an\n  existing certificate) or `mode: issue` (mint a new one).\n",
      "properties": {
        "value": {
          "type": "string",
          "description": "IP address or CIDR range (kind: `ip`)."
        },
        "sha256_thumbprint": {
          "type": "string",
          "description": "SHA-256 hex digest of an existing client certificate, 64 hex chars (kind: `mtls_thumbprint`)."
        },
        "mode": {
          "type": "string",
          "enum": [
            "issue"
          ],
          "description": "Set to `issue` to have KnoxCall mint a client certificate (kind: `mtls_thumbprint`)."
        }
      }
    }
  }
}