> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to make a secret version primary in MysteryBox

The [primary version](../overview#secrets-and-versions) is the version that is returned by default when you get a secret. You can set any version as the primary one.

## Prerequisites

Make sure you are in a [group](/iam/authorization/groups/index) that has at least the `editor` role within your tenant; for example, the default `editors` group. You can check this in the [Administration → IAM](https://console.nebius.com/iam) section of the web console.

## How to make a version primary

<Tabs>
  <Tab title="Web console">
    1. In the [web console](https://console.nebius.com), go to <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/sidebar/mysterybox.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=428f0f38232b7eea96e9d8d993c78cd4" width="16" height="16" data-path="_assets/sidebar/mysterybox.svg" /> **MysteryBox**.
    2. Open the page of the required secret.
    3. Go to the **Versions** tab.
    4. In the line of the version that you want to make primary, click <Icon icon="https://mintcdn.com/nebius-ai-cloud/1Ha0sWR6e1mnIaHS/_assets/button-vellipsis.svg?fit=max&auto=format&n=1Ha0sWR6e1mnIaHS&q=85&s=e80b8e57c43bfd117679262e6a1334ad" width="12" height="24" data-path="_assets/button-vellipsis.svg" /> → **Make primary**.
  </Tab>

  <Tab title="CLI">
    1. List all secrets:

       ```bash theme={null}
       nebius mysterybox secret list
       ```

       In the output, copy the ID of the required secret.

    2. Save the ID to the environment variable:

       ```bash theme={null}
       export SECRET_ID=<secret_ID>
       ```

    3. List all versions of the secret:

       ```bash theme={null}
       nebius mysterybox secret-version list --parent-id $SECRET_ID
       ```

       In the output, find the version that you want to make primary and copy its ID.

    4. Specify the version ID in the following command:

       ```bash theme={null}
       nebius mysterybox secret update $SECRET_ID --primary-version-id <version_ID>
       ```
  </Tab>
</Tabs>

Now, when you get a secret, this version will be returned by default.
