---
title: "Delete file or folder"
method: DELETE
path: "/v2/files/{path}"
tags: ["files"]
---

# Delete file or folder

`DELETE /v2/files/{path}`

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         | -         |

## Path parameters

- `path` string, required

## Headers

- `Authorization` string, required
- `IB-Context` string

## Response `202`

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>

- FilesDeleteFileOrFolderResponse202 — Empty response body

---

[API](https://skmtc.net/instabase/apis/api-reference.md) · [All operations](https://skmtc.net/instabase/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instabase/api-reference/revisions/3a4f46d48141/schema)
