{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whoisgeni-us/json-schema/whoisgeni-us-api-response-api-key-response-schema.json",
  "title": "ApiResponse[ApiKeyResponse]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whoisgeni-us-authentication-api-openapi.yml#/components/schemas/ApiResponse_ApiKeyResponse_",
  "properties": {
    "data": {
      "anyOf": [
        {
          "$ref": "#/$defs/ApiKeyResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/$defs/ErrorDetail"
        },
        {
          "type": "null"
        }
      ]
    },
    "meta": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Meta"
    }
  },
  "type": "object",
  "$defs": {
    "ApiKeyResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "key_prefix": {
          "type": "string",
          "title": "Key Prefix"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active"
        },
        "raw_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Raw Key"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "key_prefix",
        "created_at",
        "is_active"
      ],
      "title": "ApiKeyResponse",
      "description": "Response body for a single API key.\n\n``raw_key`` is only populated on creation (shown once, never stored)."
    },
    "ErrorDetail": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code"
        },
        "message": {
          "type": "string",
          "title": "Message"
        },
        "details": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Details"
        }
      },
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "title": "ErrorDetail",
      "description": "Structured error information for API error responses.\n\nAttributes:\n    code: Machine-readable error code (e.g. \"JOB_NOT_FOUND\").\n    message: Human-readable error description.\n    details: Optional additional context for debugging."
    }
  }
}