Create a sweep config | Moov Documentation

Create a sweep config

Create a sweep config for a wallet.

To access this endpoint using an access token you'll need to specify the /accounts/{accountID}/wallets.write scope.

POST

/accounts/{accountID}/sweep-configs

Example Request

curl -X POST "https://api.moov.io/accounts/{accountID}/sweep-configs" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.07.00" \
  -d '{
  "walletID": "01234567-89ab-cdef-0123-456789abcdef",
  "status": "enabled",
  "pushPaymentMethodID": "01234567-89ab-cdef-0123-456789abcdef",
  "pullPaymentMethodID": "01234567-89ab-cdef-0123-456789abcdef"
}'

Go Example

mc, _ := moov.NewClient()

minBalance := "150.00"
mc.CreateSweepConfig(ctx, moov.CreateSweepConfig{
  AccountID:           "string",
  WalletID:            "string",
  Status:              moov.SweepConfigStatus_Enabled,
  PushPaymentMethodID: "string",
  PullPaymentMethodID: "string",
  MinimumBalance:      &minBalance,
})

TypeScript Example

import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.sweeps.createConfig({
    accountID: "cd0ec32e-bd84-418c-90d3-fffbc5465f8b",
    createSweepConfig: {
      walletID: "01234567-89ab-cdef-0123-456789abcdef",
      status: "enabled",
      pushPaymentMethodID: "01234567-89ab-cdef-0123-456789abcdef",
      pullPaymentMethodID: "01234567-89ab-cdef-0123-456789abcdef",
    },
  });

console.log(result);
}

run();

PHP Example

declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\