---
title: "Create routing rule"
method: POST
path: "/routing/create"
tags: ["Routing Rules"]
---

# Create routing rule

`POST /routing/create`

Create a new Euclid declarative routing rule for a merchant. Supports `advanced` (full Euclid DSL), `priority` (ordered gateway list), `single` (fixed gateway), `volume_split` (percentage-based distribution), `ab_test`, and `volume_contract` (volume-commitment contract document, stored in the dedicated `algorithm_for: volume_commitment` slot; not evaluable by /routing/evaluate) algorithm types.

## Request body

- CreateRoutingRuleRequest
  - `name` string, required
  - `description` string
  - `created_by` string, required
  - `algorithm_for` 'payment' | 'payout' | 'three_ds_authentication' | 'volume_commitment' — Activation slot for the rule. `payment` rules are evaluated by /routing/evaluate; `volume_commitment` holds the merchant's volume-contract configuration document and is required iff `algorithm.type` is `volume_contract`.
  - `algorithm` RoutingAlgorithm, required
    - `type` 'priority' | 'single' | 'volume_split' | 'advanced' | 'ab_test' | 'volume_contract', required
    - `data` unknown, required
  - `metadata` object, nullable — Free-form metadata stored with the rule.

## Response `200`

Routing rule created

- RoutingDictionaryRecord — Summary record returned when a routing rule is created.
  - `rule_id` string
  - `name` string
  - `algorithm_for` string
  - `created_at` string
  - `modified_at` string

## Changes

- **2026-08-31** `ac1bf3c6e928` — 2 info
  - added the new `volume_commitment` enum value to the request property `algorithm_for`
  - added the new `volume_contract` enum value to the request property `algorithm/type`
- **2026-08-04** `36e7a0972ee6` — 3 warning, 4 info
  - removed the optional property `algorithm` from the response with the `200` status
  - removed the optional property `created_by` from the response with the `200` status
  - removed the optional property `description` from the response with the `200` status
  - added the new optional request property `metadata`
  - …3 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/routing/create/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/ac1bf3c6e928/schema)
