Skip to main content

Replace User Workspace

PATCH/user/{id}/workspace/{workspaceId}

Updates a specific workspace relation for a user.

Path Parameters
idstringrequired
UUID of the user.
workspaceIdstringrequired
The unique identifier of the workspace.
Request Body
idstringoptional
ID of the workspace (alternative to path parameter).
namestringoptional
Name of the workspace.
statusstringoptional
User's status in this workspace. Accepted values: active, archived.
groupsarrayoptional
List of groups to assign the user to in this workspace.
Error Responses
400
User account is archived, group not found, invalid group type, or end-user/editable group conflict.
402
User seat limit exceeded.
403
External API disabled, missing EXTERNAL_API license, or invalid Authorization token.
404
User not found.
Request
curl -X PATCH "https://{your-domain}/api/ext/user/{id}/workspace/{workspaceId}" -H "Authorization: Basic <access_token>" -H "Content-Type: application/json" -d '{
"status": "archived",
"groups": [
  {
    "name": "all_users"
  }
]
}'

Response: 200