> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drime.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Workspace

> Delete a workspace permanently

## Overview

Permanently deletes a workspace and all its contents. Only the workspace owner can delete a workspace.

<Warning>
  This action is irreversible. All files, folders, and data in the workspace will be permanently deleted.
</Warning>

## Path Parameters

<ParamField path="id" type="integer" required>
  The workspace ID to delete
</ParamField>

## Query Parameters

<ParamField query="_method" type="string" required>
  Must be `DELETE` (Laravel method spoofing)
</ParamField>

## Response

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://app.drime.cloud/api/v1/workspace/1873?_method=DELETE" \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const workspaceId = 1873;

  const response = await fetch(
    `https://app.drime.cloud/api/v1/workspace/${workspaceId}?_method=DELETE`,
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  workspace_id = 1873

  response = requests.post(
      f'https://app.drime.cloud/api/v1/workspace/{workspace_id}',
      params={'_method': 'DELETE'},
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "status": "success"
  }
  ```

  ```json 403 - Forbidden theme={null}
  {
    "message": "This action is unauthorized."
  }
  ```
</ResponseExample>

<Note>
  Due to Laravel's method spoofing, you need to send a POST request with `_method=DELETE` query parameter.
</Note>
