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

Name
In
Type
Required
Description

id

path

string

true

The unique identifier of the workspace

userId

path

string

true

The unique identifier of the user to remove

Path Parameters

Name
Type
Required
Restrictions
Description

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

Status
Meaning
Description
Schema

200

User removed from workspace successfully

Inline

400

User not found or not validated

Inline

403

Insufficient permissions

Inline

404

User not found in workspace

Inline

500

Server error

Inline

Response Schema

Status Code 200

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

Status Code 400

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Status Code 403

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Status Code 404

Name
Type
Required
Restrictions
Description

» success

boolean

true

none

Operation success status

» message

string

true

none

Error message

Status Code 500

Name
Type
Required
Restrictions
Description

» 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?