---
title: "Deletes a file from the pre-publish bucket and associated metadata"
method: DELETE
path: "/files/{path}"
tags: ["Delete file metadata"]
---

# Deletes a file from the pre-publish bucket and associated metadata

`DELETE /files/{path}`

## Request

- Base URL: `http://localhost:26900`
- URL: `http://localhost:26900/files/{path}`
- Auth: API key in header `Authorization`

## Path parameters

- `path` string, required

## Response `204`

File and metadata successfully deleted

## Other responses

- `401`: Authentication information is missing or invalid.
- `403`: Authorization Failed - Check logs
- `404`: The requested resource does not exist.
- `409`: File is already published
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/files-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/files-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/files-api/revisions/b34c9662a495?raw)
