---
ai:
  exclude: true
search:
  tags:
    - version
    - POST
seo:
  description: >-
    Delete a project version, removed… Reference for the POST
    /api/2/version/{id}/removeAndSwap endpoint in the Jira Software Data Center
    REST API Reference.
sidebar:
  label: Delete version and replace values
  badge: POST
title: Delete version and replace values
type: openapi-operation
---
Delete a project version, removed values will be replaced with ones specified by the parameters.

`POST /api/2/version/{id}/removeAndSwap`

**Request body** (`application/json`, required)

JSON containing parameters to replace the deleted version with

- `customFieldReplacementList` (CustomFieldReplacement[])
- `moveAffectedIssuesTo` (integer<int64>)
- `moveFixIssuesTo` (integer<int64>)

Request body example:

```json
{
  "customFieldReplacementList": [
    {
      "customFieldId": 2002,
      "moveTo": 10003
    }
  ],
  "moveAffectedIssuesTo": 10002,
  "moveFixIssuesTo": 10001
}
```

**Responses**

- `204` — Returned if the version is successfully deleted.
- `400` — Returned if the replacement didn't succeed
- `404` — Returned if the version does not exist or the currently authenticated user does not have permission to view it.
