# PATCH /sequences/{id}

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

Rename a sequence or change its trigger.

```http
PATCH https://api.sendheron.com/api/v1/sequences/{id}
Authorization: Bearer <YOUR_API_KEY>
```

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

**Success status:** `200`

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

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | uuid | yes | Sequence UUID. |

**Body parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no | New 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.cannotUpdateActiveSequence`: the sequence is ACTIVE. Pause it first.
- `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.

> Only DRAFT and PAUSED sequences can be edited; an ACTIVE one is refused with 400 `sequences.cannotUpdateActiveSequence`, so pause it first. The trigger set here is what auto-enrolment reads once the sequence is active. It does not rewrite the `TRIGGER` step of the graph, which is what the builder shows, so after changing it here write the graph as well, or set the trigger through `PUT /sequences/{id}/graph` in the first place.


---

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