runs

Creates a new run with the same payload and options as the original run, in the same environment. Send a body to override the payload, metadata, or trigger options for the new run. The body is optional; an empty body replays the run unchanged.

post/api/v1/runs/{runId}/replay

Request

Request body

payloadunknown
payloadType'application/json' | 'application/super+json'

How payload is encoded. Defaults to application/json. With application/super+json, payload must be a SuperJSON string, which keeps types like Date and BigInt. The SDK sends this automatically.

metadataobject

Metadata for the new run. Omit it to reuse the original run's metadata.

queuestring

The name of an existing queue in the environment to run on.

concurrencyKeystring

The concurrency key for the new run.

machine'micro' | 'small-1x' | 'small-2x' | 'medium-1x' | 'medium-2x' | 'large-1x' | 'large-2x'

The machine preset for the new run.

versionstring

Lock the new run to this deployed version, for example 20250101.1. Defaults to the current version.

regionstring

The region to run in. Defaults to the original run's region.

delaystring

Delay the new run, as a duration (1h30m) or an ISO 8601 date.

idempotencyKeystring

An idempotency key for the new run. A repeated request with the same key returns the same run.

idempotencyKeyTTLstring

How long the idempotency key is valid, as a duration (1h).

maxAttemptsinteger

The maximum number of attempts for the new run.

maxDurationnumber

The maximum duration of the new run in seconds.

prioritynumber

Priority offset in seconds. Higher values are dequeued sooner.

Example request

{
  "tags": "user_123456",
  "machine": "small-2x"
}

Response

Successful request

idstring

The ID of the new run.

Changes

    • info

      added optional request body

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the Failed to create new run enum value from the response property for the response status

    • info

      removed the Invalid or missing run ID enum value from the response property for the response status