Skip to content

Save draft version (or validate-only for import gate)

Requires ADMIN. validateOnly:true runs full graph+effect validation and returns { valid:true } or 422, writing nothing. Otherwise saves/updates the draft version (draft saves validate effect props but not full graph).

projectId
required
string

Project (tenant) identifier. Row-level tenant isolation is enforced on every query.

id
required
string

Automation (journey) identifier.

Media typeapplication/json
object
definition
required

Journey/automation graph definition. Nodes are typed (trigger/action/branch/wait/waitForEvent/timeWindow).

object
nodes
required
Array<object>
>= 1 items
object
key
additional properties
any
key
additional properties
any
validateOnly
boolean
Examplegenerated
json
{
"definition": {
"nodes": [
{}
]
},
"validateOnly": true
}

Draft saved (existing draft updated) or { valid:true } for validateOnly.

Media typeapplication/json
object
valid
boolean
versionId
string
version
integer
status
string

New draft version created.

Media typeapplication/json
object
versionId
string
version
integer
status
string
Example
json
{
"status": "draft"
}

Missing/invalid path input (e.g. projectId) or invalid JSON body.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not authenticated (401 via requireAuthenticated) or insufficient project role (403).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Resource not found (or cross-tenant — same 404).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Param validation, graph validation, or effect props invalid (error in [graph_validation_failed, effect_props_invalid]).

Media typeapplication/json
object
error
required
string
message
string
errors
Array<string>
issues
Array<object>
object
key
additional properties
any
draftId
string
key
additional properties
any
Examplegenerated
json
{
"error": "example",
"message": "example",
"errors": [
"example"
],
"issues": [
{}
],
"draftId": "example"
}