{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audivo-dev/json-schema/audivo-dev-api-keys-list-response-schema.json",
  "title": "ApiKeysListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audivo-dev-api-keys-api-openapi.yml#/components/schemas/ApiKeysListResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "maxItems": 200,
      "items": {
        "$ref": "#/$defs/ApiKeySummary"
      }
    }
  },
  "$defs": {
    "ApiKeyMode": {
      "type": "string",
      "enum": [
        "live",
        "test"
      ]
    },
    "ApiKeyPrefix": {
      "type": "string",
      "enum": [
        "hk_live_",
        "hk_test_"
      ]
    },
    "ApiKeySummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "key_id",
        "label",
        "prefix",
        "mode",
        "created_at",
        "revoked"
      ],
      "description": "Key metadata only; never returns stored plaintext.",
      "properties": {
        "key_id": {
          "$ref": "#/$defs/KeyId"
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100
        },
        "prefix": {
          "$ref": "#/$defs/ApiKeyPrefix"
        },
        "mode": {
          "$ref": "#/$defs/ApiKeyMode"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "last_used_at": {
          "$ref": "#/$defs/NullableDateTime"
        },
        "revoked": {
          "type": "boolean"
        },
        "revoked_at": {
          "$ref": "#/$defs/NullableDateTime"
        }
      }
    },
    "KeyId": {
      "type": "string",
      "pattern": "^key_[A-Za-z0-9]{16,32}$",
      "maxLength": 40,
      "description": "Opaque, server-generated API key identifier."
    },
    "NullableDateTime": {
      "description": "An ISO 8601 timestamp, or `null`.",
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "enum": [
            null
          ]
        }
      ]
    }
  }
}