> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.lumenia.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.lumenia.net/_mcp/server.

# Delete workspace

DELETE https://app.lumenia.net/api/v1/workspaces/{workspaceId}

Permanently delete a workspace and all of its data. This cannot be undone.

Reference: https://docs.lumenia.net/api-reference/workspaces/delete-workspace

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <API_KEY>`, where `API_KEY` is your API key.

## Request

### Path parameters

- `workspaceId` (string, required) — Workspace to delete.

### Headers

- `X-Account-Id` (string, required) — Account that owns the workspace.

## Response

### 200

Confirms the workspace was deleted.

- `success` (boolean, required) — True when the workspace was deleted.

## Errors

### 400 Bad Request Error

The workspace could not be deleted

- `any`

### 403 Forbidden Error

The API key is missing or invalid, or the X-Account-Id does not belong to the partner.

- `message` (string, optional)

### 404 Not Found Error

Workspace not found for this account

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Examples

**Response**

```json
{
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://app.lumenia.net/api/v1/workspaces/workspaceId"

headers = {
    "X-Account-Id": "X-Account-Id",
    "Authorization": "Bearer <API_KEY>"
}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.lumenia.net/api/v1/workspaces/workspaceId';
const options = {
  method: 'DELETE',
  headers: {'X-Account-Id': 'X-Account-Id', Authorization: 'Bearer <API_KEY>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lumenia.net/api/v1/workspaces/workspaceId"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("X-Account-Id", "X-Account-Id")
	req.Header.Add("Authorization", "Bearer <API_KEY>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.lumenia.net/api/v1/workspaces/workspaceId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["X-Account-Id"] = 'X-Account-Id'
request["Authorization"] = 'Bearer <API_KEY>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://app.lumenia.net/api/v1/workspaces/workspaceId")
  .header("X-Account-Id", "X-Account-Id")
  .header("Authorization", "Bearer <API_KEY>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://app.lumenia.net/api/v1/workspaces/workspaceId', [
  'headers' => [
    'Authorization' => 'Bearer <API_KEY>',
    'X-Account-Id' => 'X-Account-Id',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.lumenia.net/api/v1/workspaces/workspaceId");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-Account-Id", "X-Account-Id");
request.AddHeader("Authorization", "Bearer <API_KEY>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Account-Id": "X-Account-Id",
  "Authorization": "Bearer <API_KEY>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lumenia.net/api/v1/workspaces/workspaceId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```