{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whoisgeni-us/json-schema/whoisgeni-us-api-response-byokkey-list-response-schema.json",
  "title": "ApiResponse[BYOKKeyListResponse]",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whoisgeni-us-byok-api-openapi.yml#/components/schemas/ApiResponse_BYOKKeyListResponse_",
  "properties": {
    "data": {
      "anyOf": [
        {
          "$ref": "#/$defs/BYOKKeyListResponse"
        },
        {
          "type": "null"
        }
      ]
    },
    "error": {
      "anyOf": [
        {
          "$ref": "#/$defs/ErrorDetail"
        },
        {
          "type": "null"
        }
      ]
    },
    "meta": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Meta"
    }
  },
  "type": "object",
  "$defs": {
    "BYOKKeyListResponse": {
      "properties": {
        "keys": {
          "items": {
            "$ref": "#/$defs/BYOKKeyResponse"
          },
          "type": "array",
          "title": "Keys"
        }
      },
      "type": "object",
      "required": [
        "keys"
      ],
      "title": "BYOKKeyListResponse",
      "description": "Response body listing all BYOK keys for a user."
    },
    "BYOKKeyResponse": {
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "title": "Id"
        },
        "provider": {
          "type": "string",
          "title": "Provider"
        },
        "key_prefix": {
          "type": "string",
          "title": "Key Prefix"
        },
        "is_active": {
          "type": "boolean",
          "title": "Is Active"
        },
        "last_used_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Used At"
        },
        "last_validated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Validated At"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "title": "Updated At"
        }
      },
      "type": "object",
      "required": [
        "id",
        "provider",
        "key_prefix",
        "is_active",
        "created_at",
        "updated_at"
      ],
      "title": "BYOKKeyResponse",
      "description": "Response body for a single BYOK key. Never includes the raw or encrypted key."
    },
    "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."
    }
  }
}