UI Inspect
API Reference

Team & Workspaces

API endpoints for workspace management, team invitations, and role-based access.

Workspaces

team.listWorkspaces

List all workspaces the user belongs to.

TypeQuery
AuthProtected

team.createWorkspace

Create a new workspace.

TypeMutation
AuthProtected

Input:

{
  name: string;
}

team.ensureDefaultWorkspace

Get or create the user's default workspace.

TypeQuery
AuthProtected

Team members

team.list

List all members of the current workspace.

TypeQuery
AuthProtected

Response:

Array<{
  id: string;
  email: string;
  name: string | null;
  role: "owner" | "admin" | "member" | "viewer";
  status: "active" | "pending";
  joinedAt: string;
}>;

team.invite

Invite a new member to the workspace.

TypeMutation
AuthProtected

Input:

{
  email: string;
  role: "admin" | "member" | "viewer";
}

team.changeRole

Change a team member's role.

TypeMutation
AuthProtected

Input:

{
  id: string;
  role: "admin" | "member" | "viewer";
}

team.remove

Remove a member from the workspace.

TypeMutation
AuthProtected

Input: { id: string }


team.revoke

Revoke a pending invitation.

TypeMutation
AuthProtected

Input: { id: string }


Roles & permissions

RoleProjectsComparisonsTeamSettings
OwnerFullFullFullFull
AdminFullFullInvite/RemoveFull
MemberRead/WriteFullReadRead
ViewerReadReadReadRead

On this page