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

# Delete a file

`DELETE /api/v3/files/{id}`

Permanently delete a file and all associated data.

**Requirements:**
- Delete permission on the document
- Workspace must allow manual document management (not sync-only)

**Public datasets:** deleting a public-dataset file requires the instance-admin `MANAGE_PUBLIC_DATASET` permission. A workspace-scoped API key with read access (company opted in via `allow_access_to_public_datasets`) can see the file but gets 403, not 404, when attempting to delete it — public datasets are read-only.

Returns 204 (No Content) on success.

## Path parameters

- `id` integer, required

## Response `204`

File deleted successfully (no content returned)

## Other responses

- `400` — Cannot delete from synced workspace
- `401` — Authentication credentials were not provided
- `403` — User does not have permission to delete this file
- `404` — File not found or not accessible
- `500` — Internal server error

---

[API](https://skmtc.net/lighton/apis/lighton-api.md) · [All operations](https://skmtc.net/lighton/apis/lighton-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lighton/lighton-api/versions/86c57e94ef15/schema)
