Skip to main content
POST
Edit Draft

Authorizations

X-API-Key
string
header
required

Path Parameters

session_id
integer
required

Cookies

wos-session
string
datalab_active_team
string

Body

application/json

One direct draft edit (frontend SessionEngineApi: editGoal / editRule / editSchema / toggleCheckBlocking). S2 semantics: the edit applies immediately, appends a user artifact_edit event, and ticks the brain — it never consumes the pending question/diff card.

op
enum<string>
required
Available options:
goal,
rule,
schema,
check_blocking
text
string | null

New goal text (op=goal), rule text (op=rule), or schema source text (op=schema).

Maximum string length: 100000
rule_id
string | null

Required for op=rule.

check_id
string | null

Required for op=check_blocking.

Response

Successful Response

event
SessionEventResponse · object
required
draft_contract
ContractModel · object
required

The freezable record a version snapshots (contract JSONB).

draft_checks
CheckSpecModel · object[]