{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flashdata-dev/json-schema/flashdata-dev-apikey-identity-schema.json",
  "title": "APIKeyIdentity",
  "description": "Authoritative current-record ownership and readiness. Public IDs only. recurringAllowed requires a verified active owner and, for agent-issued keys, server-confirmed installation. It is a point-in-time check, not an authorization token or permission to reuse cached data after revocation.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flashdata-dev-api-keys-api-openapi.yml#/components/schemas/APIKeyIdentity",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "apiKeyId": {
      "type": "string"
    },
    "accountId": {
      "type": "string"
    },
    "accountType": {
      "type": "string",
      "enum": [
        "owned",
        "temporary"
      ]
    },
    "ownership": {
      "type": "string",
      "enum": [
        "owned",
        "unowned"
      ]
    },
    "access": {
      "type": "string",
      "enum": [
        "ready",
        "blocked"
      ]
    },
    "installed": {
      "type": "boolean"
    },
    "recurringAllowed": {
      "type": "boolean"
    },
    "connectionId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ]
    },
    "verifiedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "apiKeyId",
    "accountId",
    "accountType",
    "ownership",
    "access",
    "installed",
    "recurringAllowed",
    "connectionId",
    "scopes",
    "expiresAt",
    "verifiedAt"
  ]
}