Requires workspace-users-write. Add an existing user or send an invite if the email is unknown.
workspace-users-write ability and admin privileges in the workspace.
| Parameter | Type | Description |
|---|---|---|
| workspaceId | number | ID of the target workspace. |
| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Email address of the user to add/invite. | |
| role | string | Yes | Role to assign (admin, user, or readonly). |
200 OK – One of the following messages:
"User has been successfully added to workspace." – when the user account already exists."Registration invitation email sent to user." – when an invitation email was sent."User is already in workspace." – if the user is already a member.403 Forbidden – Token lacks workspace-users-write or insufficient privileges.