> ## Documentation Index
> Fetch the complete documentation index at: https://vastai-80aa3a82-auto-cli-sdk-preview-pr-398.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# vastai tfa update

Update a 2FA method's settings

## Usage

```bash theme={null}
vastai tfa update METHOD_ID [--label LABEL] [--set-primary]
```

## Arguments

<ParamField path="method_id" type="integer" required>
  ID of the 2FA method to update (see `vastai tfa status`)
</ParamField>

## Options

<ParamField path="--label" type="string">
  New label/name for this 2FA method
</ParamField>

<ParamField path="--set-primary" type="string">
  Set this method as the primary/default 2FA method
</ParamField>

## Description

Update the label or primary status of a 2FA method.

The label is a friendly name to help you identify different methods
(e.g. "Work Phone", "Personal Authenticator").

The primary method is your preferred/default 2FA method.

## Examples

```bash theme={null}
vastai tfa update 123 --label "Work Phone"
 vastai tfa update 456 --set-primary
 vastai tfa update 789 --label "Backup Authenticator" --set-primary
```

## Global Options

The following options are available for all commands:

| Option          | Description                                           |
| --------------- | ----------------------------------------------------- |
| `--url URL`     | Server REST API URL                                   |
| `--retry N`     | Retry limit                                           |
| `--raw`         | Output machine-readable JSON                          |
| `--explain`     | Verbose explanation of API calls                      |
| `--api-key KEY` | API key (defaults to `~/.config/vastai/vast_api_key`) |
