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}'DELETE https://backend.flashback.tech/workspace/123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: backend.flashback.tech
Accept: application/json
Authorization: Bearer {access-token}const workspaceId = '123e4567-e89b-12d3-a456-426614174000';
const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch(`https://backend.flashback.tech/workspace/${workspaceId}`,
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});require 'rest-client'
workspace_id = '123e4567-e89b-12d3-a456-426614174000'
headers = {
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.delete "https://backend.flashback.tech/workspace/#{workspace_id}",
headers: headers
p JSON.parse(result)import requests
workspace_id = '123e4567-e89b-12d3-a456-426614174000'
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.delete(f'https://backend.flashback.tech/workspace/{workspace_id}',
headers=headers)
print(r.json())<?php
require 'vendor/autoload.php';
$workspace_id = '123e4567-e89b-12d3-a456-426614174000';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);
$client = new \GuzzleHttp\Client();
try {
$response = $client->request('DELETE',"https://backend.flashback.tech/workspace/{$workspace_id}", array(
'headers' => $headers,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}String workspaceId = "123e4567-e89b-12d3-a456-426614174000";
URL obj = new URL("https://backend.flashback.tech/workspace/" + workspaceId);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Authorization", "Bearer {access-token}");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());package main
import (
"net/http"
"fmt"
)
func main() {
workspaceId := "123e4567-e89b-12d3-a456-426614174000"
headers := map[string][]string{
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
req, err := http.NewRequest("DELETE", fmt.Sprintf("https://backend.flashback.tech/workspace/%s", workspaceId), nil)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}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?