---
title: "Update rule config"
method: POST
path: "/rule/update"
tags: ["Rule Configuration"]
---

# Update rule config

`POST /rule/update`

Update an existing rule configuration.

## Request body

- RuleConfigRequest
  - `merchant_id` string, required
  - `config` ConfigVariant, required
    - `type` 'successRate' | 'elimination' | 'debitRouting', required
    - `data` union, required — Variant payload selected by `type`. Fields are camelCase.
      - SuccessRateData
        - `defaultLatencyThreshold` number, double, nullable
        - `defaultBucketSize` integer, nullable
        - `defaultHedgingPercent` number, double, nullable
        - `defaultLowerResetFactor` number, double, nullable
        - `defaultUpperResetFactor` number, double, nullable
        - `defaultGatewayExtraScore` GatewayWiseExtraScore[], nullable
          - `gatewayName` string, required
          - `gatewaySigmaFactor` number, double, required
        - `subLevelInputConfig` SRSubLevelInputConfig[], nullable
          - `paymentMethodType` string, nullable
          - `paymentMethod` string, nullable
          - `cardNetwork` string, nullable
          - `cardIsIn` string, nullable
          - `currency` string, nullable
          - `country` string, nullable
          - `authType` string, nullable
          - `source` string, nullable — `autopilot` for entries managed by the auto-calibrator. Absent for human-authored ones.
          - `latencyThreshold` number, double, nullable
          - `bucketSize` integer, nullable
          - `hedgingPercent` number, double, nullable
          - `lowerResetFactor` number, double, nullable
          - `upperResetFactor` number, double, nullable
          - `gatewayExtraScore` GatewayWiseExtraScore[], nullable
            - `gatewayName` string, required
            - `gatewaySigmaFactor` number, double, required
        - `margin` number, double, nullable — Merchant margin as a fraction of ticket, used by the multi-objective expected-value ranking.
      - EliminationData
        - `threshold` number, double, required
        - `txnLatency` object, nullable
          - `gatewayLatency` number, double, nullable
      - DebitRoutingData
        - `merchantCategoryCode` string, required
        - `acquirerCountry` string, required

## Response `200`

Rule config updated

- RuleConfigResponse
  - `message` string
  - `merchant_id` string
  - `config` ConfigVariant
    - `type` 'successRate' | 'elimination' | 'debitRouting', required
    - `data` union, required — Variant payload selected by `type`. Fields are camelCase.
      - SuccessRateData
        - `defaultLatencyThreshold` number, double, nullable
        - `defaultBucketSize` integer, nullable
        - `defaultHedgingPercent` number, double, nullable
        - `defaultLowerResetFactor` number, double, nullable
        - `defaultUpperResetFactor` number, double, nullable
        - `defaultGatewayExtraScore` GatewayWiseExtraScore[], nullable
          - `gatewayName` string, required
          - `gatewaySigmaFactor` number, double, required
        - `subLevelInputConfig` SRSubLevelInputConfig[], nullable
          - `paymentMethodType` string, nullable
          - `paymentMethod` string, nullable
          - `cardNetwork` string, nullable
          - `cardIsIn` string, nullable
          - `currency` string, nullable
          - `country` string, nullable
          - `authType` string, nullable
          - `source` string, nullable — `autopilot` for entries managed by the auto-calibrator. Absent for human-authored ones.
          - `latencyThreshold` number, double, nullable
          - `bucketSize` integer, nullable
          - `hedgingPercent` number, double, nullable
          - `lowerResetFactor` number, double, nullable
          - `upperResetFactor` number, double, nullable
          - `gatewayExtraScore` GatewayWiseExtraScore[], nullable
            - `gatewayName` string, required
            - `gatewaySigmaFactor` number, double, required
        - `margin` number, double, nullable — Merchant margin as a fraction of ticket, used by the multi-objective expected-value ranking.
      - EliminationData
        - `threshold` number, double, required
        - `txnLatency` object, nullable
          - `gatewayLatency` number, double, nullable
      - DebitRoutingData
        - `merchantCategoryCode` string, required
        - `acquirerCountry` string, required

## Changes

> 13 revisions in range; 1 could not be searched.

- **2026-08-04** `36e7a0972ee6` — 2 breaking, 3 info
  - added the new required request property `config/data`
  - added the new required request property `config/type`
  - added the optional property `message` to the response with the `200` status
  - added the required property `config/data` to the response with the `200` status
  - …1 more
- **2026-04-25** `986e537b0455` — 2 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
  - the endpoint scheme security `BearerAuth` was added to the API
- **2026-04-10** `9618544de91a` — 2 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API
  - the endpoint scheme security `BearerAuth` was removed from the API

[Change history](https://skmtc.dev/juspay/apis/decision-engine/changes/rule/update/post.md)

---

[API](https://skmtc.dev/juspay/apis/decision-engine.md) · [All operations](https://skmtc.dev/juspay/apis/decision-engine/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/juspay/decision-engine/revisions/a35ceeb59faf/schema)
