POST/api/v1/add-workspace-to-user

Add an existing user to a workspace

Adds a user who already has an account to a workspace with a given role, and returns the id of the membership it created.

AccessRequires a permission in the workspaceMANAGE_WORKSPACE

Use this call when the person already exists in the platform and you are giving them access to another workspace: workspace_id is the workspace they are being added to and role_uid is the role they hold there. For someone who is not on the platform yet, send an invitation with POST /api/v1/invite-to-workspace instead. The two calls are gated differently: this one needs MANAGE_WORKSPACE, invitations need MANAGE_USERS.

There is no invitation to respond to, so the membership exists as soon as the call succeeds. The response returns allocation_id for the membership, and the member then appears in GET /api/v1/get-users-from-workspace.

Body parameters
workspace_idnumberrequired
The workspace the user is being added to.
user_uuidnumberrequired
The id of the user to add, the same integer that appears as UUID on get-user-info and get-users-from-workspace.
role_uidnumberrequired
The role the user holds in this workspace. The role must already exist there.
creator_workspace_idnumberrequired
The workspace the request is made from.
creator_org_uuidnumberrequired
The organisation the request is made from.

#What happens next

The member can work in the workspace as soon as they next read their account with GET /api/v1/get-user-info, with the permissions their role carries. Signing is separate: they take part in approvals only once they have a signing profile and a key registered through POST /api/v1/register-key on the workspace's network.