Graniite Docs

Delete a folder.

Whole-library tokens only. By default the items in the folder survive (their other folder memberships are preserved; items whose ONLY folder was this one become unfiled). Pass ?cascade_items=true to also delete items whose only folder is this one. Folder_items + kb_access_token_folders rows cascade automatically via FK CASCADE; tokens whose last scoped folder gets deleted are auto-revoked. Per-token rate limit: 30/hr.

DELETE
/folders/{id}

Whole-library tokens only. By default the items in the folder survive (their other folder memberships are preserved; items whose ONLY folder was this one become unfiled). Pass ?cascade_items=true to also delete items whose only folder is this one. Folder_items + kb_access_token_folders rows cascade automatically via FK CASCADE; tokens whose last scoped folder gets deleted are auto-revoked. Per-token rate limit: 30/hr.

Authorization

bearerAuth
AuthorizationBearer <token>

Per-user bearer token minted at /settings/integrations. Format: 'lev_' followed by 32 base64url chars. Each token carries a capability set (read | write) and a folder scope (whole library or a list of specific folders). Per-endpoint requirements are noted on each operation.

In: header

Path Parameters

id*string
Formatuuid

Query Parameters

cascade_items?boolean

When true, delete items whose ONLY folder is this one. Items in other folders survive.

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/folders/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "ok": true,
  "cascaded_item_count": 0
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "forbidden_scope",
  "message": "string",
  "out_of_scope": [
    "e247dd1e-9ba6-4526-b17b-ddce20d3d1a2"
  ]
}
{
  "error": "string",
  "message": "string"
}
{
  "error": "rate_limited",
  "retry_after_sec": 0
}