---
title: "Rerun agent run"
method: POST
path: "/v1/projects/{project_id}/runs/{run_id}/rerun"
tags: ["runs"]
---

# Rerun agent run

`POST /v1/projects/{project_id}/runs/{run_id}/rerun`

## Request

- Base URL: `https://api.connic.co`
- URL: `https://api.connic.co/v1/projects/{project_id}/runs/{run_id}/rerun`
- Auth: HTTP bearer

Creates a new run of the same agent with the original payload and returns its `run_id`. The new run uses the original run's environment unless `environment_id` is given. Deleted runs cannot be rerun (409).

Required permission: `runs.rerun`.

## Path parameters

- `project_id` string, uuid, required
- `run_id` string, uuid, required

## Query parameters

- `environment_id` string, uuid, nullable: Environment to run in. Defaults to the original run's environment; required when that cannot be determined.

## Response `200`

Successful Response

- PublicRerunResponse
  - `ok` boolean, required: Whether the operation succeeded.
  - `run_id` string, uuid, required: ID of the new run.

## Other responses

- `401`: Missing or invalid API key.
- `403`: The API key lacks the required permission or access to the environment.
- `404`: The resource does not exist in this project.
- `422`: Validation Error
- `429`: Rate limit exceeded.

---

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