PATCH
Edit a flow's trigger and enrollment policy

Authorizations

Authorization
string
header
required

A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.

Headers

Idempotency-Key
string
required

A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.

Path Parameters

marketingFlowId
string
required

Body

application/json

Every field is optional and an omitted one keeps its stored value, which is why this is a PATCH. Sending the whole resource would let an omitted reenrollment reset a weekly program to never, an omitted exit_on_event_names remove every early exit, and an omitted trigger_event_name leave an event trigger that can never fire, all with a 200 and nothing visible until the merchant notices their list stopped receiving mail. EDITING A LIVE FLOW IS ALLOWED and changes only who enters it NEXT. The step graph is untouched, because it lives in an immutable version, and every run in flight keeps walking the version it enrolled on. exit_on_event_names is a WHOLE-LIST REPLACE when present, because a bare string carries no identity to patch an element of. Send [] to clear it; omit the key to leave it alone.

name
string

Still unique per store; a clash is 409 name_taken.

trigger_type
enum<string>
Available options:
event,
segment_entry,
manual
trigger_event_name
string
trigger_segment_id
string
reenrollment
enum<string>
Available options:
never,
after_exit,
after_cooldown
reenroll_cooldown_secs
integer
exit_on_event_names
string[]

Response

Success

data
object