Update an automation

Change a draft's name, trigger, contact book, segment or steps.

PATCHhttps://app.usenotix.dev/api/v1/automations/{id}

Needs a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.

Change a draft's name, trigger, contact book, segment or steps. Send only the fields you want to change; contactBookId or segmentId set to null clears it. Only a DRAFT automation is changed through the API; any other answers 409 CONFLICT. Pause and edit a live automation in the dashboard.

Steps

steps is the whole list, at most 50. Step types:

TypeWhat it doesFields
EMAILSends one emailfrom, subject, optional previewText, content, replyTo, variables (the template's blanks)
WAITDelayseconds, 1 minute to 30 days
WAIT_FOR_EVENTWaits for your app to send an eventeventName, timeoutSeconds (up to 30 days), optional filter
CONDITIONIf / elsecondition: a rule or an and / or group
UPDATE_CONTACTChanges the contactfirstName, lastName, unsubscribe: true, properties
ADD_TO_SEGMENTPuts the person in a segmentsegmentId

A rule is { "type": "rule", "field": "event.plan", "operator": "equals", "value": "pro" }. Operators: equals, not_equals, gt, gte, lt, lte, contains, starts_with, ends_with, exists, is_empty. A field or a { "var": "..." } value reads event.* (the event that started the run), contact.* or wait_events.<event name>.*.

connections say which step follows which: { "from": "trigger" | stepId, "to": stepId, "type": "default" }. An If / else leaves by yes and no, a Wait for event by received and timeout; a path with nothing after it ends the run. No path may loop back. Send connections with steps, giving every step an id; leave them out and the steps run one after another, in order. Keep the id of a step you already have so people in the automation stay on it.

content is a Notix editor document (JSON, as a string), checked the way the dashboard's editor checks it: a javascript: or data: link, an unknown node or a document deeper than 64 levels answers 400. Raw HTML is not accepted. To use a template, copy it into a step with POST /v1/automations/{id}/steps/{stepId}/template.

Who can call it

A full access key created by a team admin, as on the dashboard. Every refusal is 403:

CodeWhy
SCOPE_DENIEDThe key is not a full access key (send-only, read-only or live AI).
FORBIDDENThe key was made by a team member without admin rights, or before Notix recorded who made each key. Create a new key as a team admin.
DOMAIN_PINNEDThe key is limited to one domain and an email step, or the sender, is on another.

A key limited to one domain sees only automations whose every email step sends from its domain; any other automation answers 404.

Path parameters

idstringrequired

Body parameters

namestring

At most 255 characters.

triggerTypestring

CONTACT_ADDED: people join when they are added to contactBookId. API: your app enrols each person. EVENT: your app sends triggerEvent with POST /v1/events.

One of CONTACT_ADDED, API, EVENT.

triggerEventstring

The event an EVENT automation starts on.

Can be null.

contactBookIdstring

Can be null.

segmentIdstring

Can be null.

exitWhenLeavesSegmentboolean
stepsobject[]

The journey's steps in order, at most 50. Replaces every step.

connectionsobject[]

Which step follows which. Send it with steps, and give every step an id so connections can name it. Leave it out and the steps run one after another, in order. from is a step id or trigger.

connections[].fromstringrequired

A step id, or trigger.

At most 64 characters.

connections[].tostringrequired

At most 64 characters.

connections[].typestring

One of default, yes, no, received, timeout. Default "default".

Headers

Authorizationstringrequired

Bearer followed by your API key.

Errors

400

The body is not valid.

403

`SCOPE_DENIED`: the key is not a full access key (send-only, read-only or live AI). `FORBIDDEN`: the key was made by a team member without admin rights, or before Notix recorded who made each key. `DOMAIN_PINNED`: the key is limited to one domain and an email would send from another.

404

No journey with this id for the calling team (or, for a pinned key, on its domain).

409

The journey is not a draft. The API changes and activates drafts only.

429

The team changed journeys 60 times in the last minute.

Every error has the same shape. See all error codes.

curl -X PATCH "https://app.usenotix.dev/api/v1/automations/<id>" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Welcome series",
  "triggerType": "CONTACT_ADDED",
  "triggerEvent": "payment.failed",
  "contactBookId": "cm1x8f3k20001qz7v5b9d2e4a",
  "segmentId": "cm1x8f3k20001qz7v5b9d2e4a",
  "exitWhenLeavesSegment": true,
  "steps": [
    {
      "type": "EMAIL",
      "from": "Acme <hello@acme.com>",
      "subject": "Your receipt for order 4471"
    }
  ],
  "connections": [
    {
      "from": "trigger",
      "to": "stp_a1b2c3d4e5f6"
    }
  ]
}'
Response200
{
  "id": "cly1jrn8x0000abcd1234",
  "name": "Welcome series",
  "status": "ACTIVE",
  "triggerType": "CONTACT_ADDED",
  "contactBookId": "cly1book0000abcd1234",
  "segmentId": "cly1seg00000abcd1234",
  "exitWhenLeavesSegment": false,
  "triggerEvent": "payment.failed",
  "steps": [
    {
      "id": "cm1x8f3k20001qz7v5b9d2e4a",
      "type": "EMAIL",
      "from": "Acme <receipts@acme.com>",
      "subject": "Your receipt for order 4471"
    }
  ],
  "connections": [
    {
      "from": "trigger",
      "to": "stp_a1b2c3d4e5f6"
    }
  ],
  "copiedFromId": "cm1x8f3k20001qz7v5b9d2e4a",
  "stats": {
    "enrolled": 1,
    "active": 1,
    "completed": 1,
    "exited": 1,
    "failed": 1,
    "sentByStep": {
      "stp_abc123": 12
    }
  },
  "createdAt": "2026-10-01T09:00:00Z",
  "updatedAt": "2026-10-01T09:00:00Z"
}
Open in ClaudeOpen in ChatGPT