{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bellatorsi-com/json-schema/bellatorsi-com-apikey-response-schema.json",
  "title": "APIKeyResponse",
  "description": "API key response.\n\nSECURITY: Full key is only returned once on creation.\nSubsequent requests show only the prefix (first 16 chars).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bellatorsi-com-authentication-api-openapi.yml#/components/schemas/APIKeyResponse",
  "properties": {
    "key_id": {
      "type": "string",
      "format": "uuid",
      "title": "Key Id"
    },
    "key_prefix": {
      "type": "string",
      "title": "Key Prefix",
      "description": "First 16 chars of key (for identification)"
    },
    "full_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Full Key",
      "description": "Full API key - ONLY returned on creation, store securely!"
    },
    "tier": {
      "$ref": "#/$defs/APITier"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Used At"
    },
    "total_requests": {
      "type": "integer",
      "title": "Total Requests"
    }
  },
  "type": "object",
  "required": [
    "key_id",
    "key_prefix",
    "tier",
    "status",
    "created_at",
    "last_used_at",
    "total_requests"
  ],
  "$defs": {
    "APITier": {
      "type": "string",
      "enum": [
        "demo",
        "free",
        "starter",
        "professional",
        "enterprise",
        "government"
      ],
      "title": "APITier",
      "description": "API access tiers with associated limits."
    }
  }
}