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

# Delete a file

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

## Request

- Base URL: `https://your-deployment.example.com`
- URL: `https://your-deployment.example.com/api/v1/files/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Deletes a file you own and frees its storage. On a file shared with you it removes only your access (an unshare): the owner's file is kept.

## Path parameters

- `id` string, required

## Response `204`

The file was deleted, or your access to it was removed.

## Other responses

- `401`: Missing or invalid credentials.
- `403`: The API key lacks `files:write`.
- `404`: No file with that id is yours or shared with you directly (a file you reach only through a group or a data lake cannot be deleted here). A file that does not exist and a malformed id are both reported as 404.
- `405`: The path does not serve this HTTP method.
- `422`: Request failed validation.
- `429`: Per-user rate limit exceeded.

---

[API](https://skmtc.dev/bike4mind/apis/bike4mind-api.md) · [All operations](https://skmtc.dev/bike4mind/apis/bike4mind-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bike4mind/apis/bike4mind-api/revisions/db47495b892f?raw)
