Add user to workspace
Enterprise Only
This endpoint is only available in the Enterprise package and requires the authenticated user to be a Super Admin.
Method: POST
URL: https://example.com/<MIXPOST_CORE_PATH>/api/panel/workspaces/{workspaceUuid}/users
Authorization: Bearer <token>
Body:
{
"user_id": 1,
"role": "admin",
"can_approve": true,
"is_owner": false
}
| Key | Format | Required | Description |
|---|---|---|---|
user_id | integer | required | The ID of the user to add |
role | string | required | User role: admin, member, or viewer |
can_approve | boolean | required | Whether the user can approve posts |
is_owner | boolean | required | Whether the user should be set as the workspace owner |
Response:
- 200
- 401
- 403
- 404
- 422
{
"success": true
}
{
"message": "Unauthenticated."
}
{
"message": "Access forbidden."
}
{
"message": "Workspace not found."
}
{
"message": "Validation errors",
"errors": {
"user_id": ["This user is already a member of this workspace."]
}
}