---
title: "Update a recipient route"
method: PATCH
path: "/routes/{id}"
tags: ["Routes"]
---

# Update a recipient route

`PATCH /routes/{id}`

Update a recipient route

## Request body

- object
  - `match_type` 'exact' | 'wildcard' | 'regex'
  - `pattern` string
  - `endpoint_id` string, uuid
  - `domain_id` string, uuid, nullable
  - `priority` integer
  - `enabled` boolean

## Response `200`

Updated route

- object
  - `success` true, required
  - `data` object, required — A recipient routing rule binding an address pattern to one endpoint.
    - `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
- `403` — Authenticated caller lacks permission for the operation
- `404` — Resource not found
- `409` — The request conflicts with the current state of the resource

---

[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)
