---
title: "Rerun a workflow"
method: POST
path: "/workflow/{id}/rerun"
tags: ["Workflow"]
---

# Rerun a workflow

`POST /workflow/{id}/rerun`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/workflow/{id}/rerun`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Reruns a workflow.

## Path parameters

- `id` string, uuid, required

## Request body

- object: The information you can supply when rerunning a workflow.
  - `enable_ssh` boolean: Whether to enable SSH access for the triggering user on the newly-rerun job. Requires the jobs parameter to be used and so is mutually exclusive with the from_failed parameter.
  - `from_failed` boolean: Whether to rerun the workflow from the failed job. Mutually exclusive with the jobs parameter.
  - `jobs` string[]: A list of job IDs to rerun.
  - `sparse_tree` boolean: Completes rerun using sparse trees logic, an optimization for workflows that have disconnected subgraphs. Requires jobs parameter and so is mutually exclusive with the from_failed parameter.

## Response `202`

A confirmation message.

- object: A response to rerunning a workflow
  - `workflow_id` string, uuid, required: The ID of the newly-created workflow.

## Other responses

- `default`: Error response.

---

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