Skip to main content

Overview

Creates a new run that is an exact copy of an existing run — same task, same payload, same queue options. Useful for re-running failed tasks without re-supplying the original trigger data.
Authentication with a secret key is required.

Endpoint

POST https://api.trigger.dev/api/v1/runs/{runId}/replay

Path parameters

runId
string
required
The ID of the run to replay, prefixed with run_.

Response

id
string
The ID of the newly created run.

Examples

import { runs } from "@trigger.dev/sdk";

const handle = await runs.replay("run_p4omhh45hgxxnq1re6ovy");
console.log(handle.id); // new run ID

Response example

{
  "id": "run_newrun12345"
}

Build docs developers (and LLMs) love