---
title: "Launch a durable script workflow run"
method: POST
path: "/api/script-runs"
tags: ["Script Runs"]
---

# Launch a durable script workflow run

`POST /api/script-runs`

Foundation endpoint for Script Workflows v1. In PR 1 it persists the run and returns its dashboard URL; spawning is added by the supervisor PR.

## Request body

- object
  - `source` string, required
  - `args` unknown
  - `background` boolean
  - `idempotencyKey` string
  - `scriptName` string
  - `requestedByUserId` string

## Response `201`

Script run created

- object
  - `id` string, uuid, required
  - `status` 'running' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'aborted_limit', required
  - `url` string, required

## Other responses

- `400` — Validation or label-lint failure
- `409` — Existing idempotent run returned
- `429` — Script run concurrency cap reached

---

[API](https://skmtc.net/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.net/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/versions/0375890be8c4/schema)
