---
title: "Reorder recipient routes"
method: POST
path: "/routes/reorder"
tags: ["Routes"]
---

# Reorder recipient routes

`POST /routes/reorder`

Update the priority of one or more routes in a single call.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `updates` object[], required
    - `id` string, uuid, required
    - `priority` integer, required

## Response `200`

Updated route list

- object
  - `success` true, required
  - `data` object[], required
    - `id` string, uuid, required
    - `org_id` string, uuid
    - `domain_id` string, uuid, nullable — Domain the route is scoped to; null = org-wide.
    - `match_type` 'exact' | 'wildcard' | 'regex'
    - `pattern` string — The recipient address pattern (an exact address or a wildcard).
    - `pattern_norm` string, nullable — Normalized pattern used for matching.
    - `endpoint_id` string, uuid — The endpoint inbound mail matching this rule is delivered to.
    - `priority` integer — Evaluation order within a scope; lower is checked first.
    - `enabled` boolean
    - `match_count` string — How many emails have matched this rule (a bigint, returned as a string).
    - `last_matched_at` string, date-time, nullable
    - `created_at` string, date-time

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid or missing API key

---

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