delete__workspace_{wksId}_users_{userId}
DELETE /workspace/{id}/users/{userId}
Remove User from Workspace
Remove a user from a workspace. The authenticated user must have ADMIN access to the workspace to perform this operation.
TypeScript Client Library
public removeUserFromWorkspace = async (workspaceId: string, userId: string): Promise<WorkspaceTypes.RemoveUserFromWorkspaceResponse> => {
return this.makeRequest<WorkspaceTypes.RemoveUserFromWorkspaceResponse>(`workspace/${workspaceId}/users/${userId}`, 'DELETE', null);
};
Code Samples
# You can also use wget
curl -X DELETE https://backend.flashback.tech/workspace/123e4567-e89b-12d3-a456-426614174000/users/user-456 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Parameters
id
path
string
true
The unique identifier of the workspace
userId
path
string
true
The unique identifier of the user to remove
Path Parameters
id
string
true
none
The unique identifier of the workspace
userId
string
true
none
The unique identifier of the user to remove
Example responses
200 Response
{
"success": true
}
400 Response
{
"success": false,
"message": "User not found or account is not validated"
}
403 Response
{
"success": false,
"message": "Insufficient permissions to manage workspace users"
}
404 Response
{
"success": false,
"message": "User not found in workspace"
}
500 Response
{
"success": false,
"message": "Failed to remove user from workspace"
}
Responses
Response Schema
Status Code 200
» success
boolean
true
none
Operation success status
Status Code 400
» success
boolean
true
none
Operation success status
» message
string
true
none
Error message
Status Code 403
» success
boolean
true
none
Operation success status
» message
string
true
none
Error message
Status Code 404
» success
boolean
true
none
Operation success status
» message
string
true
none
Error message
Status Code 500
» success
boolean
true
none
Operation success status
» message
string
true
none
Error message
Notes
Authentication Required: User must be authenticated with a valid Bearer token
Permissions: User must have ADMIN access to the workspace to remove users
Account Validation: User account must be validated to perform this operation
User Existence: The target user must exist in the workspace to be removed
Immediate Effect: User removal takes effect immediately
Access Revocation: Removed users lose all access to the workspace
Organization Scoped: Users can only be removed from workspaces within their organization
No Recovery: Once removed, users must be re-added to regain access
Self-Removal: Users cannot remove themselves from a workspace (this prevents accidental lockout)
Last updated
Was this helpful?