---
title: "List all rules"
method: GET
path: "/rules"
tags: ["Rules"]
---

# List all rules

`GET /rules`

Lists rules for the current client, including associated route assignments with weights.

## Headers

- `X-Client-ID` integer

## Response `200`

List of rules.

- Rule[]
  - `id` integer
  - `client_id` integer
  - `rule_name` string
  - `tag` string
  - `priority` integer — Lower number = higher priority.
  - `expression` string — Expression evaluated by `expr.Compile()`. Available variables: `from_address`, `from_domain`, `from_local`, `to_address`, `to_domain`, `to_local`, `headers`, `remote_ip`, `helo`, `size`. Helper functions: `StartsWith()`, `EndsWith()`, `Contains()`, `Matches()`, `ToLower()`, `ToUpper()`, `Trim()`.
  - `enabled` boolean
  - `rule_routes` RuleRouteAssignment[]
    - `id` integer
    - `provider_name` string
    - `route_id` integer
    - `route_name` string
    - `weight` integer — Distribution weight.
    - `enabled` boolean
  - `created_at` string, date-time

---

[API](https://skmtc.dev/netcorecloud/apis/email-api-v6.md) · [All operations](https://skmtc.dev/netcorecloud/apis/email-api-v6/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netcorecloud/email-api-v6/revisions/73f83bc2eff8/schema)
