UmweltDocs
Reference/Commands/timeline.openDraft
timeline.openDraftcommandsince 0.1

Opens a draft: a timeline apart from main, or from another draft, that sees its parent as it is now.

Request
umwelt call story.umw timeline.openDraft '{
  "projectId": "ball",
  "id": "chapter-2",
  "label": "Chapter 2"
}'
Request
const result = await client.timelineOpenDraft({ projectId: 'ball', id: 'chapter-2', label: 'Chapter 2' });
Request
var result = engine.TimelineOpenDraft(new OpenDraftInput
{
    ProjectId = "ball",
    Id = "chapter-2",
    Label = "Chapter 2",
});
Response
{
  "kind": "draft",
  "id": "chapter-2",
  "status": "active",
  "projectId": "ball",
  "label": "Chapter 2",
  "baseVersion": 14,
  "createdAt": "2026-11-11T18:21:58.6687174Z",
  "depth": 1,
  "headVersion": 14,
  "maxTick": 10,
  "parentTimelineId": "main"
}

Payload

FieldTypeDescription
projectIdrequiredstringThe project to write to.
idstringIts id. Generated when absent; main is not valid.
labelstringIts label, such as “Day 12”.
baseTimelineIdstringThe parent: main (the default) or an active draft.

Result

FieldTypeDescription
idalwaysstringThe timeline’s id. Main is always main.
projectIdalwaysstringThe project it belongs to.
kindalways"main" | "draft"main or draft.
statusalways"active" | "promoted" | "discarded"active, promoted or discarded. Only an active timeline accepts writes.
labelstringIts label.
parentTimelineIdstringThe timeline it branched from: main or another draft. Absent for main.
depthalwaysintegerDrafts from main down to it: 0 for main, 1 for a draft of main, at most 4.
baseVersionintegerThe parent’s head when it was opened. Absent for main.
headVersionalwaysintegerThe version of its latest commit, or its base when it has none.
maxTickalwaysintegerThe highest tick it sees.
createdAtalwaysstringWhen it was opened (UTC).
closedAtstringWhen it was promoted or discarded.
purgedAtstringWhen its rows were purged.

Rules

Invisible until promoted. Writes to the draft are seen only by reads of the draft, and of drafts opened from it.

At most four deep. A draft of main has depth 1; drafts nest down to depth 4.

Errors

VALIDATION_FAILEDThe parent is already four drafts deep.
NOT_FOUNDThe project or the parent does not exist, or the parent was purged.
CONFLICTA timeline with that id exists.
INVALID_STATEThe parent was promoted or discarded.
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?