Skip to main content
Replay re-runs a prior automation run with the same trigger payload and mode against the automation’s current saved draft. Workflow runs are terminal, so a replay always mints one brand-new run — it never resumes the old one. This matches the dashboard’s “retry” behavior. Requires the automations scope; idempotency is supported.

Replay a run

curl -X POST "https://brew.new/api/v1/automation/runs" \
  -H "Authorization: Bearer $BREW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: replay-run_abc-1" \
  -d '{ "automationRunId": "run_abc", "mode": "replay" }'
The response is 202 { status: 'replay_started', automationRunIds: [newRunId], receivedAt, warnings? }. An unknown or cross-brand automationRunId returns 404 AUTOMATION_RUN_NOT_FOUND.

Find a run to replay

List runs and pick one (e.g. a failed run):
const { runs } = await brew.automationRuns.list({ status: 'failed', limit: 20 })
for (const run of runs) {
  await brew.automationRuns.replay({ automationRunId: run.automationRunId })
}
PATCH /v1/automation/runs (cancel an in-flight run) is not implemented yet and returns 501 NOT_IMPLEMENTED. Replay is fully supported.

See also

Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

Search Documentation

Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.

ChatGPT/Claude Integration

Click “Open in ChatGPT” at the top right of any page to analyze documentation with ChatGPT or Claude for deeper insights.