---
title: "Update a route"
method: PATCH
path: "/v1/domains/{domain}/routes/{address}"
tags: ["Domains"]
---

# Update a route

`PATCH /v1/domains/{domain}/routes/{address}`

## Request

- Base URL: `https://api.novu.co`
- URL: `https://api.novu.co/v1/domains/{domain}/routes/{address}`
- Auth: API key in header `Authorization`

Updates the destination of the route bound to `<address>@<domain>`. The address itself is the resource identity and cannot be changed; delete and recreate the route to rename it.

## Path parameters

- `domain` string, required
- `address` string, required

## Headers

- `idempotency-key` string

## Request body

- UpdateDomainRouteDto
  - `agentId` string: Agent identifier; required when type is agent, ignored when type is webhook.
  - `type` 'agent' | 'webhook'
  - `data` object: Replaces route metadata when provided (max 10 keys, 500 characters total for keys+values).

## Response `200`

OK

- DomainRouteResponseDto
  - `_id` string, required
  - `_domainId` string, required
  - `address` string, required
  - `agentId` string: Internal id of the destination agent. Only present for agent routes.
  - `type` 'agent' | 'webhook', required
  - `_environmentId` string, required
  - `_organizationId` string, required
  - `createdAt` string, required
  - `updatedAt` string, required
  - `data` object: String key-value metadata (max 10 keys, 500 characters total when set via API).

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `409`: Conflict
- `413`: Payload Too Large
- `414`: URI Too Long
- `415`: Unsupported Media Type
- `422`: Unprocessable Entity
- `429`: The client has sent too many requests in a given amount of time.
- `500`: Internal Server Error
- `503`: The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.

---

[API](https://skmtc.dev/novu/apis/novu-api.md) - [All operations](https://skmtc.dev/novu/apis/novu-api/llms.txt) - [OpenAPI document](https://skmtc.dev/novu/apis/novu-api/revisions/6349165a6e58?raw)
