API referenceScenes

Edit elements in a scene

Element-level edits on a scene, expressed as patches against its scene source.

This is the same vocabulary and the same applier the editor canvas uses for a drag, resize, retime, recolour or restyle, so an API caller and a person on the canvas produce identical results. Read the scene first to get current line numbers. Spends no credits — an edit is a source rewrite plus a transpile, not a generation. Scene ids are globally unique, so the flat path is unambiguous. The response carries claimed_by when another actor holds a live claim on the scene (the write is not blocked).

PATCH
/scenes/{sceneId}/elements

Authorization

bearerAuth
AuthorizationBearer <token>

Typecut API key. Generate one in app.typecut.ai → Settings → API keys. Send as Authorization: Bearer tc_live_….

In: header

Path Parameters

sceneId*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/scenes/497f6eca-6276-4993-bfeb-53cbbbba6f08/elements" \  -H "Content-Type: application/json" \  -d '{    "patches": [      {}    ]  }'
{
  "success": true,
  "data": {
    "sceneId": "6ed066d9-2daf-493b-8760-26bb10c4fec5",
    "composition": {
      "property1": null,
      "property2": null
    },
    "compositionVersion": 0,
    "claimed_by": {
      "kind": "human",
      "label": "string",
      "since": "string",
      "expires_at": "string",
      "expires_in_s": 0,
      "note": "string"
    }
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}