Delete file or folder

Delete a single file or folder. This operation is also available via the SDK method `client.files.delete()`. <Info>This acts on files in the AI Hub filesystem, not your local filesystem.</Info> <Note>Ensure the path is accessible within the context defined by the `IB-Context` header.</Note> Not all filesystem types support this operation. | Filesystem | Supported | |----------------------|-----------| | Instabase | ✓ | | Amazon S3 | ✓ | | Azure Blob Storage | ✓ | | Google Cloud Storage | ✓ | | Google Drive | - |

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Path parameters

pathstringRequired
Full path to the file or folder.

Headers

IB-ContextstringOptional
Specify whether to use your community account or organization account to complete the request. To use your community account, define as your user ID. To use your organization account, define as your organization ID. If unspecified, defaults to community account context. See [Authorization and context identification](/api-sdk/authorization#ib-context-header) for details.

Response

Indicates that the deletion request has been accepted. <br/> <Note>The operation returns this status code regardless of whether the file or folder exists.</Note>