Members
Manage the team members of a workspace. For adding new members, see Invites.
GET /workspaces/:wsId/members
List all members and pending invites for the workspace.
Role: viewer+
curl https://nobsredir.com/api/workspaces/ws_abc123/members \ -H "X-API-Key: nobs_your_key"Response 200:
{ "members": [ { "id": "usr_abc123", "email": "owner@example.com", "name": "Jane Owner", "role": "owner", "joined_at": "2025-01-15T10:00:00.000Z" }, { "id": "usr_def456", "email": "editor@example.com", "name": "Bob Editor", "role": "editor", "joined_at": "2025-01-18T09:00:00.000Z" } ], "pendingInvites": [ { "email": "new@example.com", "role": "viewer", "createdAt": "2025-01-20T14:00:00.000Z" } ]}PATCH /workspaces/:wsId/members/:userId
Change a member’s role.
Role: admin+
curl -X PATCH https://nobsredir.com/api/workspaces/ws_abc123/members/usr_def456 \ -H "X-API-Key: nobs_your_key" \ -H "Content-Type: application/json" \ -d '{"role": "admin"}'Body:
| Field | Type | Required | Description |
|---|---|---|---|
role | string | yes | New role: owner, admin, editor, or viewer |
Rules:
- Cannot change your own role
- Cannot promote someone above your own role
- Cannot change the role of someone with equal or higher rank (unless you are the owner)
Response 200:
{"ok": true}The member receives an email notification about the role change.
Errors:
400- Invalid role, or trying to change own role403- Cannot promote above own role, or target has equal/higher rank404- Member not found
DELETE /workspaces/:wsId/members/:userId
Remove a member from the workspace.
Role: admin+
curl -X DELETE https://nobsredir.com/api/workspaces/ws_abc123/members/usr_def456 \ -H "X-API-Key: nobs_your_key"Rules:
- Cannot remove yourself
- Cannot remove the last owner
Response 200:
{"ok": true}The removed member receives an email notification.
Errors:
400- Cannot remove yourself, or cannot remove the last owner404- Member not found