Skip to content

Rename a project

PATCH
/projects/{projectId}
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const project = await client.projects.update({
projectId: '<projectId>',
name: 'Spring Campaign',
});
console.log(project);

Renames a single project when the authenticated caller can edit it. name is the only field this operation writes; workspace write access is required and missing or inaccessible projects return 404. Projects managed by a Generation Table or backing a Production cannot be renamed here — rename them from the owning surface. 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.

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

Media type application/json
object
name
required

Project name

string
>= 1 characters

Project renamed.

Media type application/json
object
project_id
required

Project identifier

string
/^prj_\S+$/
name
required

Project name

string
thumbnail_url
Any of:
string format: uri
is_private

True when only the creator sees the project, rather than the whole workspace. Absent when the API cannot tell.

boolean
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"
}