delete__workspace_{workspaceId}
DELETE /workspace/{id}
Delete Workspace
Delete a workspace (soft delete). The user must have ADMIN access to the workspace to perform deletion. Workspaces with existing buckets or repositories cannot be deleted.
TypeScript Client Library
public deleteWorkspace = async (id: string): Promise<WorkspaceTypes.DeleteWorkspaceResponse> => {
return this.makeRequest<WorkspaceTypes.DeleteWorkspaceResponse>(`workspace/${id}`, 'DELETE', null);
};
Code Samples
# You can also use wget
curl -X DELETE https://backend.flashback.tech/workspace/123e4567-e89b-12d3-a456-426614174000 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Parameters
id
path
string
true
The unique identifier of the workspace
Path Parameters
id
string
true
none
The unique identifier of the workspace
Example responses
200 Response
{
"success": true
}
400 Response
{
"success": false,
"message": "User not found or account is not validated"
}
400 Response
{
"success": false,
"message": "Cannot delete workspace with existing buckets or repos"
}
403 Response
{
"success": false,
"message": "Insufficient permissions to delete workspace"
}
404 Response
{
"success": false,
"message": "Workspace not found"
}
500 Response
{
"success": false,
"message": "Failed to delete 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 perform deletion
Account Validation: User account must be validated to delete workspaces
Resource Check: Workspaces with existing buckets or repositories cannot be deleted
Soft Delete: The workspace is marked as deleted but not permanently removed from the database
User Cleanup: All workspace users are removed when the workspace is deleted
Organization Scoped: Workspaces are scoped to the user's organization
Reversible: Soft deletion allows for potential recovery if needed
Last updated
Was this helpful?