Overview
The Upsert Workflow Draft endpoint stages changes to a workflow without touching the live (published) version. Use it to iterate on a workflow’s definition, name, or description; the edits only take effect after you promote them (for example by calling Update Workflow with the draft definition andstatus: "PUBLISHED").
Each workflow has at most one draft at a time. Calling this endpoint again overwrites any existing draft.
Authentication
Requires a valid API key. No special permission scope is needed beyond a valid key.Key Features
- Safe Iteration: Edit a workflow without affecting the running version
- Single Draft per Workflow: Upserts overwrite any existing draft
- No Credit Cost: This endpoint is free to use
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique workflow ID |
Request Body
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | - | Draft name (1-255 characters) |
description | string | No | "" | Free-form draft description |
workflow | object | Yes | - | Draft workflow definition. See Workflow Definition Shape |
Example Response
Response Fields
| Field | Type | Description |
|---|---|---|
message | string | Human-readable status message |
success | boolean | true on success |
data | object | The draft (see below) |
data object contains:
| Field | Type | Description |
|---|---|---|
id | string | Unique draft identifier |
workflow_id | string | Parent workflow ID |
name | string | Draft name |
description | string | Draft description |
workflow | object | Draft workflow definition (JSON) |
last_modified | string | ISO 8601 last modification timestamp |
is_synced | boolean | Whether the draft matches the live workflow |
created | string | ISO 8601 creation timestamp |
Credit Usage
This endpoint is free and does not consume credits.Related Endpoints
- Get Workflow Draft to read the current draft
- Delete Workflow Draft to discard the draft
- Update Workflow to promote draft changes to the live workflow
- Test Workflow to dry-run the workflow with sample data