---
title: "Reorder the routing rules of an integration"
method: POST
path: "/api/v1/observability/integrations/{integration}/routing-rules/reorder"
tags: ["Alert routing rules"]
---

# Reorder the routing rules of an integration

`POST /api/v1/observability/integrations/{integration}/routing-rules/reorder`

## Request

- Base URL: `https://wardenpoint.com` (the document declares no server; this is the origin it was published from)
- URL: `https://wardenpoint.com/api/v1/observability/integrations/{integration}/routing-rules/reorder`
- Auth: API key in header `X-API-Key`

Rewrites the evaluation order: the first UUID in `order` becomes position 0 and is tried first. This changes which rule wins for an alert that several rules match, so it changes routing, not just presentation. UUIDs that do not belong to this integration are ignored; rules omitted from the list keep their previous position, which can leave two rules sharing one — send the complete list. Returns the rules in their new order.

## Path parameters

- `integration` string, uuid, required

## Request body

- object
  - `order` string[], required: Every routing-rule UUID of this integration, most important first.

## Response `200`

Rules in their new order.

- object
  - `data` AlertRoutingRule[]
    - `uuid` string, uuid
    - `name` string, nullable: Label for humans. Optional.
    - `position` integer: Priority: 0 is evaluated first. Assigned automatically on create — appended last, except that a rule with no conditions (a catch-all) is never allowed to sit above a rule added after it: the new rule takes the catch-all's slot and the catch-all moves down. Change the order with the reorder endpoint.
    - `recipient_group_uuid` string, uuid, nullable: Group notified when the rule matches. Null means the rule matches but pages nobody — useful as a deliberate mute.
    - `target_kind` 'group' | 'event': Who the rule pages: `group` (a recipient group you name) or `event` (the people the alert itself names — a GitLab merge request lists its reviewers). `event` is accepted only for sources that name people; every other source rejects it with 422. A rule with `event` takes no `recipient_group_uuid`.
    - `addressee_set` 'all' | 'added' | 're_requested' | 'reviewed', nullable: Which of the people named by the event to page. Required when `target_kind` is `event`, otherwise null. `all` — every reviewer; `added` — only those this event added; `re_requested` — only those asked to review again; `reviewed` — only those who already looked at the diff. Anyone the event names but whose login is not bound to a recipient on the integration page is recorded there for binding, and an event where nobody is bound lands in the triage inbox with `addressee_unresolved`.
    - `recipient_group_name` string, nullable
    - `severities` string[]: Severities the rule matches. Empty means any.
    - `statuses` string[]: Statuses the rule matches. Empty means any.
    - `label_matchers` LabelMatcher[]: Label conditions, all of which must hold (AND).
      - `key` string, required: Label name as it arrives in the alert payload.
      - `op` '=' | '!=' | '=~' | '!~', required: Comparison: `=` equals, `!=` differs, `=~` matches the regex, `!~` does not match it.
      - `value` string, required: Value, or regex pattern for the `=~` and `!~` operators.
    - `threshold_count` integer, nullable: Per-rule override of the integration thresholds. Null falls back to the integration — but only while **all five** override fields are null; see below.
    - `window_minutes` integer, nullable: Length of the counting window. Null here does not always mean "inherits": the five override fields are read as one block, so if any sibling is set, this behaves as 1 minute instead of as the integration's window.
    - `below_threshold_action` 'suppress' | 'message' | 'escalate', nullable: What happens to occurrences before the threshold. Null behaves as the integration's default action once the override block is engaged.
    - `threshold_action` 'suppress' | 'message' | 'escalate', nullable: What happens at the threshold — the field that decides whether people are woken and how loudly: `escalate` pages at `critical` and starts the escalation chain, `message` pages at `normal` and starts none, `suppress` records silently. Null behaves as the integration's default action once the override block is engaged.
    - `after_threshold_action` 'suppress' | 'message' | 'escalate', nullable: What happens to further occurrences in the same window. Null behaves as `suppress` once the override block is engaged — not as the integration default — so a rule showing four nulls and one set field is quieter after its first page than it looks.
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `401`: API key missing, invalid, revoked or expired.
- `403`: API key lacks config.write, or the integration belongs to another company.
- `404`: No integration with this UUID.
- `422`: The `order` field is missing or is not an array of strings.

---

[API](https://skmtc.dev/wardenpoint/apis/wardenpoint-api.md) · [All operations](https://skmtc.dev/wardenpoint/apis/wardenpoint-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wardenpoint/apis/wardenpoint-api/revisions/259ee445728e?raw)
