{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/quant/main/json-schema/quant-minted-api-key-schema.json",
  "title": "MintedApiKey",
  "description": "The result of minting a key. The `apiKey` field carries the full raw key\n(`fk_<keyId>.<secret>`) and is returned ONCE — it is unrecoverable\nafterwards.\n",
  "x-generated": "2026-10-14",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quant-overledger-server-openapi.yml#/components/schemas/MintedApiKey",
  "type": "object",
  "required": [
    "apiKey",
    "keyId",
    "label",
    "scopes",
    "createdAt"
  ],
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "The full raw key — shown only once at creation."
    },
    "keyId": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "scopes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ApiKeyScope"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastUsedAt": {
      "type": "string",
      "format": "date-time"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "ApiKeyScope": {
      "type": "string",
      "description": "A capability granted to an API key. Currently only `rpc` (full JSON-RPC access).",
      "enum": [
        "rpc"
      ]
    }
  }
}