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

# Delete a tool file

`DELETE /file/{id}`

## Request

- Base URL: `https://api.elaichi.ai`
- URL: `https://api.elaichi.ai/file/{id}`
- Auth: HTTP bearer

Permanently deletes the file’s bytes, its record and every share on it. Irreversible, and it takes the file away from everyone it was shared with. Audited as `file.deleted`.

Owner only: the person who ran the tool, not the owner of the connection behind it. Unlike the content route this one requires `X-Organization-Id` (it is a command, never a link someone clicks). A caller who is not the owner gets `403` ("Only the owner…") whenever the file is visible to them (an explicit share, or `use` on its source connection or toolbox, since it is in their `GET /file`); `404` for everyone else, including a malformed or unknown id, an expired file, and a member the file does not reach. A second delete of the same id is a `404`.

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string

## Response `200`

Success

- Success
  - `success` boolean, required

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited

---

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