Skip to main content

Add or update a member

POST 

/api/workspaces/:id/members

Adds an active Collab user to the workspace with the given role and returns the membership. The new member gets an invitation email linking to the workspace if Collab has an address for them; a failed email does not fail the call. If the user is already a member, their role is replaced instead, no email is sent, and the response is still 201; demoting the last admin this way returns 400. userId must be an active user from GET /api/users. An unknown user returns 400 with Unknown user, and an inactive user returns 400 with User is inactive. Only workspace admins may do this; everyone else, including non-members, gets 403. Private workspaces cannot gain members (400).

Request​

Responses​

The new or updated membership.