# Delete a Value from a Set

Use the REST API to delete a value from 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 deletes an enum value from an enum bundle. You can use the same pattern with other bundle element types, such as [BuildBundleElement](api-entity-BuildBundleElement.html), [OwnedBundleElement](api-entity-OwnedBundleElement.html), [StateBundleElement](api-entity-StateBundleElement.html), and [VersionBundleElement](api-entity-VersionBundleElement.html).

> **Note:**
> Deleting a value removes it from the shared bundle. This can affect every custom field that uses this bundle.

## Summary

When you have the required IDs, delete the value by sending a `DELETE` request to this endpoint:

```
/api/admin/customFieldSettings/bundles/enum/{bundleID}/values/{valueID}
```

## Step-by-Step

Procedure: To delete an enum value from a set

1. Get the list of enum bundles and their values. See [Enum Bundles](resource-api-admin-customFieldSettings-bundles-enum.html).

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

```JSON
[
    {
        "values": [
            {
                "name": "Major",
                "id": "67-2",
                "$type": "EnumBundleElement"
            },
            {
                "name": "Normal",
                "id": "67-3",
                "$type": "EnumBundleElement"
            },
            {
                "name": "Minor",
                "id": "67-5",
                "$type": "EnumBundleElement"
            }
        ],
        "name": "Priorities",
        "id": "86-125",
        "$type": "EnumBundle"
    }
]
```

2. Delete the value from the bundle.

```CURL
curl -i -X DELETE 'https://example.youtrack.cloud/api/admin/customFieldSettings/bundles/enum/86-125/values/67-5' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YouTrack_token>' \
-H 'Content-Type: application/json'
```

If the request is successful, the server responds with the `200 OK` status.

3. Optional. Check the list of values in the bundle.

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

The deleted value is no longer listed in the response.

As a result, the value is deleted from the set of values.

