Skip to content

Delete a library folder

DELETE
/workspaces/{workspaceId}/library/folders/{folderId}
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const library = await client.workspaces.library.deleteFolder({
workspaceId: '<workspaceId>',
folderId: '<folderId>',
});
console.log(library);

Deletes a library folder owned by the authenticated user, detaching any saved nodes still in it. Used by the Web Clipper to clean up an empty folder when a clip saved nothing.

Error responses use the standard error body.

workspaceId
required

Workspace identifier

string
/^ws_\S+$/

Workspace identifier

folderId
required

Library folder identifier

string
/^libfolder_\S+$/

Library folder identifier

Library folder deleted.

Media type application/json
object
folder_id
required

Library folder identifier

string
/^libfolder_\S+$/
deleted
required

Always true when the folder was deleted

workspace_id
required

Workspace identifier

string
/^ws_\S+$/
Example
{
"folder_id": "libfolder_abc123",
"deleted": true,
"workspace_id": "ws_abc123"
}