{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roark/json-schema/roark-me-api-key-list-response-schema.json",
  "title": "MeApiKeyListResponse",
  "description": "The credentials that act as the caller",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roark-me-api-openapi.yml#/components/schemas/MeApiKeyListResponse",
  "type": "object",
  "properties": {
    "apiKeys": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MeApiKey"
      }
    }
  },
  "required": [
    "apiKeys"
  ],
  "$defs": {
    "MeApiKey": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Roark ID of the credential. Pass it to DELETE to revoke."
        },
        "name": {
          "type": "string",
          "description": "The label chosen when it was created"
        },
        "createdAt": {
          "type": "string",
          "description": "ISO 8601 timestamp"
        },
        "lastUsedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO 8601 timestamp, null if never used"
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "ISO 8601 timestamp, null if it never expires"
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "ACTIVE",
            "REVOKED"
          ]
        },
        "organizationId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The organization this credential is pinned to"
        },
        "defaultProjectId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The project a request acts on when it sends no X-Roark-Project-Id header. Null once that project is deleted."
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Coarse tier: READ, or WRITE for read and write"
        },
        "permissions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Granted 'resource:action' permissions"
        }
      },
      "required": [
        "id",
        "name",
        "createdAt",
        "lastUsedAt",
        "expiresAt",
        "status",
        "organizationId",
        "defaultProjectId",
        "scopes",
        "permissions"
      ],
      "description": "A credential that acts as the caller"
    }
  }
}