> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mossdesk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# workspace

> Manage workspaces, switch context, and handle team invites.

Workspaces are your team's home in MossDesk. Each workspace has its own contacts, deals, and settings. Use these commands to switch between workspaces, manage members, and send invites.

## moss workspace list

List all workspaces you belong to.

```bash theme={null}
moss workspace list
```

## moss workspace switch

Switch the active workspace.

```bash theme={null}
moss workspace switch --id ws_abc123
```

| Option      | Required | Description               |
| ----------- | -------- | ------------------------- |
| `--id <id>` | Yes      | Workspace ID to switch to |

***

## Member Commands

### moss workspace member list

List members of the current workspace.

```bash theme={null}
moss workspace member list
```

### moss workspace member remove

Remove a member from the workspace. Requires owner role.

```bash theme={null}
moss workspace member remove --id usr_abc123 --confirm
```

| Option      | Required | Description                                           |
| ----------- | -------- | ----------------------------------------------------- |
| `--id <id>` | Yes      | User ID of the member to remove                       |
| `--confirm` | Yes      | Confirm removal (required for destructive operations) |

<Warning>
  Removing a member revokes their access to this workspace immediately.
</Warning>

***

## Invite Commands

### moss workspace invite list

List pending invitations for the current workspace.

```bash theme={null}
moss workspace invite list
```

### moss workspace invite create

Invite a new member to the workspace. Requires owner role.

```bash theme={null}
moss workspace invite create --email "bob@acme.com" --role member
```

| Option            | Required | Description                         |
| ----------------- | -------- | ----------------------------------- |
| `--email <email>` | Yes      | Email address to invite             |
| `--role <role>`   | No       | Role: `member` (default) or `owner` |

### moss workspace invite revoke

Revoke a pending invitation. Requires owner role.

```bash theme={null}
moss workspace invite revoke --id inv_abc123 --confirm
```

| Option      | Required | Description                                              |
| ----------- | -------- | -------------------------------------------------------- |
| `--id <id>` | Yes      | Invite ID                                                |
| `--confirm` | Yes      | Confirm revocation (required for destructive operations) |

### moss workspace invite accept

Accept a workspace invitation.

```bash theme={null}
moss workspace invite accept --token <invite-token>
```

| Option            | Required | Description  |
| ----------------- | -------- | ------------ |
| `--token <token>` | Yes      | Invite token |
