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

# DELETE /v1/documents/:id — remove a document

> Permanently delete a chattel document and its attached loan record. Returns 204 No Content. Cannot be undone — verify the document ID before calling.

`DELETE /v1/documents/:id` permanently deletes a document you own. The deletion cascades to any associated loan record attached to the document. A `document.deleted` event is appended to your activity feed after the document is removed.

<Warning>
  Deletion is permanent. There is no soft-delete or recovery mechanism. The document, its loan record, and any RCM campaigns associated with it are removed from the database. Export any data you need before deleting.
</Warning>

```http theme={null}
DELETE /v1/documents/:id
```

## Request headers

<ParamField header="Authorization" type="string" required>
  Bearer token obtained from your Clerk session. Example: `Bearer eyJhbGc...`
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  The unique identifier of the document to delete. The document must be owned by your account; the API returns `404` for documents that do not exist or belong to another account.
</ParamField>

## Response

Returns `204 No Content` on success. The response body is empty.

## Example

<CodeGroup>
  ```bash Request theme={null}
  curl --request DELETE \
    --url https://your-api.example.com/v1/documents/doc_01j9z8x7w6v5u4t3s2r1q0p \
    --header 'Authorization: Bearer <your-session-token>'
  ```

  ```text Response 204 theme={null}
  (empty body)
  ```
</CodeGroup>

***

## Error cases

| Status | Error message                         | Cause                                                                         |
| ------ | ------------------------------------- | ----------------------------------------------------------------------------- |
| `401`  | `Missing Authorization Bearer token.` | No `Authorization` header was sent.                                           |
| `401`  | `Invalid or expired token.`           | The Bearer token is malformed or has expired.                                 |
| `404`  | `Not found.`                          | No document with the given `id` exists, or it belongs to a different account. |
