---
title: "Delete a context folder"
method: DELETE
path: "/api/v1/context/folders/{id}"
tags: ["Context"]
---

# Delete a context folder

`DELETE /api/v1/context/folders/{id}`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/context/folders/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Soft-deletes the folder. A non-empty folder responds 409 folder_not_empty unless recursive=true is passed, in which case its subfolders and documents are soft-deleted too (their revision history is retained).

## Path parameters

- `id` string, required

## Query parameters

- `recursive` 'true' | 'false': Pass true to delete a non-empty folder and all of its contents.

## Response `200`

The folder was deleted.

- object
  - `deleted` true, required

## Other responses

- `401`: Authentication is missing or invalid.
- `404`: The resource was not found.
- `409`: Response.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
