Delete a file
DELETE /projects/:projectid/library/files/:fileid
Deletes a Library file and removes its metadata and directory reference. The API does not provide an undo or restore operation.
Before calling it, check whether a workflow, database record, or application still references the file. Keep a separate copy if it must be recoverable.
Authentication and request
Use a project key with library.delete in Authorization, without Bearer. Read or write permission alone does not allow deletion.
Replace :projectid with the key's project ID and :fileid with the exact file ID, not its filename. There is no request body.
This example uses the Quickstart variables and performs a real deletion when supplied with a valid ID:
export INTELLECTIBLE_FILE_ID="FILE_ID_TO_DELETE"
curl --include --request DELETE \
--header "Authorization: ${INTELLECTIBLE_PROJECT_API_KEY}" \
"${INTELLECTIBLE_PUBLIC_API_URL}/projects/${INTELLECTIBLE_PROJECT_ID}/library/files/${INTELLECTIBLE_FILE_ID}"
Use List files to confirm the target first if your key also has library.read. Deleting a file does not delete its parent directory.
Response
Success returns 204 No Content with no response body. Do not try to parse it as JSON.
Errors and retries
- 401: missing or invalid project credential.
- 403: missing
library.delete. - 429: request-rate limit reached.
- 500: the file could not be found or deletion failed.
Deleting an already-removed file is not guaranteed to return 204; missing metadata currently produces a 500 response. After a lost response, verify whether the target remains before treating another failure as evidence that deletion never happened.
See Errors, limits and retries for shared failure-handling guidance.