---
title: "Delete a whole script."
method: DELETE
path: "/scripts/{scriptUploadId}"
tags: ["Scripts"]
---

# Delete a whole script.

`DELETE /scripts/{scriptUploadId}`

## Request

- Base URL: `https://docs.sleeperhit.studio/api/v1`
- URL: `https://docs.sleeperhit.studio/api/v1/scripts/{scriptUploadId}`
- Auth: HTTP bearer

Permanently deletes a script: every version and everything scoped to them (character avatars, table reads and their share links, coverage reports, conversations, drafts), through the same core as the Writers Lab's delete. Requires `confirmed: true` (`?confirmed=true` or a JSON body). Refused with 409 `script_in_use`, `details.uses` naming each, while a published or scheduled release, a running job, a season-run slot, a pitch deck or a trailer still depends on it; 404 `script_not_found` for a script that is not yours. Banked audio stays in My Library, and the plan, job and artifact rows that generated it are kept. Irreversible. Free. Scope: `story:write`.

## Query parameters

- `confirmed` boolean

## Response `200`

Deleted.

- object
  - `deleted` true, required
  - `scriptId` string, required
  - `versions` integer, required: How many versions went with it.

## Other responses

- `400`: Request payload failed validation. The error message names the offending field.
- `401`: Missing, malformed, revoked, or expired API key.
- `403`: API key is valid but lacks the scope, is blocked by IP allowlist, or the account is disabled.
- `404`: Not your script (`script_not_found`).
- `409`: Something live still depends on the script (`script_in_use`, `details.uses`).
- `429`: Rate limit for this API key + IP + route family was exceeded.
- `500`: The API failed unexpectedly. Safe to retry with the same Idempotency-Key.

---

[API](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api.md) · [All operations](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sleeperhit/apis/sleeper-hit-studio-story-api/revisions/4534f5d25540?raw)
