Skip to content

Create automation (definition + trigger + entry/exit) in one request

Requires ADMIN project role. Validates graph + effect props before writing.

projectId
required
string

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

Media typeapplication/json
object
name
required
string
>= 1 characters <= 120 characters
description
string | null
<= 500 characters
triggerEventName
required
string
>= 1 characters <= 120 characters
entryConditionJson
object | null
exitConditionJson
object | null
reEntryMode
string
default: once
Allowed values: once every_rematch interval
reEntryIntervalSeconds

Required when reEntryMode=interval.

integer
>= 1
maxConcurrentPerUser
integer
default: 1 >= 1
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

Created automation (status=draft) plus version=1 and field warnings.

Media typeapplication/json
object
automation

A journey row surfaced as an automation.

object
id
string
projectId
string
name
string
description
string | null
triggerEventName
string
maxConcurrentPerUser
integer
status
string
activeVersionId
string | null
entryConditionJson
string | null
reEntryMode
string
Allowed values: once every_rematch interval
reEntryIntervalSeconds
integer | null
exitConditionJson
string | null
createdAt
string
updatedAt
string
key
additional properties
any
version
integer
warnings
Array<string>

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"
}

Zod validation or definition/graph validation failed.

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"
}