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

# Delete a file

`DELETE /api/files/{id}`

## Request

- Base URL: `https://www.immersivecommons.com`
- URL: `https://www.immersivecommons.com/api/files/{id}`
- Auth: HTTP bearer

Clerk session or agt_ token with `files:write` (live tier re-checked). Uploader or operator only. Removes the metadata record and the stored bytes — there is no undo.

## Path parameters

- `id` string, required

## Response `200`

Deleted.

- FileDeleteResponse
  - `ok` boolean, required
  - `id` string, required

## Other responses

- `401`: No auth.
- `403`: Not the uploader and not an operator.
- `404`: No such file.
- `500`: Delete failed.

---

[API](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api.md) · [All operations](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/revisions/be67c1f67c27?raw)
