Members
List workspace members, invite by email, and remove members.
A member row links a user (or a pending email) to a workspace with a role and status. Statuses are active, invited (pending signup), and removed (soft-deleted).
List members
/io/workspaces/:id/membersReturns the workspace plus its members, ordered by created_at ascending. Soft-removed members (status: "removed") are excluded. Requires member access or higher.
Path parameters
idstringpathrequiredThe workspace UUID.
{
"data": {
"workspace": {
"id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
"name": "Acme Agency",
"slug": "acme-agency-k3n8xq",
"owner_id": "usr-owner-uuid",
"created_at": "2026-07-01T10:00:00Z",
"updated_at": "2026-07-01T10:00:00Z"
},
"members": [
{
"id": "m1a2b3c4-0000-4aaa-8bbb-ccccdddd0001",
"workspace_id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
"user_id": "usr-owner-uuid",
"invited_email": null,
"role": "owner",
"status": "active",
"invited_by": null,
"created_at": "2026-07-01T10:00:00Z"
},
{
"id": "m1a2b3c4-0000-4aaa-8bbb-ccccdddd0002",
"workspace_id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
"user_id": null,
"invited_email": "teammate@example.com",
"role": "member",
"status": "invited",
"invited_by": "usr-owner-uuid",
"created_at": "2026-07-02T08:00:00Z"
}
]
}
}Invite / add a member
/io/workspaces/:id/membersAdds a member by email. Requires admin access or higher.
- If a Supabase user already exists for the email, they are attached (upserted on
workspace_id, user_id) withstatus: "active". - Otherwise a pending invite is created with
user_id: null,invited_emailset, andstatus: "invited".
Path parameters
idstringpathrequiredThe workspace UUID.
Request body
emailstringbodyrequiredEmail of the person to invite. Normalized to lowercase; must be a valid address.
rolestringbodymember (default) or admin. The owner role cannot be assigned via invite — any other value falls back to member.
{ "email": "teammate@example.com", "role": "admin" }{
"data": {
"id": "m1a2b3c4-0000-4aaa-8bbb-ccccdddd0002",
"workspace_id": "6f1e9c2a-1b3d-4c5e-8f90-a1b2c3d4e5f6",
"user_id": null,
"invited_email": "teammate@example.com",
"role": "admin",
"status": "invited",
"invited_by": "usr-owner-uuid",
"created_at": "2026-07-02T08:00:00Z"
}
}Remove a member
/io/workspaces/:id/membersSoft-removes a member by setting status: "removed". Requires admin access or higher. The workspace owner cannot be removed.
Path parameters
idstringpathrequiredThe workspace UUID.
Query parameters
memberIdstringqueryrequiredThe membership row UUID to remove.
{ "success": true }Error cases
| Code | Error |
|---|---|
| 400 | Invalid workspace id |
| 400 | A valid email is required (POST) |
| 400 | A valid memberId is required (DELETE) |
| 400 | The workspace owner cannot be removed (DELETE) |
| 401 | Unauthorized |
| 403 | You do not have access to this workspace |
| 403 | Insufficient role for this action |
| 404 | Workspace not found |
| 404 | Member not found (DELETE) |