Skip to main content
DELETE
/
orgs
/
{org_id}
/
k2
/
{kb_id}
/
files
/
{file_id}
cURL
curl --request DELETE \
  --url https://api.timbal.ai/orgs/{org_id}/k2/{kb_id}/files/{file_id} \
  --header 'Authorization: Bearer <token>'
Use this endpoint to delete a regular file by file_id, and also to remove a directory from the knowledge base. For a folder, use the same id returned for that row in GET /orgs/{org_id}/k2/{kb_id}/files (or the placeholder_file_id from create-directory). Deleting that listing row removes the folder from file listings.

Authorizations

Authorization
string
header
required

Timbal API key. Obtain your API key from the Timbal platform settings. See Authentication for more information.

Path Parameters

org_id
string
required
kb_id
string
required
file_id
string
required

Response

204

File deleted