Delete a sequence

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 organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERRefused — 403
A key carries the role its creator holds in this organization — never a role on AgentsMail itself. See API keys.

Path parameters

ParameterTypeDescription
sequenceIdstringRequired. 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 a member of the organization, not an admin.
  • 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

FieldTypeDescription
successbooleanIndicates if the operation was successful
data.idstringThe 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.