Activate Routing Rule

July 28, 2026 · View on GitHub

Use case

Marks a created routing algorithm as active for the merchant/creator scope.

Authentication

Protected. Send either Authorization: Bearer <jwt_token> or x-api-key: <api_key>. In sandbox, also send x-feature: decision-engine.

For local development, start with:

export BASE_URL=http://localhost:8080
export AUTH_HEADER="Authorization: Bearer <jwt_token>"
# Sandbox only:
# export BASE_URL=https://sandbox.hyperswitch.io
# export FEATURE_HEADER="x-feature: decision-engine"

Request

  • Method and path: POST /routing/activate
  • Parameters: none.
  • Body: JSON body with created_by and routing_algorithm_id or rule identifier returned by /routing/create.

Example

Activate rule

curl --location "$BASE_URL/routing/activate" \
  --header "$AUTH_HEADER" \
  --header "Content-Type: application/json" \
  --data '{
  "created_by": "merchant_demo",
  "routing_algorithm_id": "routing_e641380c-6f24-4405-8454-5ae6cbceb7a0"
}'

Response

Success returns HTTP 200 with an empty response body.

Notes

  • Only one routing algorithm should be active for a given creator scope.
  • Activate before calling /routing/evaluate from the explorer.