Members & Roles
Managing team members, invites, and roles within your Cosmo organization.
Manage who has access to your organization and what they can do. Cosmo supports role-based access control (RBAC) at the organization level, powered by Clerk's B2B Organizations.
Creating an Organization
After signing up, you'll be prompted to create your first organization. This is required before you can start using Cosmo. Enter a name for your team workspace and you're in — zero to value in under 5 minutes.
If you're invited by a teammate, you'll automatically join their organization after accepting the invite.
Switching Organizations
If you belong to multiple organizations, use the Organization Switcher at the bottom of the sidebar to switch between them. Your chat sessions and workspaces are scoped to each organization, so switching orgs will load that org's data.
Roles
Cosmo uses Clerk's built-in organization roles. On the free plan, two roles are available:
| Role | Clerk Role | Description |
|---|---|---|
| Owner | org:admin | Full access. Can manage billing, invite/remove members, manage integrations, and configure org settings. The org creator automatically gets this role. |
| Member | org:member | Can create workspaces, use chat, and access shared artifacts. Default role for invited members. |
The database schema also supports Admin and Viewer roles for future use when Clerk custom roles are enabled.
Inviting Teammates
Owners and Admins can invite new members:
- Click Settings in the sidebar
- Navigate to the Members tab
- Enter the teammate's email address and select a role
- Click Invite
The invited person will receive an email with a link to join your organization. Pending invitations can be viewed and revoked from the same settings panel.
Managing Members
From the organization settings modal:
- Change a member's role — Click on their current role to update it (Owner only)
- Remove a member — Owners and Admins can remove members from the organization
API Access (CLI)
The server exposes org management endpoints for CLI and programmatic access:
| Method | Endpoint | Auth Required | Description |
|---|---|---|---|
GET | /org/members | Any member | List all org members |
POST | /org/invite | Owner / Admin | Invite by email |
GET | /org/invites | Owner / Admin | List pending invites |
DELETE | /org/invite/:id | Owner / Admin | Revoke a pending invite |
PATCH | /org/members/:userId/role | Owner | Update a member's role |
DELETE | /org/members/:userId | Owner / Admin | Remove a member |
All endpoints require a valid Bearer token (Cosmo JWT or Clerk session token) and are scoped to the authenticated user's active organization.