Skip to main content
POST
Apply targeted edits

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

project_id
string
required

Body

application/json
ops
(ShiftElementOp · object | SetFieldsOp · object | TrimElementOp · object | SwapSourceOp · object | AddElementOp · object | RemoveElementOp · object | ReorderOp · object | SetTransitionOp · object | RemoveTransitionOp · object | SetRequestFieldsOp · object | ReplaceRequestOp · object | SetDirectionOp · object | CutOp · object | MoveElementOp · object | ApplyTemplateOp · object)[]
required

Targeted edits applied in order; the batch is atomic.

Minimum array length: 1
if_version
integer | null

Optimistic concurrency: reject with 409 if the head version differs.

Example:

3

author
enum<string>
default:agent

Who authored this edit, for version provenance.

Available options:
user,
agent
run_id
string | null

Agent run correlation id, stamped on the new version.

Maximum string length: 128
dry_run
boolean
default:false

Return what the batch would do (diff, changed ids, violations, cut report) without saving a version.

Response

Successful Response

The result of an ops batch: never echoes the whole request.

version
integer
required

The new head version.

ok
boolean
required

True when the new head has no error-severity violations.

diff
ProjectDiff · object
required

A structural delta between the previous head and the new head.

editor_url
string | null

Open the edited project in the authenticated console.

changed_ids
string[]

Element ids the ops touched.

violations
Violation · object[]

Validation riding along free: cross-element and whole-timeline invariant checks. Truncated to the first 36 findings (errors first) on very large compositions, with a VIOLATIONS_TRUNCATED marker carrying the full count; the free dry run is never truncated.

cut_report
CutTargetReport · object[]

One entry per target of every cut op in the batch, in order.

dry_run
boolean
default:false

True when nothing was saved; version is then still the head's.