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

# Auto-sweep settings

> Read and set the balance at which an address's funds move into your master wallet automatically.

Each address you issue can consolidate its balance into your master wallet on the same chain automatically, once it crosses a floor you choose. This endpoint reads and sets that floor, per chain and per token.

The network itself also has its own on/off switch, set from **Dashboard → Wallets → Settings → Auto-sweep**. This endpoint's `auto_sweep` field reports the two combined: whichever is more restrictive wins. Turning the network switch off pauses sweeping on that chain no matter what you set here.

## Endpoint

```text theme={null}
GET https://merchant.minisend.xyz/api/v1/sweep-config
PATCH https://merchant.minisend.xyz/api/v1/sweep-config
```

```text theme={null}
Authorization: Bearer wsk_live_your_key_here
```

`GET` needs the `wallets:read` scope. `PATCH` needs `wallets:write`.

## Reading your configuration

```bash theme={null}
curl https://merchant.minisend.xyz/api/v1/sweep-config \
  -H "Authorization: Bearer wsk_live_your_key_here"
```

```json theme={null}
{
  "sweep_config": [
    {
      "chain": "BASE",
      "token": "USDC",
      "auto_sweep": true,
      "auto_sweep_configured": true,
      "chain_auto_sweep": true,
      "configured_min": null,
      "effective_min": 1,
      "default_min": 1,
      "minimum_allowed": 0.1
    },
    {
      "chain": "BASE",
      "token": "USDT",
      "auto_sweep": true,
      "auto_sweep_configured": true,
      "chain_auto_sweep": true,
      "configured_min": null,
      "effective_min": 1,
      "default_min": 1,
      "minimum_allowed": 0.1
    }
  ]
}
```

One entry per token, for every chain with an active master wallet on your account.

<ResponseField name="auto_sweep" type="boolean" required>
  Whether this chain and token will actually sweep: `chain_auto_sweep` AND `auto_sweep_configured` both true.
</ResponseField>

<ResponseField name="auto_sweep_configured" type="boolean" required>
  What you've set for this token, on its own.
</ResponseField>

<ResponseField name="chain_auto_sweep" type="boolean" required>
  The network-level switch from your dashboard. Read-only here — change it from **Dashboard → Wallets → Settings**.
</ResponseField>

<ResponseField name="configured_min" type="number">
  The floor you set, in the token's units. `null` if you haven't set one, in which case `default_min` applies.
</ResponseField>

<ResponseField name="effective_min" type="number" required>
  The floor that actually applies: your `configured_min`, or `default_min` if you haven't set one, never below `minimum_allowed`.
</ResponseField>

<ResponseField name="default_min" type="number" required>
  Applied when you haven't configured a floor. Cents-level on Base and the other low-fee chains; higher on Ethereum, where moving small amounts can cost more than they're worth.
</ResponseField>

<ResponseField name="minimum_allowed" type="number" required>
  The lowest floor you're allowed to set on this chain. A `PATCH` asking for less than this is clamped up to it, not rejected.
</ResponseField>

## Changing your configuration

<ParamField body="chain" type="string" required>
  The chain to configure. Needs an active master wallet on that chain already.
</ParamField>

<ParamField body="token" type="string" required>
  `USDC` or `USDT`.
</ParamField>

<ParamField body="min_amount" type="number">
  The floor, in the token's units. Below `minimum_allowed` for the chain, it's raised to that instead of being refused. Omit to leave your current setting as it is.
</ParamField>

<ParamField body="auto_sweep" type="boolean">
  Turn sweeping for this token on or off. Omit to leave your current setting as it is. At least one of `min_amount` or `auto_sweep` is required.
</ParamField>

```bash theme={null}
curl -X PATCH https://merchant.minisend.xyz/api/v1/sweep-config \
  -H "Authorization: Bearer wsk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"chain": "MATIC", "token": "USDC", "min_amount": 5}'
```

Returns the same shape as one entry above, under `sweep_config`.

## Errors

| Status | Meaning |
| - | - |
| `400` | Missing or invalid `chain`/`token`, or nothing to update |
| `401` | Missing or invalid API key |
| `404` | No active master wallet for that chain — activate it first |
| `503` | Could not read or write your configuration right now. Retry |


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