# Delete a stored document

Source: https://docs.vlayers.ai/reference/hosting/delete-store-document

`DELETE /v1/agents/{id}/store/{collection}/docs/{docId}` · scope `workspace:write`

Deletes one document. Deleting one that is not there succeeds with `deleted: false`.

Requires an API key with the `workspace:write` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The agent id. Example: `"0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78"` |
| `collection` | path | string | yes | The collection id. Example: `"orders"` |
| `docId` | path | string | yes | The document id. Example: `"order-1001"` |

## Request

cURL:

```bash
curl -X DELETE "https://api.vlayers.ai/v1/agents/$AGENT_ID/store/$COLLECTION/docs/$DOC_ID" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { deleted } = await voicelayer.hosting.deleteStoreDocument('<agent-id>', '<collection>', '<doc-id>', {

});
console.log(deleted);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.hosting.delete_store_document("<agent-id>", "<collection>", "<doc-id>")
print(result.deleted)
```

## Response `200`

```json
{
  "deleted": true
}
```
