Attach a user to a workspace
POST/panel/workspaces/:workspace/users
Adds an existing user to the workspace with the given role.
user_id must belong to an existing user who is not already a member of this workspace.
When is_owner is true the user is also set as the workspace owner. When is_owner is false and the user is currently the owner, ownership is cleared. The attach and the ownership change are applied together — if either fails, neither is applied.
Request
Responses
- 200
- 401
- 403
- 404
- 422
{"success": true} — hard-coded literal, never false.
The bearer token is missing, malformed, unknown, or expired.
The token is valid, but the user it belongs to may not perform this action:
- they are not a member of the
{workspace}in the path; or - their workspace role is too low for this endpoint (write routes require Admin or Member); or
- for
/panelendpoints, they are not a platform administrator.
The host application that Mixpost is installed into can also deny access to Mixpost as a whole, which produces the same response.
The {workspace} UUID in the path does not match any workspace.
Validation failed. Known messages:
user_id: "This user is already a member of this workspace."user_id: the "select a user" message, returned whenuser_iddoes not match an existing user.