Skip to content

Delete Directory File

DELETE/api/v1/beta/directories/{directory_id}/files/{directory_file_id}

Delete a file from the specified directory.

Note: This endpoint uses directory_file_id (the internal ID). If you’re trying to delete a file by its unique_id, use the list endpoint with a filter to find the directory_file_id first.

Path ParametersExpand Collapse
directory_id: string
directory_file_id: string
Query ParametersExpand Collapse
organization_id: optional string
project_id: optional string
Cookie ParametersExpand Collapse
session: optional string

Delete Directory File

curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files/$DIRECTORY_FILE_ID \
    -X DELETE \
    -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"
Returns Examples