***

title: delete
slug: /reference/typescript/rest/datasphere/delete
description: Delete a document and all its chunks.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Delete a document and all its chunks.

<EndpointSchemaSnippet endpoint="DELETE /api/datasphere/documents/{id}" />

## **Example**

```typescript {9-9}
import { RestClient } from "@signalwire/sdk";

const client = new RestClient({
  project: "your-project-id",
  token: "your-api-token",
  host: "your-space.signalwire.com"
});

await client.datasphere.documents.delete("document-id");
```