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);curl -X POST 'https://app.flora.ai/api/v1/workspaces/<workspaceId>/library/folders' \ -H 'Authorization: Bearer $FLORA_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Clipped from Pinterest — Jul 7, 2026"}'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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” workspaceId
required
Workspace identifier
string
Workspace identifier
Request Body
Section titled “Request Body ” Media type application/json
object
name
Library folder name. Defaults to a generated name when omitted; renameable later in the library.
string
Responses
Section titled “ Responses ”Library folder created.
Media type application/json
object
folder_id
required
Library folder identifier
string
name
required
Library folder name
string
workspace_id
required
Workspace identifier
string
Example
{ "folder_id": "libfolder_abc123", "name": "Clipped from Pinterest — Jul 7, 2026", "workspace_id": "ws_abc123"}