---
title: "Restart contacts from the beginning of the flow"
method: POST
path: "/automations/{id}/restart"
tags: ["Automations"]
---

# Restart contacts from the beginning of the flow

`POST /automations/{id}/restart`

## Request

- Base URL: `https://sending.dev/api/v1`
- URL: `https://sending.dev/api/v1/automations/{id}/restart`
- Auth: HTTP bearer

Ends the run in progress and rewrites the contacts onto the version published today.

Use it **only** for structural errors. Enrollment pins the version, the DAG travels inside the workflow and one enrollment per contact prevents re-entering: whoever entered on a version with an extra node or a wrong branch cannot be reached in any other way. A **text** error does not need it: message content is re-read from the current version at every send, so a PATCH of the journey is enough.

**It is destructive**: the contact starts over and will see again the emails already received, which is why `confirm: true` is mandatory. The old run is marked as superseded and not deleted, so sent messages and the step log stay readable. Works only on `active` automations (409 on drafts and paused automations) and also answers 409 if none of the given contacts is inside the flow. Required scope: `automations:write`.

## Path parameters

- `id` string, required: Automation ID.

## Request body

- AutomationRestartRequest
  - `contactIds` string[], required
  - `confirm` true, required: Explicit confirmation: contacts will see again the emails already received.

## Response `202`

Restart queued.

- object
  - `id` string, uuid, required
  - `queued` boolean, required
  - `contacts` integer, required: Contacts found inside the flow, which will restart.
  - `notEnrolled` integer, required: Given but never entered in this automation.

## Other responses

- `401`: Missing or invalid token.
- `403`: Insufficient scope.
- `404`: Resource not found.
- `409`: State conflict (e.g. duplicate).
- `422`: Invalid input.

---

[API](https://skmtc.dev/sending/apis/sending-dev-api.md) · [All operations](https://skmtc.dev/sending/apis/sending-dev-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sending/apis/sending-dev-api/revisions/9fe78d2918a1?raw)
