[relaybell docs › Automation › Drip sequences](https://relaybell.com/docs/sequences) · [All docs as Markdown](https://relaybell.com/docs.md) · [Index for AI assistants](https://relaybell.com/llms.txt)

# Drip sequences

> Drip sequences (journeys): subscribe and event triggers, message and branch steps, editing rules.

`/api/v1/sequences` — multi-step journeys (Automations → New automation → **Welcome series** or **Custom journey** in the dashboard). A subscriber enters when they subscribe (`"trigger": "subscribe"`, the default) or when they send an event (`"trigger": "event"` with `triggerEvent`), then moves through the steps in order; `cancelOn` takes them out when that event arrives (for example when they buy).

```http
POST /api/v1/sequences
{ "name": "Welcome series", "trigger": "subscribe", "cancelOn": "purchase",
  "steps": [ { "delaySeconds": 0, "title": "Welcome 👋", "url": "https://shop.example" },
             { "delaySeconds": 86400, "title": "Here's how to start" },
             { "type": "branch", "condition": { "field": "tag:plan", "op": "eq", "value": "free" } },
             { "delaySeconds": 604800, "title": "A little something for you" } ] }

POST /api/v1/sequences
{ "name": "After first order", "trigger": "event", "triggerEvent": "purchase",
  "steps": [ { "delaySeconds": 172800, "title": "How is your {product|order}?" } ] }
```

| Field | Description |
| --- | --- |
| `trigger`, `triggerEvent` | `"subscribe"` or `"event"`; with `"event"`, `triggerEvent` is required (`400 trigger_event_required`). |
| `steps` \* | At least one (`400 at_least_one_step_required`). A **message** step is `{ delaySeconds, title, body, url, icon }`; one without a `title` is dropped. A **branch** step is `{ type: "branch", delaySeconds, condition: { field, op, value } }`: the subscriber goes on only if they match the condition (the [segment rule format](https://relaybell.com/docs/segments-topics#segments): `country`, `language`, `url`, `external_id`, `tag:KEY`), otherwise their journey ends there. |
| `delaySeconds` | Per step: the wait after the previous step (for the first step, after entering). |
| `cancelOn`, `name`, `enabled` | As for automations. `enabled` defaults to `true`. |

A subscriber enters each journey **once**, ever — a second subscribe or trigger event doesn't start it again. Message-step merge tags take their values from the event that started the journey (a subscribe-triggered one has none, so use fallbacks). Journey pushes follow your quiet hours and frequency cap.

**Editing:** `PUT /api/v1/sequences/:id` always replaces `name`, `enabled`, `trigger` and `cancelOn` (send them all); `steps` are changed only when you send them. `GET /api/v1/sequences/:id` returns the steps with their `id`s, plus `enrollments` `{ active, completed, canceled }` and 30-day numbers per step. While nobody is in the journey you can reorder, add and remove steps (send a step's `id` to keep it and its numbers). While someone *is* in it, send every existing step back with its `id`, in the same order and with the same type — you may change its text, delay or condition — and only add new steps (without an `id`) at the end; anything else answers `409 structural_change_requires_no_active_enrollments`.
