Developer Portal for YouTrack and Hub Help

Archive a Value in a Set

Use the REST API to archive a value in a set of values for a custom field. In the REST API, a set of values for a custom field is represented by a bundle entity.

This use case archives a value in an enum bundle. You can use the same pattern with other bundle element types that support the archived attribute, such as BuildBundleElement, OwnedBundleElement, StateBundleElement, and VersionBundleElement.

Summary

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

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

Step-by-Step

To archive an enum value in a set

  1. Get the list of enum bundles and their values. See Enum Bundles.

    curl -X GET 'https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/enum?fields=id,name,values(id,name,archived)' \ -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 Priorities bundle with the entity ID 86-125 and the Minor value with the entity ID 67-5.

    [ { "values": [ { "name": "Major", "archived": false, "id": "67-2", "$type": "EnumBundleElement" }, { "name": "Normal", "archived": false, "id": "67-3", "$type": "EnumBundleElement" }, { "name": "Minor", "archived": false, "id": "67-5", "$type": "EnumBundleElement" } ], "name": "Priorities", "id": "86-125", "$type": "EnumBundle" } ]
  2. Archive the value by setting its archived attribute to true.

    curl -X POST 'https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/enum/86-125/values/67-5?fields=id,name,archived' \ -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 value.

    { "name": "Minor", "archived": true, "id": "67-5", "$type": "EnumBundleElement" }
  3. Optional. Check the value in the bundle.

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

    The archived value is listed with the archived attribute set to true.

As a result, the value is archived in the set of values.

18 August 2026