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.
| Type | Query |
| Auth | Protected |
team.createWorkspace
Create a new workspace.
| Type | Mutation |
| Auth | Protected |
Input:
{
name: string;
}team.ensureDefaultWorkspace
Get or create the user's default workspace.
| Type | Query |
| Auth | Protected |
Team members
team.list
List all members of the current workspace.
| Type | Query |
| Auth | Protected |
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.
| Type | Mutation |
| Auth | Protected |
Input:
{
email: string;
role: "admin" | "member" | "viewer";
}team.changeRole
Change a team member's role.
| Type | Mutation |
| Auth | Protected |
Input:
{
id: string;
role: "admin" | "member" | "viewer";
}team.remove
Remove a member from the workspace.
| Type | Mutation |
| Auth | Protected |
Input: { id: string }
team.revoke
Revoke a pending invitation.
| Type | Mutation |
| Auth | Protected |
Input: { id: string }
Roles & permissions
| Role | Projects | Comparisons | Team | Settings |
|---|---|---|---|---|
| Owner | Full | Full | Full | Full |
| Admin | Full | Full | Invite/Remove | Full |
| Member | Read/Write | Full | Read | Read |
| Viewer | Read | Read | Read | Read |