{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lumethic-com/json-schema/lumethic-com-apikey-info-schema.json",
  "title": "APIKeyInfo",
  "description": "API key metadata (without the raw key secret).",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lumethic-com-openapi.json#/components/schemas/APIKeyInfo",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id",
      "description": "Unique identifier for the API key"
    },
    "prefix": {
      "type": "string",
      "title": "Prefix",
      "description": "Key prefix for identification (e.g., 'ask_a1b2c3d4')"
    },
    "account_id": {
      "type": "string",
      "format": "uuid",
      "title": "Account Id",
      "description": "Account this key is associated with"
    },
    "user_id": {
      "type": "string",
      "format": "uuid",
      "title": "User Id",
      "description": "User who created the key"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description",
      "description": "User-provided description of the key's purpose"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "title": "Expires At",
      "description": "ISO 8601 timestamp when the key expires"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active",
      "description": "Whether the key is currently active and usable"
    },
    "last_used_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Used At",
      "description": "ISO 8601 timestamp of last successful authentication with this key"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "ISO 8601 timestamp when the key was created"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At",
      "description": "ISO 8601 timestamp when the key was last modified"
    }
  },
  "type": "object",
  "required": [
    "id",
    "prefix",
    "account_id",
    "user_id",
    "description",
    "expires_at",
    "is_active",
    "last_used_at",
    "created_at",
    "updated_at"
  ]
}