Replace User Relationship in Multiple Workspaces
PUT/user/{id}/workspaces
Updates a user's role, status, or group assignments across multiple workspaces in one call. This fully replaces the user's workspace memberships — any workspace not included in the request will be removed. Send an empty array to remove the user from all workspaces.
Path Parameters
UUID of the user.
Request Body
UUID of the workspace. Either id or name must be provided.
Name of the workspace. Either id or name must be provided.
User's role in the workspace. Accepted values: ADMIN, MEMBER.
User's status in the workspace. Accepted values: ACTIVE, ARCHIVED.
List of groups to assign the user to in this workspace. Each item must have an id (group UUID).
Error Responses
Workspace not found, user account inactive, group not found, or invalid group type.
User seat limit exceeded.
External API disabled, missing EXTERNAL_API license, or invalid Authorization token.
User not found.
Internal server error (e.g. invalid enum values in request body).
Request
curl -X PUT "https://{your-domain}/api/ext/user/{id}/workspaces" \
-H "Authorization: Basic <access_token>" \
-H "Content-Type: application/json" \
-d '[
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"role": "ADMIN",
"status": "ACTIVE",
"groups": [
{ "id": "11111111-1111-1111-1111-111111111111" }
]
},
{
"name": "Engineering Workspace",
"role": "MEMBER",
"status": "ACTIVE",
"groups": [
{ "id": "22222222-2222-2222-2222-222222222222" },
{ "id": "33333333-3333-3333-3333-333333333333" }
]
}
]'Response: 200