Skip to content

Migrate a marketing email trigger into a single-node automation

Requires ADMIN. Only single-step marketing triggers convert; transactional triggers are rejected 400. Fails closed (422) when the trigger matchJson cannot be losslessly mapped to an equivalent entry condition. On success the source trigger is disabled and a draft automation is created.

projectId
required
string

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

Media typeapplication/json
object
triggerId
required
string
>= 1 characters
Examplegenerated
json
{
"triggerId": "example"
}

Created draft automation with source-trigger provenance.

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
sourceTriggerId
string
version
integer

Trigger is not marketing category (error=not_marketing) or missing projectId.

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 failed, generated definition invalid, or match not convertible (error in [definition_invalid, match_not_convertible]).

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