---
title: "Edit a specific Rule"
method: PUT
path: "/rules/{ruleId}"
tags: ["Rules"]
---

# Edit a specific Rule

`PUT /rules/{ruleId}`

The ability to modify the details of a specific rule based on the rule's unique reference.

## Path parameters

- `ruleId` string, required

## Request body

- RuleCreateRuleRequest — create rule request
  - `type` string, required — The type of Rule. Can be one of the following {SWEEP, SPLIT, FUNDING}
  - `name` string, required — Rule's name
  - `accountId` string, required — The Account which the Rule is created on.
  - `data` RuleRuleConfigData, required — Configuration fields for all types of rules. To be populated where applicable based on rule type.
    - `daysToRun` string[] — Day(s) of the week the rule is to run. e.g. ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]. Sweep Rule Only
    - `frequency` 'Daily' — Frequency of the rule. Sweep Rule Only
    - `destinationId` string — Id of destination beneficiary. e.g. B1000001. Sweep Rule Only
    - `balanceToLeave` number — Balance to be left after the rule has been ran. e.g. 100.00. Sweep Rule Only
    - `triggerBalance` number — Minimum balance required to trigger the rule. e.g. 100.00. Sweep Rule Only
    - `splits` RuleSplitConfig[]
      - `destinationId` string, required — Id of destination beneficiary. e.g. B1000001.
      - `percent` string, required — Percentage of payment to be moved to specified destination. e.g. 7.25.
    - `conditionalSplits` RuleSplitConfig[]
      - `destinationId` string, required — Id of destination beneficiary. e.g. B1000001.
      - `percent` string, required — Percentage of payment to be moved to specified destination. e.g. 7.25.
    - `conditionalSplitConfig` RuleConditionalSplitConfig — Configuration for a Conditional Split Rule
      - `destinationId` string, required — Id of destination beneficiary. e.g. B1000001.
      - `percent` string, required — Percentage of payment to be moved to specified destination. e.g. 7.25.
      - `conditionAmount` number, required — Amount the conditional split rule should reach before defaulting to the split rule. e.g. 100.
      - `conditionDone` boolean — Whether the condition amount has been met. e.g. true or false
    - `sourceId` string — Account to fund the supplied accountId. e.g. A1000002. Funding Rule Only

## Response `200`

OK

- RuleRuleResponse
  - `id` string, required — Unique identifier for a Rule
  - `type` 'SPLIT' | 'SWEEP' | 'FUNDING', required — The type of Rule. Can be one of the following {SWEEP, SPLIT, FUNDING}
  - `status` 'ACTIVE' | 'INACTIVE'
  - `name` string, required — Rule's name
  - `accountId` string, required — The Account which the Rule is created on.
  - `accountCurrency` 'GBP' | 'EUR' | 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'FJD' | 'FKP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'SHP' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required
  - `masterId` string, required — The master rule ID. When a rule is changed, the original is marked as inactive, and a new one created. The master ID enables us to identify those rules which are updates
  - `data` RuleRuleConfigData, required — Configuration fields for all types of rules. To be populated where applicable based on rule type.
    - `daysToRun` string[] — Day(s) of the week the rule is to run. e.g. ["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]. Sweep Rule Only
    - `frequency` 'Daily' — Frequency of the rule. Sweep Rule Only
    - `destinationId` string — Id of destination beneficiary. e.g. B1000001. Sweep Rule Only
    - `balanceToLeave` number — Balance to be left after the rule has been ran. e.g. 100.00. Sweep Rule Only
    - `triggerBalance` number — Minimum balance required to trigger the rule. e.g. 100.00. Sweep Rule Only
    - `splits` RuleSplitConfig[]
      - `destinationId` string, required — Id of destination beneficiary. e.g. B1000001.
      - `percent` string, required — Percentage of payment to be moved to specified destination. e.g. 7.25.
    - `conditionalSplits` RuleSplitConfig[]
      - `destinationId` string, required — Id of destination beneficiary. e.g. B1000001.
      - `percent` string, required — Percentage of payment to be moved to specified destination. e.g. 7.25.
    - `conditionalSplitConfig` RuleConditionalSplitConfig — Configuration for a Conditional Split Rule
      - `destinationId` string, required — Id of destination beneficiary. e.g. B1000001.
      - `percent` string, required — Percentage of payment to be moved to specified destination. e.g. 7.25.
      - `conditionAmount` number, required — Amount the conditional split rule should reach before defaulting to the split rule. e.g. 100.
      - `conditionDone` boolean — Whether the condition amount has been met. e.g. true or false
    - `sourceId` string — Account to fund the supplied accountId. e.g. A1000002. Funding Rule Only

## Other responses

- `400` — Validation errors

---

[API](https://skmtc.net/modulrfinance/apis/modulr-api.md) · [All operations](https://skmtc.net/modulrfinance/apis/modulr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/modulrfinance/modulr-api/versions/cbd52524c8ef/schema)
