---
title: Restrict account
slug: apis/accounts/account-mgmt-apis/restrict-account
description: Apply restrictions to an account via POST /core/v1/dda/accounts/{accountnumber}/restrictions, blocking specific transaction types or rails.
icon: {"apiMethod":"POST"}
docTags: 
createdAt: 2025-06-08T08:13:14.633Z
---

## Relevant webhooks

For this endpoint be sure you have [registered](docId\:BN5XtgkJogBe-CtwomCbS) for these webhooks:

- [Core.Restriction.Placed](docId\:eAs8aFqW7M97baeZUC8Sr)

## API reference

Restricts an account from defined transactions.
A restriction is a flexible way to prevent transactions that contain certain criteria from posting to an account. This is useful in scenarios such as freezing an account that has been compromised.

To restrict all subaccounts of a master account, set `appliesTo` to **SubAccounts** and *do not* supply a value for `subAccountNumber`.

To restrict a master account together with all its subaccounts, set `appliesTo` to **All** and *do not* supply a value for `subAccountNumber`.&#x20;

:::hint{type="info"}
**Payments that fail to post to a Cross River account and are returned will not be visible to you.**
:::

:::ApiMethodV2
```json
{
  "name": "Endpoint: v1/dda/accounts/{accountNumber}/restrictions",
  "method": "POST",
  "url": "https://sandbox.crbcos.com/core/v1/dda/accounts/{accountNumber}/restrictions",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "eajf8KuLYBAUE23VI6_Pj",
        "language": "curl",
        "code": "curl --location --globoff 'https://sandbox.crbcos.com/core/v1/dda/accounts/2394312736/restrictions' \\\n--data '{\n  \"transactionCode\": \"Incoming ACH\",\n  \"transactionType\": \"Debit\",\n  \"appliesTo\": \"Account\",\n  \"reason\": \"Account Freeze\"\n}'",
        "customLabel": ""
      },
      {
        "id": "cY8A59lipKdu7Tz5OnRn5",
        "language": "nodejs",
        "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'POST',\n  'hostname': 'sandbox.crbcos.com',\n  'path': '/core/v1/dda/accounts/{accountNumber}/restrictions?accountNumber=2394312736',\n  'headers': {\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 =  \"{\\r\\n  \\\"transactionCode\\\": \\\"Incoming ACH\\\",\\r\\n  \\\"transactionType\\\": \\\"Debit\\\",\\r\\n  \\\"appliesTo\\\": \\\"Account\\\",\\r\\n  \\\"reason\\\": \\\"Account Freeze\\\"\\r\\n}\";\n\nreq.write(postData);\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "GZfC4RHGEVRbkzsQLFwdV",
        "language": "python",
        "code": "import http.client\n\nconn = http.client.HTTPSConnection(\"sandbox.crbcos.com\")\npayload = \"{\\r\\n  \\\"transactionCode\\\": \\\"Incoming ACH\\\",\\r\\n  \\\"transactionType\\\": \\\"Debit\\\",\\r\\n  \\\"appliesTo\\\": \\\"Account\\\",\\r\\n  \\\"reason\\\": \\\"Account Freeze\\\"\\r\\n}\"\nheaders = {}\nconn.request(\"POST\", \"/core/v1/dda/accounts/{accountNumber}/restrictions?accountNumber=2394312736\", payload, headers)\nres = conn.getresponse()\ndata = res.read()\nprint(data.decode(\"utf-8\"))",
        "customLabel": ""
      },
      {
        "id": "FZaVYcLD2VsA0ushPrkfl",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/core/v1/dda/accounts/{accountNumber}/restrictions?accountNumber=2394312736\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest.body = \"{\\r\\n  \\\"transactionCode\\\": \\\"Incoming ACH\\\",\\r\\n  \\\"transactionType\\\": \\\"Debit\\\",\\r\\n  \\\"appliesTo\\\": \\\"Account\\\",\\r\\n  \\\"reason\\\": \\\"Account Freeze\\\"\\r\\n}\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      },
      {
        "id": "JtFd5c4ocb-_vXDQoTk0K",
        "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/core/v1/dda/accounts/{accountNumber}/restrictions?accountNumber=2394312736\"\n  method := \"POST\"\n\n  payload := strings.NewReader(`{`+\"\n\"+`\n  \"transactionCode\": \"Incoming ACH\",`+\"\n\"+`\n  \"transactionType\": \"Debit\",`+\"\n\"+`\n  \"appliesTo\": \"Account\",`+\"\n\"+`\n  \"reason\": \"Account Freeze\"`+\"\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  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": "eajf8KuLYBAUE23VI6_Pj"
  },
  "results": {
    "languages": [
      {
        "id": "92J7Q9aihp7T6Q1Bc5jTC",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"id\": \"51d73b46-ef2a-4a52-b174-b32f00949088\",\n    \"masterAccountNumber\": \"2394312736\",\n    \"subAccountNumber\": \"2394312736\",\n    \"restrictionType\": \"Internal\",\n    \"appliesTo\": \"Account\",\n    \"status\": \"Active\",\n    \"transactionType\": \"Debit\",\n    \"transactionCode\": \"Incoming ACH\",\n    \"reason\": \"Account Freeze\",\n    \"createdAt\": \"2025-08-04T05:00:54.4238173-04:00\",\n    \"partnerId\": \"cd9c12f4-7691-424a-b38b-af5b0134c611\",\n    \"lastModifiedAt\": \"2025-08-04T05:00:54.4238173-04:00\"\n}"
      }
    ],
    "selectedLanguageId": "92J7Q9aihp7T6Q1Bc5jTC"
  },
  "request": {
    "pathParameters": [
      {
        "name": "accountNumber",
        "kind": "required",
        "type": "string",
        "description": "Number of the customer's master account to be restricted, even if you are restricting a subaccount",
        "": "Number of the customer's master account to be restricted, even if you are restricting a subaccount"
      }
    ],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "name": "subAccountNumber",
        "kind": "optional",
        "type": "string",
        "description": "If restricting a specific subaccount, that account number",
        "": "If restricting a specific subaccount, that account number"
      },
      {
        "name": "appliesTo",
        "kind": "required",
        "type": "string",
        "description": "Depending on the restriction you apply:\n- All (applies to both a master account and the subaccounts under it)\n- Account\n- SubAccounts",
        "": "Depending on the restriction you apply:\n- All (applies to both a master account and the subaccounts under it)\n- Account\n- SubAccounts"
      },
      {
        "name": "rail",
        "kind": "optional",
        "type": "string",
        "description": "Indicates if the restriction should apply to a specific rail. The most commonly used values are 'Ach', 'Wires', and 'Rtp'.\n- Ach\n- Wires\n- CreditCard\n- DebitCard\n- StoredValue\n- Checks\n- XPay\n- Rtp\n- Crypto\n- CardManagement\n- International\n- CardPayments\n- Internal",
        "": "Indicates if the restriction should apply to a specific rail. The most commonly used values are 'Ach', 'Wires', and 'Rtp'.\n- Ach\n- Wires\n- CreditCard\n- DebitCard\n- StoredValue\n- Checks\n- XPay\n- Rtp\n- Crypto\n- CardManagement\n- International\n- CardPayments\n- Internal"
      },
      {
        "name": "transactionType",
        "kind": "optional",
        "type": "string",
        "description": "Type of transaction to be restricted:\n- Debit\n- Credit",
        "": "Type of transaction to be restricted:\n- Debit\n- Credit"
      },
      {
        "name": "otherAccountType",
        "kind": "optional",
        "type": "string",
        "description": "Do not use.",
        "": "Do not use."
      },
      {
        "name": "amountThreshold",
        "kind": "optional",
        "type": "integer",
        "description": "Specifies an amount threshold. The restriction applies to any transaction amount that is equal to or greater than the amount entered.\nThis value is in integral cents, meaning the number includes cents, with no decimal point. For example, 100 USD appears as 10000.",
        "": "Specifies an amount threshold. The restriction applies to any transaction amount that is equal to or greater than the amount entered.\nThis value is in integral cents, meaning the number includes cents, with no decimal point. For example, 100 USD appears as 10000."
      },
      {
        "name": "currency",
        "kind": "optional",
        "type": "string",
        "description": "Currency used in the transaction",
        "": "Currency used in the transaction"
      },
      {
        "name": "transactionCode",
        "kind": "optional",
        "type": "string",
        "description": "Indicates a specific transaction code, such as ‘Incoming ACH’",
        "": "Indicates a specific transaction code, such as ‘Incoming ACH’"
      },
      {
        "name": "effectiveStartTimeHour",
        "kind": "optional",
        "type": "integer",
        "description": "Indicates the approximate start hour of the restriction. Use a 24-hour clock.",
        "": "Indicates the approximate start hour of the restriction. Use a 24-hour clock."
      },
      {
        "name": "effectiveStartTimeMinute",
        "kind": "optional",
        "type": "integer",
        "description": "Indicates the approximate start minute of the restriction",
        "": "Indicates the approximate start minute of the restriction"
      },
      {
        "name": "effectiveEndTimeHour",
        "kind": "optional",
        "type": "integer",
        "description": "Indicates the approximate end hour of the restriction. Use a 24-hour clock.",
        "": "Indicates the approximate end hour of the restriction. Use a 24-hour clock."
      },
      {
        "name": "effectiveEndTimeMinute",
        "kind": "optional",
        "type": "integer",
        "description": "Indicates the approximate end minute of the restriction",
        "": "Indicates the approximate end minute of the restriction"
      },
      {
        "name": "reason",
        "kind": "required",
        "type": "string",
        "description": "Justification for applying the restriction",
        "": "Justification for applying the restriction"
      },
      {
        "name": "notes",
        "kind": "optional",
        "type": "string",
        "description": "Any other information about the restriction. Generally not used.",
        "": "Any other information about the restriction. Generally not used."
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "id",
      "kind": "optional",
      "type": "string",
      "description": "The GUID ID identifying this restriction"
    },
    {
      "name": "masterAccountNumber",
      "kind": "optional",
      "type": "string",
      "description": "Number of the customer master account to be restricted, even if the restriction is only on a subaccount or subaccounts",
      "children": []
    },
    {
      "name": "subAccountNumber",
      "kind": "optional",
      "type": "string",
      "description": "If restricting a specific subaccount, that account number",
      "children": []
    },
    {
      "name": "restrictionType",
      "kind": "optional",
      "type": "string",
      "description": "Who applied the restriction:\n- Partner\n- Internal",
      "children": []
    },
    {
      "name": "appliesTo",
      "kind": "optional",
      "type": "string",
      "description": "Depending on the restriction you apply:\n- All\n- Account\n- SubAccounts",
      "children": []
    },
    {
      "name": "status",
      "kind": "optional",
      "type": "string",
      "description": "Status of the restriction:\n- Inactive\n- Active",
      "children": []
    },
    {
      "name": "rail",
      "kind": "optional",
      "type": "string",
      "description": "Type of restriction applied:\n- Ach\n- Wires\n- CreditCard\n- DebitCard\n- StoredValue\n- Checks\n- XPay\n- Rtp\n- Crypto\n- CardManagement\n- International\n- CardPayments\n- Internal",
      "children": []
    },
    {
      "name": "transactionType",
      "kind": "optional",
      "type": "string",
      "description": "Type of transaction restricted:\n- Debit\n- Credit",
      "children": []
    },
    {
      "name": "otherAccountType",
      "kind": "optional",
      "type": "string",
      "description": "Not used",
      "children": []
    },
    {
      "name": "transactionCode",
      "kind": "optional",
      "type": "string",
      "description": "Indicates a specific transaction code, such as ‘Incoming ACH’",
      "children": []
    },
    {
      "name": "amountThreshold",
      "kind": "optional",
      "type": "integer",
      "description": "Specifies an amount threshold. The restriction applies to any transaction amount that is equal to or greater than the amount entered.\nThis value is in integral cents, meaning the number includes cents, with no decimal point. For example, 100 USD appears as 10000.",
      "children": []
    },
    {
      "name": "effectiveStartTimeHour",
      "kind": "optional",
      "type": "integer",
      "description": "Indicates the approximate start hour of the restriction. Use a 24-hour clock.",
      "children": []
    },
    {
      "name": "effectiveStartTimeMinute",
      "kind": "optional",
      "type": "integer",
      "description": "Indicates the approximate start minute of the restriction",
      "children": []
    },
    {
      "name": "effectiveEndTimeHour",
      "kind": "optional",
      "type": "integer",
      "description": "Indicates the approximate end hour of the restriction. Use a 24-hour clock.",
      "children": []
    },
    {
      "name": "effectiveEndTimeMinute",
      "kind": "optional",
      "type": "integer",
      "description": "Indicates the approximate end minute of the restriction",
      "children": []
    },
    {
      "name": "currency",
      "kind": "optional",
      "type": "string",
      "description": "Currency held in the account",
      "children": []
    },
    {
      "name": "reason",
      "kind": "optional",
      "type": "string",
      "description": "Justification for applying the restriction",
      "children": []
    },
    {
      "name": "notes",
      "kind": "optional",
      "type": "string",
      "description": "Any other information about the restriction. Generally not used.",
      "children": []
    },
    {
      "name": "createdAt",
      "kind": "optional",
      "type": "string",
      "description": "Restriction created. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "removedAt",
      "kind": "optional",
      "type": "string",
      "description": "Restriction removed. In this case, the date and time are in this format: yyyy-mm-ddThh:mm:ss[.mmm]",
      "children": []
    },
    {
      "name": "partnerId",
      "kind": "optional",
      "type": "string",
      "description": "Your unique ID in the Cross River system. This ID is in GUID format.",
      "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": []
    }
  ],
  "autoGeneratedAnchorSlug": "endpoint-v1ddaaccountsaccountnumberrestrictions",
  "legacyHash": "4EJX_o4m9uphRTWozRkwe"
}
```
:::

