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

# vastai tfa update

Update a 2FA method's label or primary status.

## Usage

```bash theme={null}
vastai tfa update METHOD_ID [--label LABEL] [--set-primary {t|true|f|false}]
```

## Arguments

<ParamField path="method_id" type="integer" required>
  ID of the 2FA method to update. Get the ID from `vastai tfa status`.
</ParamField>

## Options

<ParamField path="--label" type="string">
  New friendly name for this 2FA method (e.g., "Work Authenticator", "Personal Phone"). (alias: `-l`)
</ParamField>

<ParamField path="--set-primary" type="string">
  Set this method as the primary/default 2FA method. Accepts `t` or `true` to enable, `f` or `false` to disable. (alias: `-p`)
</ParamField>

## Examples

```bash theme={null}
# Rename a method
vastai tfa update 123 --label "Personal Phone"

# Set as primary/default method
vastai tfa update 123 --set-primary t

# Rename and set as primary in one command
vastai tfa update 789 --label "Backup Authenticator" --set-primary t
```

## 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`) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.