List versions

GET /api/v1/sequences/{sequenceId}/versions The whole history, newest first. Each version carries version (1, 2, 3…), status (draft, published, archived), publishedAt, and the triggerType / triggerTargetId it carries.

Authorization

Role in the organizationThis endpoint
OWNERAllowed
ADMINAllowed
MEMBERAllowed
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 whose history you read

Example

bash
curl -H "x-api-key: $AGENTMAIL_API_KEY" \
  "https://www.agentsmail.io/api/v1/sequences/$SEQUENCE_ID/versions"

Response

  • 200 OK — the call succeeded.
  • 401 Unauthorized — missing or invalid key, or its owner left the organization.
  • 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

data is an array of versions, newest first.
FieldTypeDescription
successbooleanIndicates if the operation was successful
data[].idstringIdentifier of the version
data[].sequenceIdstringThe sequence it belongs to
data[].versionnumberIts rank, starting at 1
data[].statusstringdraft or published
data[].publishedAtstring \null
data[].triggerTypestringlist_joined or tag_added
data[].triggerTargetIdstringThe list or tag that enrols contacts
data[].createdAt / updatedAtstringISO dates
paginationobject{total, page, limit, totalPages}

Example response

json
{
  "success": true,
  "data": [
    {
      "id": "4d19c0a2",
      "sequenceId": "9b3f2d10",
      "version": 1,
      "status": "subscribed",
      "publishedAt": "2026-08-23T10:22:05.000Z",
      "triggerType": "list_joined",
      "triggerTargetId": "0b7c51e8",
      "createdAt` / `updatedAt": "value"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "limit": 20,
    "totalPages": 1
  }
}