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

# Delete workspace

> Discard the draft. Cascades identity delete when the app was never published.

**`DELETE`** `https://api-datahub.octoparse.com/v1/data-apps/{app_id}/workspace`

Authentication: API key required (`Authorization: Bearer <API Key>`). App author only; others get `404`.

Discard the draft. If the app has no releases, the identity is cascade-deleted (no unpublished empty shells are kept; historical name bindings still apply for anti-squatting). Build snapshots are retained and cleaned up by GC.

Missing draft does not always short-circuit to `404`: an identity with no draft and zero releases (historical orphan) still goes through cascade cleanup, otherwise orphans could never be removed. `404` only when there is no draft but releases already exist.

## Request

### Path parameters

<ParamField path="app_id" type="string" required>
  App reference.
</ParamField>

### Example request

```bash theme={null}
curl -X DELETE \
  -H "Authorization: Bearer $OCTOPARSE_API_KEY" \
  "https://api-datahub.octoparse.com/v1/data-apps/carol/reviews-query/workspace"
```

## Response

### 200 success

```json theme={null}
{
  "data": {
    "deleted": false,
    "app_deleted": false
  }
}
```

The payload is wrapped in `data`. Fields:

<ResponseField name="deleted" type="boolean" required>
  Whether the draft was deleted.
</ResponseField>

<ResponseField name="app_deleted" type="boolean">
  —
</ResponseField>

### Errors

| HTTP | `code`                | `category`  | Description                                                                       |
| ---- | --------------------- | ----------- | --------------------------------------------------------------------------------- |
| 401  | `unauthorized`        | `forbidden` | Missing or invalid API key.                                                       |
| 404  | `workspace-not-found` | `not_found` | This app has no in-progress draft. That is a normal main-path state, not a fault. |

Error responses use `{"error": {code, category, message, retryable}}`. See <a href="/docs/en/datahub/api/reference/introduction#errors">Errors</a>.

## Client libraries

The Python and JavaScript SDKs do not wrap this endpoint yet. Call REST directly.
