# Archive a Version Value

Use the REST API to archive a value in a version bundle. Version bundle values are represented by `VersionBundleElement` entities.

Archiving a value updates the shared version bundle. This can affect every custom field that uses this bundle.

For details about version bundles, see [Version Bundles](resource-api-admin-customFieldSettings-bundles-version.html).

## Summary

When you have the required IDs, update the version value by sending a `POST` request to this endpoint:

```
/api/admin/customFieldSettings/bundles/version/{bundleID}/values/{valueID}?fields={fields}
```

## Step-by-Step

Procedure: To archive a version value

1. Get the list of version bundles and their values.

```CURL
curl -X GET 'https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/version?fields=id,name,values(id,name,archived,released)' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YouTrack_token>' \
-H 'Content-Type: application/json'
```

In the response, locate the bundle and value that you want to archive. This example uses the `Affected versions` bundle with the entity ID `97-4` and the `2025.3` version value with the entity ID `133-12`.

```JSON
[
    {
        "values": [
            {
                "name": "2025.3",
                "archived": false,
                "released": true,
                "id": "133-12",
                "$type": "VersionBundleElement"
            },
            {
                "name": "2026.1",
                "archived": false,
                "released": false,
                "id": "133-19",
                "$type": "VersionBundleElement"
            }
        ],
        "name": "Affected versions",
        "id": "97-4",
        "$type": "VersionBundle"
    }
]
```

2. Archive the version value by setting its `archived` attribute to `true`.

```CURL
curl -X POST 'https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/version/97-4/values/133-12?fields=id,name,archived,released' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YouTrack_token>' \
-H 'Content-Type: application/json' \
-d '{"archived": true}'
```

If the request is successful, the response contains the archived version value.

```JSON
{
    "name": "2025.3",
    "archived": true,
    "released": true,
    "id": "133-12",
    "$type": "VersionBundleElement"
}
```

As a result, the version value is archived in the version bundle.

