DELETE /api/v1/sequences/{sequenceId}
Deletes a sequence with every version and every enrollment attached to it. Contacts currently
walking the journey stop where they are; the steps they had not reached never go out.
Authorization
| Role in the organization | This endpoint |
|---|---|
OWNER | Allowed |
ADMIN | Allowed |
MEMBER | Refused — 403 |
Path parameters
| Parameter | Type | Description |
|---|---|---|
sequenceId | string | Required. The sequence to delete |
Example
bash
curl -X DELETE -H "x-api-key: $AGENTMAIL_API_KEY" \
"https://www.agentsmail.io/api/v1/sequences/$SEQUENCE_ID"Response
200 OK— the sequence is gone.401 Unauthorized— missing or invalid key.403 Forbidden— the key's owner is amemberof the organization, not anadmin.404 Not Found— no such sequence, or it belongs to another organization. The API never confirms that an id exists to a caller who has no right to it.
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates if the operation was successful |
data.id | string | The ID of the deleted sequence |
Example response
json
{"success": true, "data": {"id": "9b3f…"}}Notes
- This action is permanent. Versions, steps, wires and enrollment history go with the sequence.
- Pausing is not deleting. A paused sequence still counts against your plan's ceiling — that is the reason to delete one, and the reason to be sure.
- Tags the sequence triggered on or set are untouched: a sequence never owned them.