API referenceProjects

Write a project file

Write one file, routed to the service that already owns it: structure through apply_changes (recorded, undoable), composition.html through PUT /scenes/{id}/composition's gates, the scene source after

a validity check, and the scene, block, tempo, theme, voice and caption services for the rest. A .json write merges over the current file. A new scene directory (…/<NNN>-<slug>/scene.json or narration.md) creates the scene at that position. dry_run returns the diff and verdict without writing. 200 carries the verdict either way.

POST
/projects/{id}/fs/write

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

id*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

curl -X POST "https://example.com/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/fs/write" \  -H "Content-Type: application/json" \  -d '{    "path": "string"  }'
{
  "data": {
    "path": "string",
    "dry_run": true,
    "ok": true,
    "applied": true,
    "changes": [
      {
        "field": "string",
        "from": null,
        "to": null
      }
    ],
    "diagnostics": [
      {
        "severity": "error",
        "path": "string",
        "field": "string",
        "code": "string",
        "message": "string"
      }
    ],
    "calls": [
      {
        "service": "string",
        "ok": true,
        "dry_run": true,
        "error": "string",
        "result": null
      }
    ],
    "created": {
      "kind": "chapter",
      "id": "string",
      "path": "string"
    },
    "changeset_id": "string",
    "structure_version": 0
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "type": "string",
    "code": "string",
    "message": "string"
  }
}