{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/linkbreakers-com/json-schema/linkbreakers-com-switch-workspace-response-schema.json",
  "title": "SwitchWorkspaceResponse",
  "description": "SwitchWorkspaceResponse carries the session for the workspace switched to.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/linkbreakers-com-members-api-openapi.yml#/components/schemas/SwitchWorkspaceResponse",
  "properties": {
    "accessToken": {
      "description": "Access token for the new workspace. The previous token keeps working for\nits own workspace until it is signed out.",
      "type": "string"
    },
    "member": {
      "$ref": "#/$defs/Member",
      "title": "The member record in the new workspace, with access_token set"
    },
    "memberId": {
      "title": "The person's member record in the new workspace (UUID)",
      "type": "string"
    },
    "workspaceId": {
      "title": "The workspace switched to (UUID)",
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "Member": {
      "description": "Describes a teammate invited into a workspace, including their role, login metadata, and last-known activity\nso Linkbreakers can enforce access policies and audit collaboration.",
      "properties": {
        "accessRevokedAt": {
          "format": "date-time",
          "title": "When the member's access was revoked (null means active)",
          "type": "string"
        },
        "accessToken": {
          "title": "Access token issued during sign-in; returned to clients but not persisted on the member record",
          "type": "string"
        },
        "createdAt": {
          "format": "date-time",
          "title": "Timestamp when the member was created",
          "type": "string"
        },
        "displayLanguage": {
          "title": "Preferred language for emails and product copy (BCP-47)",
          "type": "string"
        },
        "email": {
          "title": "Email address used as the member's login identifier",
          "type": "string"
        },
        "emailVerifiedAt": {
          "format": "date-time",
          "title": "When the member confirmed ownership of their email address (null means unverified)",
          "type": "string"
        },
        "firstName": {
          "title": "Member's given name used in UI surfaces and emails",
          "type": "string"
        },
        "id": {
          "title": "Unique identifier for the member record (UUID)",
          "type": "string"
        },
        "lastKnownCountry": {
          "title": "Country inferred from geolocation during the most recent sign-in (ISO 3166-1 alpha-2)",
          "type": "string"
        },
        "lastKnownIp": {
          "title": "IP address seen on the most recent sign-in",
          "type": "string"
        },
        "lastKnownLanguage": {
          "title": "Browser language header captured during the most recent sign-in",
          "type": "string"
        },
        "lastKnownTimezone": {
          "title": "Timezone reported during the most recent sign-in (IANA TZ database)",
          "type": "string"
        },
        "lastName": {
          "title": "Member's family name used in UI surfaces and emails",
          "type": "string"
        },
        "lastSigninAt": {
          "format": "date-time",
          "title": "Last time the member successfully authenticated",
          "type": "string"
        },
        "role": {
          "description": "Role enumerates the built-in permission tiers that control what teammates can manage inside a workspace.\n\n - ROLE_UNSPECIFIED: Role not specified (defaults to viewer permissions)",
          "enum": [
            "ROLE_UNSPECIFIED",
            "ROLE_VIEWER",
            "ROLE_ADMIN",
            "ROLE_TECH"
          ],
          "title": "Workspace role that controls product permissions"
        },
        "updatedAt": {
          "format": "date-time",
          "title": "Timestamp when member metadata was last updated",
          "type": "string"
        },
        "workspaceId": {
          "title": "Workspace the member belongs to (UUID)",
          "type": "string"
        }
      },
      "title": "Member",
      "type": "object"
    }
  }
}