Revoke a file share
/file/{id}/share/{aclId}
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
File id (file_…).
Share id (acl_…) from the share list.
Response Body
curl -X DELETE 'https://api.elaichi.ai/file/<id>/share/<aclId>' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/file/<id>/share/<aclId>', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/file/<id>/share/<aclId>"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
print(response.json())