---
title: "Revoke a file share"
method: DELETE
path: "/file/{id}/share/{aclId}"
tags: ["Files"]
---

# Revoke a file share

`DELETE /file/{id}/share/{aclId}`

## Request

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

Revokes a share on a file. The grantee loses the file immediately — unless they still reach it through the connection or toolbox it came from, which a share revoke does not touch. Audited as `file.share_revoked`. A share id that does not belong to this file is `404 Share not found`. Owner only: ownership is the gate, and there is no `file:share` permission. A caller who is not the owner gets `403` ("Only the owner…") whenever the file is visible to them in `GET /file` (an explicit share, or `use` on its source connection or toolbox, restricted or not), because they already know it exists; `404` otherwise, including a listed row whose access through a connection or toolbox has broken (`can_open: false` for a lapsed toolbox delegation or a deleted connection).

## Path parameters

- `id` string, required
- `aclId` 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)
