---
title: "Versions"
description: "Every version that was published, newest first, each with the definition it froze. Restoring one copies it back into the draft."
url: "https://openemail.uk/docs/api/automations/versions"
area: "API"
category: "Mailbox"
---

# Versions

Every version that was published, newest first, each with the definition it froze. Restoring one copies it back into the draft.

`GET /automations/{id}/versions`

**Also documents:** `POST /automations/{id}/versions/{version}/restore`

## GET /automations/{id}/versions

Every version that was published, newest first, each with the definition it froze. Restoring one copies it back into the draft.

## Example

Reading needs `automations:read` and restoring needs `automations:write`.

**curl**

```
curl "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/versions" -H "$AUTH"
curl -X POST "$OE/automations/aut_7c2e9a1f4b8d30c65e1a9f27/versions/1/restore" -H "$AUTH"
```

**Response**

```
{
  "object": "list",
  "data": [
    {
      "object": "automation_version",
      "id": "auv_4e7a2c9d1f6b38e05a2d7c91",
      "automationId": "aut_7c2e9a1f4b8d30c65e1a9f27",
      "version": 2,
      "definition": { "trigger": { "kind": "audience_joined", "…": "…" }, "entry": "welcome", "steps": ["…"] },
      "current": true,
      "createdBy": "q7Vd3kX9mT2pLw8RzN4bYc6HfJ1sGa5E",
      "createdAt": "2026-10-02T09:14:00.000Z"
    }
  ]
}
```

> `current` marks the version that is running.

> Restoring changes only the draft and answers with the whole automation. Publish to make the restored definition run.

## Reference

- [`GET /automations/{id}/versions`](https://openemail.uk/docs/api/reference/automations#get-automations-id-versions): full reference
- [`POST /automations/{id}/versions/{version}/restore`](https://openemail.uk/docs/api/reference/automations#post-automations-id-versions-version-restore): full reference
