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

# Idempotency

> Safely retry API requests without duplicate operations.

For state-changing operations (creating wallets, signing requests), add an `idempotency-key` header to safely retry failed requests.

## Usage

```bash theme={null}
curl -X POST https://api.mpcvault.com/v1/createWallet \
  -H "Content-Type: application/json" \
  -H "x-mtoken: YOUR_API_TOKEN" \
  -H "idempotency-key: 550e8400-e29b-41d4-a716-446655440000" \
  -d '{"vaultUuid": "...", "networkType": "NETWORK_TYPE_ETHEREUM"}'
```

## Requirements

| Requirement | Description                                         |
| ----------- | --------------------------------------------------- |
| Format      | Client-generated unique value (UUID v4 recommended) |
| Max Length  | 255 characters                                      |
| Expiration  | Keys expire after 24 hours                          |

## How It Works

1. Include a unique `idempotency-key` header with your request
2. If the request fails due to network issues, retry with the same key
3. MPCVault returns the cached response if the key was already used
4. This prevents duplicate wallet creation or transaction signing

## When to Use

* `createWallet` - Prevent duplicate wallet creation
* `createSigningRequest` - Prevent duplicate transaction requests
* `createBatchPayment` - Prevent duplicate batch payments

Read-only operations like `getWalletList` don't require idempotency keys.
