# POST /sequences

Part of the SendHeron REST API. Base URL: `https://api.sendheron.com/api/v1`

Create a sequence.

```http
POST https://api.sendheron.com/api/v1/sequences
Authorization: Bearer <YOUR_API_KEY>
```

**Required scopes:** `sequences:write`

**Success status:** `201`

**Rate limit:** 100/min per key, counted against the organization's WRITE ceiling (400/min).

**Body parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Sequence name, unique within the workspace. |
| `triggerType` | MANUAL \| CONTACT_CREATED \| LIST_ADDED \| TAG_ADDED \| EVENT \| WEBHOOK | no | What enrols contacts on its own once the sequence is active. `MANUAL` means only explicit enrollments (`POST /contacts/{id}/sequences/{seqId}/enroll`, the bulk route, or the dashboard). Optional on a draft: the graph's `TRIGGER` step carries the same information, and a graph write whose `TRIGGER` step is configured updates this to match, so the usual path is to leave it out here and set it in `PUT /sequences/{id}/graph`. |
| `triggerConfig` | object | no | Keys depend on `triggerType`, and a key the trigger does not read is refused rather than stored: `tagId` (UUID of a tag in this workspace) for `TAG_ADDED`, `listId` (UUID) for `LIST_ADDED`, `eventName` for `EVENT`, an optional `source` filter for `CONTACT_CREATED` (`MANUAL`, `IMPORT`, `API`, `FORM` or `SYNC`). Whether the trigger is complete is checked at activation, so a draft may omit them. |

**Endpoint-specific errors** (beyond the shared error set):

- `400`: `sequences.invalidStepConfig`: a `triggerConfig` key the trigger type does not read, or a value it does not take, such as a `source` filter that is not a contact source. The `description` says which.
- `409`: A sequence with this name already exists in the workspace.

> Creates an empty sequence in DRAFT. Give it steps and edges with `PUT /sequences/{id}/graph`, then switch it on with `PATCH /sequences/{id}/status`; until then it enrols nobody and sends nothing. The trigger is optional here because the graph carries it too: a `TRIGGER` step with a configured trigger written through the graph route updates the sequence to match, and activation refuses a sequence whose trigger is incomplete.


---

Rate limits: 100/min per key, counted against the organization's WRITE ceiling (400/min). Both windows are one minute.
