---
title: "Create a routing Rule"
method: POST
path: "/euclid.EuclidService/Create"
tags: ["Static Routing"]
---

# Create a routing Rule

`POST /euclid.EuclidService/Create`

Creates a routing rule with the given parameters

## Headers

- `x-tenant-id` string, required
- `x-profile-id` string, required
- `x-api-key` string, required

## Request body

- RoutingRule
  - `name` string
  - `algorithm` Program
    - `globals` object
    - `default_selection` union
      - object
        - `connectors` string[]
      - object
        - `connectors` VolumeSplit[]
          - `split` integer
          - `output` string
      - object
        - `groups` VolumeSplitGroup[]
          - `split` integer
          - `output` string[]
    - `rules` Rule[]
      - `name` string
      - `routing_type` 'priority' | 'volume_split' | 'volume_split_priority'
      - `output` union
        - object
          - `connectors` string[]
        - object
          - `connectors` VolumeSplit[]
            - `split` integer
            - `output` string
        - object
          - `groups` VolumeSplitGroup[]
            - `split` integer
            - `output` string[]
      - `statements` IfStatement[]
        - `condition` Comparison[]
          - `lhs` string
          - `comparison` 'equal' | 'not_equal' | 'less_than' | 'less_than_equal' | 'greater_than' | 'greater_than_equal'
          - `value` ValueType
            - `key` string
            - `value` string
          - `metadata` object
        - `nested` IfStatement[]
    - `metadata` object

## Response `200`

Successful creation

- CreateResponse
  - `algorithm_id` string — Algorithm Id for the routing rule
  - `name` string — name of the routing rule
  - `created_at` string — Timestamp for creation of routing rule
  - `modified_at` string — Timestamp for modification of routing rule

## Other responses

- `400` — Invalid request parameters
- `500` — Internal server error

---

[API](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0.md) · [All operations](https://skmtc.net/hyperswitch/apis/dynamic-routing-openapi-3-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hyperswitch/dynamic-routing-openapi-3-0/revisions/8fbf69ab2597/schema)
