> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List routing rules

> List the organization's alert routing rules in the order they are tried.

```http theme={null}
GET /api/v1/alerts/routing/rules
```

Lists the organization's [routing rules](https://docs.molesignal.com/en-US/alerting/routing.md#routing-rules) in the order they are tried (`position` ascending). It requires `alerts.routing.read`. Rules that are off are listed too.

```bash cURL theme={null}
curl http://localhost:5080/api/v1/alerts/routing/rules \
  -H "authorization: Bearer $MS_TOKEN"
```

```json 200 theme={null}
[
  {
    "id": "3KF0q7vXbJ2mYc8sTn4LwRk9Ez1",
    "org_id": "<organization-id>",
    "name": "Payments in production",
    "enabled": true,
    "position": 0,
    "conditions": [
      { "key": "env", "operator": "equals", "values": ["prod"] },
      { "key": "service.name", "operator": "in", "values": ["checkout", "cart"] }
    ],
    "min_severity": "error",
    "origins": [],
    "target": { "kind": "team", "team_id": "<team-id>" },
    "created_by": "<user-id>",
    "created_at": 1790000000000000,
    "updated_at": 1790000000000000
  }
]
```

## Rule fields

| Field | Description |
| - | - |
| `id`, `org_id` | Identifiers of the rule and the organization. |
| `name` | The rule's name. |
| `enabled` | A rule that is off is not tried. |
| `position` | The order of trying; smaller first. |
| `conditions` | Conditions on the incident's labels, all of which must hold; empty matches every incident. Each has a `key`, an `operator` and `values`. |
| `min_severity` | The incident's severity must be at least this: `info`, `warning`, `error` or `critical`; `null` for any. |
| `origins` | The origins the rule applies to: `rule` (alert rules), `external` (alert sources), `synthetic` (synthetic checks); empty for all. |
| `target` | Where a matching incident goes: `{"kind": "team", "team_id": …}` or `{"kind": "policy", "policy_id": …}`. |
| `created_by` | The user who created the rule. |
| `created_at`, `updated_at` | When the rule was created and last changed, in microseconds. |

Values of `operator`:

| `operator` | `values` | Matches when |
| - | - | - |
| `equals` | One value | The label equals the value. |
| `not_equals` | One value | The label differs from the value, or the incident lacks the label. |
| `in` | One or more values | The label equals any of them. |
| `matches` | One regular expression | The whole label value matches it. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.