PATCH /api/v1/sequences/{sequenceId}
Renames the sequence, activates it or pauses it. Send one field, or both.
| Condition | Answer |
|---|---|
| body carries neither field | 400 — nothing to change |
status is anything else | 400 — active and paused are the only two |
active with no published version | 400 — publish first, an "active" sequence with nothing published would enrol nobody |
Authorization
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | no | 1 to 100 characters |
status | string | no | active or paused |
Example
bash
curl -X PATCH -H "x-api-key: $AGENTMAIL_API_KEY" -H "content-type: application/json" \
-d '{"status":"active"}' \
"https://www.agentsmail.io/api/v1/sequences/$SEQUENCE_ID"Response
200 OK— the call succeeded.401 Unauthorized— missing or invalid key, or its owner left the organization.403 Forbidden— the key's owner is amemberof the organization, not anadmin.404 Not Found— no such resource, or it belongs to another organization. The API never confirms that an id exists to a caller who has no right to it.429 Too Many Requests— over 120 requests in a minute for this key.
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data.id | string | Unique identifier for the sequence |
data.name | string | Its name |
data.status | string | active or paused |
data.publishedVersionId | string | null |
data.createdAt | string | ISO creation date |
data.updatedAt | string | ISO date of the last change |
Example response
json
{
"success": true,
"data": {
"id": "4d19c0a2",
"name": "Newsletter",
"status": "subscribed",
"publishedVersionId": "c41a7e55",
"createdAt": "2026-08-23T10:22:05.000Z",
"updatedAt": "2026-08-23T10:22:05.000Z"
}
}