Stop sharing library file
DELETE /v1/files/{id}/shares/{grant_id}FreeWrites
Removes one share of a library file by its grant id (from get_file). Needs admin access on the file. Org-visible files stay visible to every member; make it restricted with update_file to limit it to its shares. Free.
MCP tool unshare_file · CLI geocode unshare-file · RPC POST /v1/ops/unshare_file
Input
| Field | Type | Description |
|---|---|---|
idpath, required | string | The file's id from list_files or save_file. |
grant_idpath, required | string |
Example request
curl -X DELETE "https://geocodeai.dev/v1/files/%3Cid%3E/shares/%3Cgrant_id%3E" \ -H "Authorization: Bearer $GEOCODE_API_KEY"Example response
See the description above for what this returns.
Errors
Failures are RFC 9457 problems. Common ones here: 400 invalid_input, 401 unauthorized, 429 rate_limited.