Attach an asset to a canvas
POST
/projects/{projectId}/assets/{assetId}/attach
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const asset = await client.projects.assets.attach({ projectId: '<projectId>', assetId: '<assetId>',});console.log(asset);curl -X POST 'https://app.flora.ai/api/v1/projects/<projectId>/assets/<assetId>/attach' \ -H 'Authorization: Bearer $FLORA_API_KEY'Attaches an existing ready asset to a project canvas as a static media node. 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 ” projectId
required
Project identifier
string
Project identifier
assetId
required
Asset identifier
string
Asset identifier
Responses
Section titled “ Responses ”Asset attached to canvas.
Media type application/json
object
project_id
required
Project identifier
string
asset_id
required
Asset identifier
string
node_id
required
Canvas node identifier
string
canvas_url
required
Project canvas URL
string format: uri
Example
{ "project_id": "prj_abc123", "asset_id": "asset_abc123", "node_id": "node_abc123"}