# Permanently delete a document

`POST /v1/documents/{id}/purge`

Permanently deletes a document in the trash, its trashed subtree, bodies and outgoing links. Links to it become unresolved. Cannot be undone.

Scope: `docs:write`.

## Request

```bash
curl -X POST "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/purge" \
  -H "Authorization: Bearer $LYDIE_TOKEN"
```

## Path parameters

- `id` (ULID, required)

## Response

- `purgedIds` (ULID[], required)

```json
{
  "purgedIds": [
    "01JCQ3V5MZ8G4ZK2X7T9R6N1PB"
  ]
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
