---
title: "Update a redirect rule"
method: PATCH
path: "/redirects/{id}"
tags: ["Redirects"]
---

# Update a redirect rule

`PATCH /redirects/{id}`

## Request

- Base URL: `https://api.cavuno.com/v1`
- URL: `https://api.cavuno.com/v1/redirects/{id}`
- Auth: HTTP bearer

Updates the specified redirect by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

## Path parameters

- `id` string, required: The redirect ID returned by create or list endpoints.

## Request body

- UpdateRedirectBody
  - `fromPath` string: Source path to match, for example `/old-careers`.
  - `toPath` string: Destination path or URL, for example `/jobs`.
  - `statusCode` union: HTTP status code. One of `301` or `302`.
    - 301
    - 302

## Response `200`

Successful response.

- Redirect
  - `id` string, required: Unique identifier for the redirect.
  - `object` 'redirect', required: String representing the object's type. Objects of the same type share the same value.
  - `fromPath` string, required: Source path matched by this redirect.
  - `toPath` string, required: Destination path or URL.
  - `statusCode` union, required: HTTP status code used when redirecting.
    - 301
    - 302
  - `createdAt` string, required: Time at which the redirect was created. ISO 8601 datetime.

## Other responses

- `400`: The request was malformed.
- `404`: Redirect not found.
- `409`: The new fromPath collides with another redirect.

## Changes

- **2026-10-19** `c34152c38176`: 3 info
  - added the optional property `error/upgrade` to the response with the `400` status
  - added the optional property `error/upgrade` to the response with the `404` status
  - added the optional property `error/upgrade` to the response with the `409` status

[Operation history](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/changes/redirects/:id/patch.md)

---

[API](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api.md) · [All operations](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/revisions/d5974dabff14?raw)
