Create a canvas action
POST
/projects/{projectId}/actions
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const action = await client.projects.actions.create({ projectId: '<projectId>', action_id: 'color-grade-image-browser',});console.log(action);curl -X POST 'https://app.flora.ai/api/v1/projects/<projectId>/actions' \ -H 'Authorization: Bearer $FLORA_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "action_id": "color-grade-image-browser"}'Creates a prebuilt action node on a project canvas using a raw action slug.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
Project identifier
string
Project identifier
Request Body required
Section titled “Request Body required ” Media type application/json
object
action_id
required
Action identifier
string
params
Action parameters (snake_case keys). The accepted keys depend on action_id; see GET /actions/{actionId} or POST /runs/action for the per-action schema.
object
key
additional properties
any
Responses
Section titled “ Responses ”Canvas action created.
Media type application/json
object
project_id
required
Project identifier
string
node_id
required
Canvas action node identifier
string
action_id
required
Action identifier
string
canvas_url
required
Project canvas URL
string format: uri
Example
{ "project_id": "prj_abc123", "node_id": "node_abc123", "action_id": "color-grade-image-browser"}