Skip to content

Create a project

POST
/projects
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const project = await client.projects.create({
workspace_id: 'ws_abc123',
name: 'Spring Campaign',
});
console.log(project);

Creates a new Flora project in the requested workspace. To file the project into a project folder, use POST /workspaces/{workspace_id}/folders/{folder_id}/projects. 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.

Media type application/json
object
workspace_id
required

Workspace identifier

string
name
required

Project name

string
>= 1 characters

Project created.

Media type application/json
object
project_id
required

Project identifier

string
/^prj_\S+$/
name
required

Project name

string
workspace_id
required

Workspace identifier

string
/^ws_\S+$/
origin
required
Any of:

Project origin

string
last_modified
required
Any of:
number
created_at
required
number
Example
{
"project_id": "prj_abc123",
"name": "Spring Campaign",
"workspace_id": "ws_abc123",
"origin": "api"
}