Revoke a file share
/file/{id}/share/{aclId}
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, and there is no `file:share` permission to mirror — ownership is the gate. A caller who is not the owner gets `403` ("Only the owner…") whenever a tier reaches the file for them — an explicit grant, or `use` on its source connection or toolbox, restricted or not — because it is in their `GET /file` and they already know it exists; `404` when no tier resolves, including a listed row whose inherited chain has broken (`can_open: false` for a lapsed toolbox delegation or a deleted connection).
Path Parameters
File id (file_…).
ACL entry id 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())