---
title: "Delete a workflow version"
method: DELETE
path: "/v1/workflow-templates/{id}/versions/{versionId}"
tags: ["Workflows"]
---

# Delete a workflow version

`DELETE /v1/workflow-templates/{id}/versions/{versionId}`

## Request

- Base URL: `https://api.emma.ms/external`
- URL: `https://api.emma.ms/external/v1/workflow-templates/{id}/versions/{versionId}`
- Auth: HTTP bearer

This method deletes a workflow version. The active version cannot be deleted.

A template that has any versions always has exactly one active version, so its last remaining version is by definition the active one and cannot be deleted either — a template can never be left with zero versions this way.

## Path parameters

- `id` integer, required
- `versionId` integer, required

## Response `204`

Workflow version deleted successfully

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden - Access is denied
- `404`: Not found
- `409`: Conflict — the version is active. Activate another version first (restore it, or save the template to create a new active version), then delete this one.
- `500`: Internal server error
- `503`: InternalError
- `504`: Timeout

---

[API](https://skmtc.dev/emma/apis/public-emma-api.md) - [All operations](https://skmtc.dev/emma/apis/public-emma-api/llms.txt) - [OpenAPI document](https://skmtc.dev/emma/apis/public-emma-api/revisions/9e55f0920078?raw)
