---
title: "Set up or update sweeping"
method: POST
path: "/v3/merchant-accounts/{id}/sweeping"
tags: ["Merchant accounts"]
---

# Set up or update sweeping

`POST /v3/merchant-accounts/{id}/sweeping`

## Request

- Base URL: `https://api.truelayer-sandbox.com`
- URL: `https://api.truelayer-sandbox.com/v3/merchant-accounts/{id}/sweeping`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.truelayer.com/connect/token` scopes: `payments`

Set the automatic sweeping settings for a merchant account.

At regular intervals, any available balance in excess of the configured `max_amount_in_minor` is withdrawn to a pre-configured IBAN.

## Path parameters

- `id` string, uuid, required: Unique ID for the Merchant Account

## Headers

- `Tl-Signature` string, required

## Request body

- SweepingSettingsRequested
  - `max_amount_in_minor` integer, required: A 'cent' value representing the max desired amount, above which funds will be automatically withdrawn, e.g. 100 == 1GBP
  - `frequency` 'hourly' | 'every_3_hours' | 'every_6_hours' | 'every_12_hours' | 'daily' | 'weekly' | 'fortnightly': How often the available balance will be checked for sweeping.

## Response `204`

Automatic sweeping enabled

## Other responses

- `400`: Invalid Parameters
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Account Not Found
- `500`: Unknown Error

---

[API](https://skmtc.dev/truelayer/apis/payments-api-v3.md) - [All operations](https://skmtc.dev/truelayer/apis/payments-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/truelayer/apis/payments-api-v3/revisions/a7c585fc9b84?raw)
