Skip to content

Create a library folder

POST
/workspaces/{workspaceId}/library/folders
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const library = await client.workspaces.library.createFolder({
workspaceId: '<workspaceId>',
name: 'Clipped from Pinterest — Jul 7, 2026',
});
console.log(library);

Creates a folder in the authenticated user’s FLORA library. Used by the Web Clipper to group images clipped from a page. Defaults to the credential’s workspace when workspace_id is omitted. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

Error responses use the standard error body.

workspaceId
required

Workspace identifier

string
/^ws_\S+$/

Workspace identifier

Media type application/json
object
name

Library folder name. Defaults to a generated name when omitted; renameable later in the library.

string

Library folder created.

Media type application/json
object
folder_id
required

Library folder identifier

string
/^libfolder_\S+$/
name
required

Library folder name

string
workspace_id
required

Workspace identifier

string
/^ws_\S+$/
Example
{
"folder_id": "libfolder_abc123",
"name": "Clipped from Pinterest — Jul 7, 2026",
"workspace_id": "ws_abc123"
}