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

# User Management

> Add and remove secondary managers and view-only users for your vault.

<img src="https://mintcdn.com/superform-cb7ef652/dryLGguJtin4LdWM/curate/images/screenshots/user-management.jpg?fit=max&auto=format&n=dryLGguJtin4LdWM&q=85&s=b8e7ef9860d428f648389e10febade27" alt="SuperVaults User Management — Primary, Secondary, and View Only manager role tabs" width="2000" height="1046" data-path="curate/images/screenshots/user-management.jpg" />

This page controls vault access. Three tiers are managed here: primary manager (display only), secondary managers (onchain delegates), and view-only users (offchain read access). Primary manager access required.

The full manager list is fetched from `GET /api/v1/users?vault_address={}&chain_id={}&limit=100`.

## Tab 1: Primary Manager

Displays the primary manager's wallet address and display name. Set at vault creation, immutable without governance-level contract interaction. This key is the root of trust for the vault.

## Tab 2: Secondary Managers

On-chain delegates with full operational access (except vault settings and user management).

### Adding

1. Click **Add Secondary Manager**
2. Enter wallet address
3. Click **Prepare** — `POST /api/v1/users/secondary-manager/prepare` → calldata
4. Sign the onchain transaction

### Removing

1. Click **Remove** — `POST /api/v1/users/secondary-manager/remove/prepare` → calldata
2. Sign the onchain transaction

### Updating Display Names

Click the pencil icon to update any user's display name (offchain, no gas):

```bash theme={null}
PATCH /api/v1/users/{wallet_address}/display-name
{ "display_name": "Alice (Operations)" }
```

## Tab 3: View Only

Read-only dashboard access. No onchain transaction required.

```bash theme={null}
# Add
POST /api/v1/users/view-only
{ "vault_address": "0x...", "chain_id": 8453, "wallet_address": "0x...", "display_name": "Risk Monitor" }

# Remove
DELETE /api/v1/users/view-only/{wallet_address}?vault_address={}&chain_id={}
```

## API Reference

| Endpoint                                         | Method | Description         |
| ------------------------------------------------ | ------ | ------------------- |
| `/api/v1/users`                                  | GET    | All users for vault |
| `/api/v1/users/secondary-manager/prepare`        | POST   | Prepare add tx      |
| `/api/v1/users/secondary-manager/remove/prepare` | POST   | Prepare remove tx   |
| `/api/v1/users/view-only`                        | POST   | Add view-only       |
| `/api/v1/users/view-only/{wallet}`               | DELETE | Remove view-only    |
| `/api/v1/users/{wallet}/display-name`            | PATCH  | Update display name |

### User Object

```json theme={null}
{
  "user": {
    "id": "uuid",
    "wallet_address": "0x...",
    "display_name": "Alice"
  },
  "roles": [
    {
      "vault_address": "0x...",
      "chain_id": 8453,
      "role": "secondary_manager",
      "granted_by": "0xPrimary...",
      "granted_at": "2025-01-15T10:30:00Z"
    }
  ]
}
```

<Tip>
  Add at least one secondary manager before going live. If you lose access to the primary key, secondary managers can continue vault operations.
</Tip>
