---
title: "Create or update a route"
method: PUT
path: "/channels/{channel_id}/routes/{route_name}"
tags: ["Channel Route Operations"]
---

# Create or update a route

`PUT /channels/{channel_id}/routes/{route_name}`

## Request

- Base URL: `https://developers.bloomreach.io/delivery/site/v2/documents`
- URL: `https://developers.bloomreach.io/delivery/site/v2/documents/channels/{channel_id}/routes/{route_name}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/bloomreach/apis/documents-delivery-api-2-0/docs/channels/:channel_id/routes/:route_name/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `channel_id` string, required
- `route_name` string, required

## Headers

- `X-Resource-Version` string

## Request body

- Route
  - `name` string, required: the name (url path element) of the sitemap item. Each sitemap item name must be unique between its siblings.
  - `layout` string: the name of the (default) layout definition for rendering a url matching this sitemap item
  - `pageTitle` string: default page (header) title
  - `relativeContentPath` string: the (base) content path, relative to the channel (base) content path to use for rendering this sitemap item page, or any of its children
  - `referenceId` string: the (unique) reference id value can be used instead of the content path to create a direct link to this sitemap item
  - `parameters` object: a map of string parameters (names/values) for rendering this sitemap item page
  - `documentRequired` boolean: boolean value if the URL should have a (primary) document or folder item. Default false when missing. If the value is true and the URL does not map to a specific content item, the PageModelApi returns a 404 page.
  - `doctypePages` object: a more specialized page (name) mapping based on the matched document its type
  - `items` Route[]: a list of child sitemap items.

## Response `200`

OK

- Route
  - `name` string, required: the name (url path element) of the sitemap item. Each sitemap item name must be unique between its siblings.
  - `layout` string: the name of the (default) layout definition for rendering a url matching this sitemap item
  - `pageTitle` string: default page (header) title
  - `relativeContentPath` string: the (base) content path, relative to the channel (base) content path to use for rendering this sitemap item page, or any of its children
  - `referenceId` string: the (unique) reference id value can be used instead of the content path to create a direct link to this sitemap item
  - `parameters` object: a map of string parameters (names/values) for rendering this sitemap item page
  - `documentRequired` boolean: boolean value if the URL should have a (primary) document or folder item. Default false when missing. If the value is true and the URL does not map to a specific content item, the PageModelApi returns a 404 page.
  - `doctypePages` object: a more specialized page (name) mapping based on the matched document its type
  - `items` Route[]: a list of child sitemap items.

## Other responses

- `201`: Created
- `403`: Forbidden

---

[API](https://skmtc.dev/bloomreach/apis/documents-delivery-api-2-0.md) - [All operations](https://skmtc.dev/bloomreach/apis/documents-delivery-api-2-0/llms.txt) - [OpenAPI document](https://skmtc.dev/bloomreach/apis/documents-delivery-api-2-0/revisions/87bfc06578c2?raw)
