---
title: "Delete draft script version"
method: DELETE
path: "/api/scripts/{handle}/{host}/{slug}/versions/{versionId}"
---

# Delete draft script version

`DELETE /api/scripts/{handle}/{host}/{slug}/versions/{versionId}`

## Request

- Base URL: `https://reduck.ai`
- URL: `https://reduck.ai/api/scripts/{handle}/{host}/{slug}/versions/{versionId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Discard a draft version.

## Path parameters

- `handle` string, required: The owner a resource is addressed under: "@username" for a personal scope, or a bare slug for a project.
- `host` string, required: The site the script automates, as a hostname.
- `slug` string, required: The script's unique identifier within its host, unique per owner.
- `versionId` string, uuid, required

## Response `204`

No content

## Other responses

- `400`: Invalid request
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `409`: The version is no longer a draft, or the script is archived.

---

[API](https://skmtc.dev/reduck/apis/reduck-api.md) · [All operations](https://skmtc.dev/reduck/apis/reduck-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reduck/apis/reduck-api/revisions/a573b91206d6?raw)
