---
title: "Create a sequence"
method: POST
path: "/sequences"
tags: ["Sequences"]
---

# Create a sequence

`POST /sequences`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/sequences`
- Auth: API key in header `Authorization`

Creates a timed email series as a draft, with its steps in send order. Each step waits its `delay` after the previous send (after enrolling, for the first). Nothing sends until you activate it with `POST /sequences/{id}/activate`.

Pick the `trigger` that enrolls people: `contact.tag_added` with a form's tag is the newsletter welcome series (forms apply their tags after double opt-in), `lead.created` catches every new lead, `order.paid` follows a purchase, `contact.field_changed` with a contact `field` (and optional `value`) follows a field such as a plan interest, and `manual` enrolls only through `POST /sequences/{sequence_id}/enrollments`. Set `exit` rules for when people leave early; a sales sequence should set `exit.on_purchase`.

Sending one email to many people now? Use `POST /broadcasts`.

## Headers

- `Idempotency-Key` string

## Request body

- EmailSequenceRequest
  - `name` string, required: Internal name, shown in the dashboard.
  - `trigger` object
    - `event` union, required: What enrolls people. `manual` enrolls only through `POST /sequences/{sequence_id}/enrollments`. A custom event your site reports (`custom.lease.signed`, see `POST /events`) enrolls the event's contact.
      - 'manual' | 'lead.created' | 'contact.tag_added' | 'contact.field_changed' | 'order.paid'
      - string
    - `tag_id` string, nullable: `contact.tag_added` only: the tag (`tag_...`) that enrolls. Form signups apply their tags after double opt-in, so a form's tag is the newsletter trigger.
    - `product_ids` string[]: `order.paid` only: enroll buyers of these products (`prod_...`). Empty means any product.
    - `field` string, nullable: `contact.field_changed` only: the key of the contact field (GET /contacts/fields) whose change enrolls the contact.
    - `value` union: `contact.field_changed` only: enroll only when the field becomes this value; a `select` or `multi_select` value is a choice key, and a `multi_select` matches when the choice is added. Omit it to enroll whenever the field gets any value. Clearing a field enrolls no one.
      - string
      - number
      - boolean
  - `exit` object
    - `on_purchase` 'none' | 'any' | 'products': Stop when the person pays for an order placed after enrolling: `any` order, only orders containing `product_ids`, or `none`.
    - `product_ids` string[]: Products (`prod_...`) that count when `on_purchase` is `products`.
    - `tag_ids` string[]: Stop when the person gets any of these tags (`tag_...`).
    - `on_reply` boolean: Stop when the person replies. Replies are only seen when they reach a Crevio inbox, so with this on and no `reply_to`, replies go to the account's inbox.
  - `send_days` string[]: Weekdays a step may go out, in the business's time zone. Defaults to every day.
  - `from` string, nullable: Sender address on the account's verified domain. Defaults to the account's sending address.
  - `reply_to` string, nullable: Where replies go. Defaults to the account's Crevio inbox when `exit.on_reply` is on, otherwise the support email.
  - `styled` boolean: Wrap each email in the branded layout. Defaults to true.
  - `metadata` object: Caller-owned key/value pairs.
  - `steps` object[]: The emails in send order. Edit them later through the step endpoints.
    - `subject` string, required: Takes the same variables as `body`.
    - `preview_text` string, nullable: Inbox preview line. Takes the same variables as `body`.
    - `body` string, required: Email body (HTML or plain text). Variables, filled per recipient: {{customer.first_name}}, {{customer.last_name}}, {{customer.email}}, {{business.name}}, {{product.name}}, {{order.product_names}}, {{tag.name}}, {{form.name}}, {{customer.fields.<key>}}. `product.*` is the product whose purchase enrolled them (`order.paid` sequences only), `tag.name` the tag that enrolled them (`tag_added`), `form.name` the form a new lead came through (`lead_created`, empty for leads from elsewhere). `customer.fields.<key>` reads `<key>` from the contact's `metadata` when the email is sent; the key takes letters, digits and underscores. A blank value renders as nothing, or as the default in `{{ customer.first_name | default: "there" }}`. Any other `{{ }}` is rejected.
    - `delay` object: Wait after the previous step's send (after enrolling, for the first step).
      - `amount` integer, required: How many `unit`s to wait. `0` sends right away.
      - `unit` 'minutes' | 'hours' | 'days' | 'weeks', required

## Response `201`

The created sequence

- EmailSequence
  - `object` 'sequence', required
  - `id` string, required
  - `name` string, required
  - `status` 'draft' | 'active' | 'paused', required
  - `trigger` object, required
    - `event` union, required: What enrolls people. `manual` enrolls only through `POST /sequences/{sequence_id}/enrollments`. A custom event your site reports (`custom.lease.signed`, see `POST /events`) enrolls the event's contact.
      - 'manual' | 'lead.created' | 'contact.tag_added' | 'contact.field_changed' | 'order.paid'
      - string
    - `tag_id` string, nullable, required: `contact.tag_added` only: the tag (`tag_...`) that enrolls. Form signups apply their tags after double opt-in, so a form's tag is the newsletter trigger.
    - `product_ids` string[], required: `order.paid` only: enroll buyers of these products (`prod_...`). Empty means any product.
    - `field` string, nullable, required: `contact.field_changed` only: the key of the contact field (GET /contacts/fields) whose change enrolls the contact.
    - `value` union, required: `contact.field_changed` only: enroll only when the field becomes this value; a `select` or `multi_select` value is a choice key, and a `multi_select` matches when the choice is added. Omit it to enroll whenever the field gets any value. Clearing a field enrolls no one.
      - string
      - number
      - boolean
  - `exit` object, required
    - `on_purchase` 'none' | 'any' | 'products', required: Stop when the person pays for an order placed after enrolling: `any` order, only orders containing `product_ids`, or `none`.
    - `product_ids` string[], required: Products (`prod_...`) that count when `on_purchase` is `products`.
    - `tag_ids` string[], required: Stop when the person gets any of these tags (`tag_...`).
    - `on_reply` boolean, required: Stop when the person replies. Replies are only seen when they reach a Crevio inbox, so with this on and no `reply_to`, replies go to the account's inbox.
  - `send_days` string[], required: Weekdays a step may go out, in the business's time zone. A step due on another day waits for the next allowed day at the same local time.
  - `from` string, nullable, required
  - `reply_to` string, nullable, required
  - `styled` boolean, required
  - `steps` EmailSequenceStep[], required: Live steps in send order.
    - `object` 'sequence_step', required
    - `id` string, required
    - `sequence` string, required
    - `position` integer, required
    - `subject` string, required
    - `preview_text` string, nullable, required
    - `body` string, required
    - `delay` object, required: Wait after the previous step's send (after enrolling, for the first step).
      - `amount` integer, required: How many `unit`s to wait. `0` sends right away.
      - `unit` 'minutes' | 'hours' | 'days' | 'weeks', required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `metadata` object, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Forbidden
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account's team keys share another. Retry after the number of seconds in `Retry-After`.
- `500`: Internal server error

## Changes

- **2026-12-04** `6be3ac8d9549`: 4 breaking, 10 info
  - removed the enum value `contact.tag_added` of the request property `trigger/event`
  - removed the enum value `lead.created` of the request property `trigger/event`
  - removed the enum value `manual` of the request property `trigger/event`
  - removed the enum value `order.paid` of the request property `trigger/event`
  - …10 more
- **2026-11-15** `56c22ab9b282`: 6 warning
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `400`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `401`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `403`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `422`
  - …2 more
- **2026-11-14** `a37321cbfdd6`: 1 breaking, 1 warning, 2 info
  - removed the enum value `customer.tag_added` of the request property `trigger/event`
  - added the new `contact.tag_added` enum value to the `trigger/event` response property for the response status `201`
  - added the new `contact.tag_added` enum value to the request property `trigger/event`
  - removed the `customer.tag_added` enum value from the `trigger/event` response property for the response status `201`
- **2026-10-27** `ad9fd6476d85`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/crevio/apis/crevio-api-v1/changes/sequences/post.md)

---

[API](https://skmtc.dev/crevio/apis/crevio-api-v1.md) - [All operations](https://skmtc.dev/crevio/apis/crevio-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/crevio/apis/crevio-api-v1/revisions/ccbd8fcbd6d7?raw)
