---
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

## Changes

- **2026-08-07** `06cac6a7c5bc` — 4 info
  - added the media type `application/json` for the response with the status `201`
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `409`
  - added the media type `application/json` for the response with the status `429`

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/script-runs/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/e0acd2155cad/schema)
