Skip to main content

Overview

Day Copilot implements a draft/publish workflow that allows you to make changes to tasks and events without immediately affecting the published version. This is particularly useful for collaborative editing, review processes, and preventing accidental changes.
The draft/publish workflow is optional. Simple updates (status changes, adding comments) can bypass drafting if needed.

How It Works

Version Numbers

Every task and event has two version numbers: Example:
This means:
  • Published version: 2.0 (last accepted state)
  • Draft version: 2.3 (current working state with 3 edits)
  • Status: Unpublished (changes not yet live)

State Machine

Creating a Draft

When you update a published task or event, it automatically becomes a draft:

Example: Update Task

Response:
What Happened:
  1. Task was at version 1.0 (published)
  2. Your update created version 1.2 (draft)
  3. last_live contains the snapshot of version 1.0
  4. Changes are not yet published

Publishing a Draft

To make your draft changes official, publish the draft:
Response:
What Happened:
  1. Draft version 1.2 became published version 2.0
  2. is_published set to true
  3. last_live cleared (no longer needed)
  4. Ready for new edits

Discarding a Draft

To revert to the last published version:
Response:
What Happened:
  1. Draft changes discarded
  2. Reverted to last published state (version 1.0)
  3. All unpublished edits lost

Use Cases

1. Review Process

Example Workflow:
  1. Developer updates task description (creates draft)
  2. Adds code examples (draft v1.2)
  3. Asks manager to review
  4. Manager approves → publish draft
  5. OR manager rejects → discard draft

2. Batch Editing

Make multiple changes without notifying collaborators until ready:

3. Conflict Prevention

Two users editing the same task:
When multiple users create drafts, only one can be published. The second will receive a conflict error and must rebase their changes.

Bypassing the Draft Workflow

Some operations don’t require drafting:

Status Changes

This directly publishes the status change without creating a draft.

Adding Comments

Comments are always immediately visible, no drafting.

Quick Updates

Include publish: true in update requests:
This creates and immediately publishes the draft in one operation.

Querying Drafts

Get Only Published Items

Get Only Drafts

Include Draft Status

Response includes draft information:

Version History

Access previous versions:
Response:

Best Practices

Don’t leave drafts unpublished for extended periods. This can cause sync issues with collaborators.
Use the draft workflow for significant updates that benefit from review. Skip it for minor changes like status updates.
When publish fails due to conflicts, fetch the latest published version, merge changes manually, and republish.
In UI, clearly indicate when viewing a draft vs published version to avoid confusion.

Error Handling

Conflict Error

Resolution:
  1. Fetch latest published version (GET /tasks/{id})
  2. Merge your changes with current state
  3. Create new draft with merged changes
  4. Publish

Next Steps

Managing Tasks Guide

See draft workflow in action

Tasks & Events Model

Understand the data model

API Reference

Explore draft endpoints

Error Handling Guide

Handle conflicts and errors