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

# Archive a wallet

> Soft-delete wallets to remove them from active use while preserving their history

Privy allows your app to archive wallets that are no longer needed. Archiving performs a reversible soft-delete: Privy retains the wallet's keys, history, and address, but hides the wallet from read endpoints and blocks all write and signing operations.

## When to archive

Archive a wallet when:

* The wallet's purpose is complete (e.g., a one-time payment wallet)
* Your app is rotating to a new wallet and decommissioning the old one
* A compliance or security event requires deactivating a wallet without destroying its audit trail

## Archiving a wallet

To archive a wallet, make a `POST` request to:

```
https://api.privy.io/v1/wallets/<wallet_id>/archive
```

<Tip>
  If the wallet has an [external ID](/wallets/wallets/external-ids), your app can use
  `ext_wal_<external_id>` in place of the wallet ID.
</Tip>

```bash theme={"system"}
curl --request POST https://api.privy.io/v1/wallets/rbokq6mmq5f8j1cgyr6a5g4n/archive \
    -u "<your-privy-app-id>:<your-privy-app-secret>" \
    -H "privy-app-id: <your-privy-app-id>" \
    -H 'Content-Type: application/json' \
    -d '{}'
```

The response returns the wallet with `archived_at` populated (Unix timestamp in milliseconds).

## What happens when your app archives a wallet

| Behavior             | Detail                                                                                           |
| -------------------- | ------------------------------------------------------------------------------------------------ |
| Hidden from reads    | `GET /v1/wallets`, `GET /v1/wallets/{id}`, and `POST /v1/wallets/address` return 404 by default. |
| Blocked from writes  | RPC, signing, and transfer endpoints return 400.                                                 |
| Address preserved    | The on-chain address remains unchanged and can still receive funds. Your app cannot reuse it.    |
| External ID reserved | The `external_id` remains assigned. Your app cannot assign it to a new wallet.                   |
| Webhook dispatched   | Privy sends a `wallet.archived` event to your configured webhook endpoint.                       |

<Warning>
  Custodial wallets (wallets managed by a third-party custodian) cannot be archived. Attempting to
  archive a custodial wallet returns a 400 error.
</Warning>

## Reading archived wallets

To include archived wallets in read operations, pass the `include_archived=true` query parameter:

```bash theme={"system"}
# Get a specific archived wallet
curl --request GET "https://api.privy.io/v1/wallets/rbokq6mmq5f8j1cgyr6a5g4n?include_archived=true" \
    -u "<your-privy-app-id>:<your-privy-app-secret>" \
    -H "privy-app-id: <your-privy-app-id>"
```

```bash theme={"system"}
# List all wallets including archived ones
curl --request GET "https://api.privy.io/v1/wallets?include_archived=true" \
    -u "<your-privy-app-id>:<your-privy-app-secret>" \
    -H "privy-app-id: <your-privy-app-id>"
```

Archived wallets include an `archived_at` field in the response, allowing your app to distinguish them from active wallets.

## Restoring an archived wallet

Wallet restoration is available to Privy administrators. If your app needs to restore an accidentally archived wallet, contact Privy support. When Privy restores a wallet:

* The wallet becomes visible in all read endpoints again
* Write and signing operations resume
* Privy sends a `wallet.restored` webhook event
* The wallet counts toward your app's active wallet total

## API reference

<CardGroup cols={2}>
  <Card title="Archive wallet" icon="box-archive" href="/api-reference/wallets/archive">
    `POST /v1/wallets/{wallet_id}/archive`
  </Card>

  <Card title="wallet.archived webhook" icon="bell" href="/api-reference/webhooks/wallet/archived">
    Fired when a wallet is archived.
  </Card>
</CardGroup>
