---
title: "Delete one superseded version"
method: DELETE
path: "/api/v1/presets/{slug}/versions/{version}"
tags: ["Preset Management"]
---

# Delete one superseded version

`DELETE /api/v1/presets/{slug}/versions/{version}`

## Request

- Base URL: `https://api.imagestep.dev`
- URL: `https://api.imagestep.dev/api/v1/presets/{slug}/versions/{version}`
- Auth: API key in header `Authorization`

Drops `slug@version` from the preset's history. After it, that reference is `404
preset_not_found` for good — nothing else changes: the preset keeps running whatever version it
ran, the numbering is untouched (the next version is always `current + 1`, so a deleted number is
never reissued), and a job that ran this version keeps its own copy of what it ran.

USE THIS WHEN:
- A preset is at its version ceiling (422 resource_limit_exceeded on PUT) and you know which earlier versions nothing pins
- A stored version carries a prompt you want gone

DO NOT USE WHEN:
- Anything might still call `slug@version` — a pinned reference stops resolving, and that is the whole cost of this call

To move what an UNPINNED call runs, PUT the old steps as a new version instead.

## Path parameters

- `slug` string, required
- `version` integer, required

## Headers

- `Idempotency-Key` string

## Response `204`

Deleted; no body

## Other responses

- `400`: - `invalid_param` on `version` — the current version (save the next one first, or delete the whole preset), or a number below 1 - `invalid_param` on `slug` — the slug carries an `@version` of its own
- `403`: `forbidden` — any version of a built-in preset
- `404`: `preset_not_found` — no such preset, or no such version on record (never saved, or already deleted)
- `409`: Conflict — `error.code` is `idempotency_key_reuse` (the key already means a different request) or `request_in_progress` (the first request under this key has not settled yet; retryable).
- `429`: Rate limited — `error.code` is `rate_limited` and `retryable` is true. `Retry-After` says how many seconds to wait.

---

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