{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rumoro-dev/json-schema/rumoro-dev-whoami-schema.json",
  "title": "Whoami",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rumoro-dev-auth-api-openapi.yml#/components/schemas/Whoami",
  "type": "object",
  "properties": {
    "workspace": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The workspace's id (org_...)."
        },
        "name": {
          "type": "string",
          "description": "The workspace's name as shown in the dashboard."
        }
      },
      "required": [
        "id",
        "name"
      ],
      "description": "The workspace this credential works in."
    },
    "auth": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "api_key",
            "oauth",
            "session"
          ],
          "description": "Which credential was used. API key, MCP sign-in token or dashboard session."
        },
        "scope": {
          "type": "string",
          "enum": [
            "read",
            "write"
          ],
          "description": "write can do everything. read is limited to GET."
        },
        "apiKeyId": {
          "type": [
            "string",
            "null"
          ],
          "description": "The API key's id (key_...). Null for other credentials."
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "Expiry of the API key. Null for non-expiring keys, OAuth tokens and sessions."
        }
      },
      "required": [
        "kind",
        "scope",
        "apiKeyId",
        "expiresAt"
      ],
      "description": "Details of the credential used."
    },
    "user": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The user's id. Use it for assigneeId and ownerId."
        },
        "email": {
          "type": "string",
          "description": "The user's email address."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The user's name. Null if they have not set one."
        }
      },
      "required": [
        "id",
        "email",
        "name"
      ],
      "description": "The user who signed in, for an OAuth token or a session. Null for an API key, since a key is not tied to a user."
    }
  },
  "required": [
    "workspace",
    "auth",
    "user"
  ]
}