Workspaces and members
Workspaces
Section titled “Workspaces”| Method | Path | Does |
|---|---|---|
GET |
/api/workspaces/ |
Your workspaces (a token sees only its own) |
POST |
/api/workspaces/ |
Create: { "name": "…", "slug": "…" } |
GET |
/api/workspaces/{id} |
Read one, with your role |
PATCH |
/api/workspaces/{id} |
Rename: { "name": "…" } — owner or admin |
DELETE |
/api/workspaces/{id} |
Delete with everything in it — owner only |
Creating needs a signed-in member; a token can’t. slug is optional and derived from the
name when omitted.
Members
Section titled “Members”Paths are relative to /api/workspaces/{workspaceId}.
| Method | Path | Does |
|---|---|---|
GET |
/members/ |
List members |
POST |
/members/ |
Add an existing account: { "email", "role" } |
PATCH |
/members/{userId} |
Change role: { "role": "admin" } |
DELETE |
/members/{userId} |
Remove |
Roles are owner, admin and member. Changing membership needs a signed-in owner or
admin.
Invitations
Section titled “Invitations”| Method | Path | Does |
|---|---|---|
GET |
/invitations/ |
Pending invitations to this workspace |
POST |
/invitations/ |
Invite: { "email": "…", "role": "member" } |
DELETE |
/invitations/{invitationId} |
Revoke |
Inviting emails a link valid for 14 days. Only an owner can invite another owner;
inviting someone who is already a member returns 409.
Invitations addressed to you, across workspaces, are at GET /api/invitations/; accept
one with POST /api/invitations/{invitationId}/accept, or decline it with
DELETE /api/invitations/{invitationId}.