{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daytona-io/json-schema/daytona-io-api-key-list-schema.json",
  "title": "ApiKeyList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daytona-io-api-keys-api-openapi.yml#/components/schemas/ApiKeyList",
  "properties": {
    "name": {
      "description": "The name of the API key",
      "type": "string"
    },
    "value": {
      "description": "The masked API key value",
      "type": "string"
    },
    "createdAt": {
      "description": "When the API key was created",
      "format": "date-time",
      "type": "string"
    },
    "permissions": {
      "description": "The list of organization resource permissions assigned to the API key",
      "items": {
        "enum": [
          "write:registries",
          "delete:registries",
          "write:snapshots",
          "delete:snapshots",
          "write:sandboxes",
          "delete:sandboxes",
          "read:volumes",
          "write:volumes",
          "delete:volumes",
          "write:regions",
          "delete:regions",
          "read:runners",
          "write:runners",
          "delete:runners",
          "read:audit_logs",
          "manage:api_keys",
          "manage:secrets",
          "read:limits",
          "manage:sso",
          "read:billing",
          "manage:billing"
        ],
        "type": "string",
        "x-enum-varnames": [
          "WRITE_REGISTRIES",
          "DELETE_REGISTRIES",
          "WRITE_SNAPSHOTS",
          "DELETE_SNAPSHOTS",
          "WRITE_SANDBOXES",
          "DELETE_SANDBOXES",
          "READ_VOLUMES",
          "WRITE_VOLUMES",
          "DELETE_VOLUMES",
          "WRITE_REGIONS",
          "DELETE_REGIONS",
          "READ_RUNNERS",
          "WRITE_RUNNERS",
          "DELETE_RUNNERS",
          "READ_AUDIT_LOGS",
          "MANAGE_API_KEYS",
          "MANAGE_SECRETS",
          "READ_LIMITS",
          "MANAGE_SSO",
          "READ_BILLING",
          "MANAGE_BILLING"
        ]
      },
      "type": "array"
    },
    "lastUsedAt": {
      "description": "When the API key was last used",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "expiresAt": {
      "description": "When the API key expires",
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "userId": {
      "description": "The user ID of the user who created the API key",
      "type": "string"
    },
    "organizationId": {
      "description": "The organization ID associated with the API key",
      "type": "string"
    }
  },
  "required": [
    "createdAt",
    "expiresAt",
    "lastUsedAt",
    "name",
    "permissions",
    "userId",
    "value"
  ],
  "type": "object"
}