---
title: "Delete a file"
method: DELETE
path: "/files/{file_id}"
tags: ["Files"]
---

# Delete a file

`DELETE /files/{file_id}`

## Request

- Base URL: `https://api.sandbox.monite.com/v1`
- URL: `https://api.sandbox.monite.com/v1/files/{file_id}`
- Auth: HTTP bearer

Delete a file with the specified ID.

**Note:** This endpoint does not check if the specified file is in use. Use with caution.

Both partner tokens and entity user tokens can be used for authentication.
#### Considerations for invoice attachments
Deleting a file does not delete it from the `attachments` list of accounts receivable invoices, quotes, and credit notes because these documents contain an inline copy of all referenced resources. To delete a file from attachments, call `PATCH /receivables/{receivable_id}` and update the `attachments` list to exclude the deleted file.

## Path parameters

- `file_id` string, required

## Headers

- `x-monite-version` string, required

## Response `200`

Successful response

## Other responses

- `401`: The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.
- `404`: A file with the specified ID was not found.
- `422`: Validation Error
- `429`: API rate limit has been exceeded. Check the response headers for the rate limit information.

---

[API](https://skmtc.dev/monite/apis/monite-2.md) - [All operations](https://skmtc.dev/monite/apis/monite-2/llms.txt) - [OpenAPI document](https://skmtc.dev/monite/apis/monite-2/revisions/4299ccf95edb?raw)
