---
title: Exclude bank/account
slug: apis/accounts/deposit-sweeps-apis/exclude-a-bank-or-account
description: Exclude a bank or account from deposit sweeps via POST /SweepsIntrafi/v1/accounts/{accountNumber}, specifying bank or account details.
icon: {"apiMethod":"PUT"}
docTags: 
createdAt: 2025-05-07T06:24:37.364Z
---

## API reference

Excludes either specific banks from an account's sweep or specific accounts from being swept at all.

- Exclude banks from the sweep network
  Your customers may already have funds at a certain bank and this is a way to exclude  that bank
-  Opt out of sweeps
  When a product is enabled for sweeps, all accounts created from that product are enrolled into the sweeps program. Use this endpoint to mark an account inactive for sweeps, effectively opting out for sweeps.

:::ApiMethodV2
```json
{
  "name": "Endpoint: SweepsIntrafi/v1/accounts/{accountNumber}",
  "method": "PUT",
  "url": "https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/{accountNumber}",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "CkBeCLe8iPdXERwfge2bM",
        "language": "curl",
        "code": "curl --location --request PUT 'https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/2666129453'\n--header 'Content-Type: application/json'\n--header 'Authorization: Bearer <token>'\n--data '{\n  \"status\": \"Active\",\n  \"bankExclusions\": [ \n     \"30895\",\n     \"10015\"\n  ]\n} '",
        "customLabel": ""
      },
      {
        "id": "eQMGrbPTNIiVt7XLO1sPD",
        "language": "nodejs",
        "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'PUT',\n  'hostname': 'sandbox.crbcos.com',\n  'path': '/SweepsIntrafi/v1/accounts/2666129453',\n  'headers': {\n    'Content-Type': 'application/json',\n    'Authorization': 'Bearer <token>'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nvar postData = JSON.stringify({\n  \"status\": \"Active\",\n  \"bankExclusions\": [\n    \"30895\",\n    \"10015\"\n  ]\n});\n\nreq.write(postData);\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "34XkfVA9Q2IhW0pFyPK4X",
        "language": "python",
        "code": "import http.client\nimport json\n\nconn = http.client.HTTPSConnection(\"sandbox.crbcos.com\")\npayload = json.dumps({\n  \"status\": \"Active\",\n  \"bankExclusions\": [\n    \"30895\",\n    \"10015\"\n  ]\n})\nheaders = {\n  'Content-Type': 'application/json',\n  'Authorization': 'Bearer <token>'\n}\nconn.request(\"PUT\", \"/SweepsIntrafi/v1/accounts/2666129453\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      },
      {
        "id": "R6r6yx1WvvMYbmscyJVXp",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/2666129453\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Content-Type\"] = \"application/json\"\nrequest[\"Authorization\"] = \"Bearer <token>\"\nrequest.body = JSON.dump({\n  \"status\": \"Active\",\n  \"bankExclusions\": [\n    \"30895\",\n    \"10015\"\n  ]\n})\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "7xTP2Y0NVMUYWQwerzMhR",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"strings\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://sandbox.crbcos.com/SweepsIntrafi/v1/accounts/2666129453\"\n  method := \"PUT\"\n\n  payload := strings.NewReader(`{`+\"\n\"+`\n  \"status\": \"Active\",`+\"\n\"+`\n  \"bankExclusions\": [ `+\"\n\"+`\n     \"30895\",`+\"\n\"+`\n     \"10015\"`+\"\n\"+`\n  ]`+\"\n\"+`\n} `)\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, payload)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Content-Type\", \"application/json\")\n  req.Header.Add(\"Authorization\", \"Bearer <token>\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "CkBeCLe8iPdXERwfge2bM"
  },
  "results": {
    "languages": [
      {
        "id": "QqHiLt-FHhPgn7vzGSzAQ",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"accountNumber\": \"2666129453\",\n  \"status\": \"Active\",\n  \"title\": \"Sweeps Test 2\",\n  \"bankExclusions\": [\n    \"30895\",\n    \"10015\"\n  ],\n  \"coreBalance\": 125627321,\n  \"coreBalanceAsOf\": \"2024-09-25T16:17:20.1-04:00\",\n  \"custodialBalance\": 25627321,\n  \"networkBalance\": 100000000,\n  \"networkBalanceAsOf\": \"2024-09-24T16:33:43.613-04:00\",\n  \"maxSweepAmount\": 0,\n  \"productId\": \"e4404005-03c1-4710-b759-b13700ebfac4\",\n  \"partnerId\": \"6e6769ec-99e0-4c4f-8ae8-b13700eab0fc\",\n  \"openedAt\": \"2024-05-14T16:26:10.227-04:00\",\n  \"lastModifiedAt\": \"2024-09-25T16:18:48.5446146-04:00\",\n  \"productName\": \"ibs Checking Product\",\n  \"partnerName\": \"Ibrahim Saeed Partner\"\n}"
      },
      {
        "id": "MkzOjj1RXMGrSWJeOOsVN",
        "language": "404",
        "customLabel": "",
        "code": "{\n  \"message\": \"Ain't no cake like that.\"\n}"
      }
    ],
    "selectedLanguageId": "QqHiLt-FHhPgn7vzGSzAQ"
  },
  "request": {
    "pathParameters": [
      {
        "name": "accountNumber",
        "kind": "required",
        "type": "string",
        "description": "Account number of account you want to make changes to",
        "": "required"
      }
    ],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "status",
        "kind": "required",
        "type": "String",
        "description": "Set to \"Active\" to enroll this account in the sweeps program.\nSet to \"Inactive\" to opt this account out of the sweeps program."
      },
      {
        "name": "bankExclusions",
        "kind": "optional",
        "type": "String",
        "description": "IDs of the banks to exclude from the network of banks where funds may be swept to",
        "": "IDs of the banks to exclude from the network of banks where funds may be swept to"
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "response": [
    {
      "name": "accountNumber",
      "kind": "optional",
      "type": "string",
      "description": "Account number"
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "Inactive or Active",
      "children": []
    },
    {
      "name": "title",
      "kind": "optional",
      "type": "string",
      "description": "The name on the account. Usually this is the account holder name, but not always.\n255 characters maximum.",
      "children": []
    },
    {
      "name": "bankExclusions",
      "kind": "optional",
      "type": "Array",
      "description": "IDs of the banks to exclude from the network of banks where funds may be swept to",
      "children": []
    },
    {
      "name": "coreBalance",
      "kind": "optional",
      "type": "string",
      "description": "Total available balance at Cross River",
      "children": []
    },
    {
      "name": "coreBalanceAsOf",
      "kind": "optional",
      "type": "string",
      "description": "Date and time of the core balance. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "custodialBalance",
      "kind": "optional",
      "type": "Integer",
      "description": "Total amount held at Cross River",
      "children": []
    },
    {
      "name": "networkBalance",
      "kind": "optional",
      "type": "Integer",
      "description": "Total amount swept to IntraFi ",
      "children": []
    },
    {
      "name": "networkBalanceAsOf",
      "kind": "optional",
      "type": "string",
      "description": "Date and time of the network balance. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "maxSweepAmount",
      "kind": "optional",
      "type": "Integer",
      "description": "Max sweep amount will always be 0 as it refers to an override - program sweep limit is not reflected here",
      "children": []
    },
    {
      "name": "clientIdentifier",
      "kind": "optional",
      "type": "string",
      "description": "Your own unique identifying string to a payment call or COS record. This attribute is useful for idempotency purposes.",
      "children": []
    },
    {
      "name": "productId",
      "kind": "optional",
      "type": "string",
      "description": "ID in GUID format of your specific product type on which the account is based. Provided by Cross River.",
      "children": []
    },
    {
      "name": "partnerId",
      "kind": "optional",
      "type": "string",
      "description": "Your unique ID in the Cross River system. This ID is in GUID format.",
      "children": []
    },
    {
      "name": "openedAt",
      "kind": "optional",
      "type": "string",
      "description": "Date and time the deposit account was opened. The date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "lastModifiedAt",
      "kind": "optional",
      "type": "string",
      "description": "Internal Cross River value. Date and time the database entry was last modified. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "productName",
      "kind": "optional",
      "type": "string",
      "description": "Name associated with the product ID, for example, \"Fintech123 checking product\" ",
      "children": []
    },
    {
      "name": "partnerName",
      "kind": "optional",
      "type": "string",
      "description": "Your partner name in the Cross River system",
      "children": []
    }
  ],
  "hasTryItOut": false,
  "autoGeneratedAnchorSlug": "endpoint-sweepsintrafiv1accountsaccountnumber",
  "legacyHash": "Vg_z1OUvJYNIJGL7bo4Ew"
}
```
:::

