---
title: "Update a domain route"
method: PATCH
path: "/clusters/{cluster_id}/domains/{domain_id}/routes/{route_id}"
tags: ["Domain Routes"]
---

# Update a domain route

`PATCH /clusters/{cluster_id}/domains/{domain_id}/routes/{route_id}`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/clusters/{cluster_id}/domains/{domain_id}/routes/{route_id}`
- Auth: API key in header `API-Key`

Updates the CORS configuration or admin access setting for a route.

Required scope: `domains:write`

## Path parameters

- `cluster_id` string, uuid, required
- `domain_id` string, uuid, required
- `route_id` string, uuid, required

## Headers

- `API-Version` '2026-06-01.beta', required

## Request body

- UpdateDomainRouteRequest
  - `allow_admin_access` boolean
  - `cors_allowed_origins` string[]

## Response `200`

The request has succeeded.

- DomainRoute: A route that maps a custom domain to a Keycloak realm. Traffic arriving at the domain is served by the associated realm.
  - `id` string, uuid, required
  - `domain_id` string, uuid, required
  - `cluster_id` string, uuid, required
  - `realm` string, required: Keycloak realm name (not ID). Must start with a letter; allows letters, digits, and hyphens.
  - `hide_realm_path` boolean, required: When `true`, the `/realms/{name}` path segment is omitted from URLs served by this domain.
  - `allow_admin_access` boolean, required: When `true`, the Keycloak admin console is accessible via this domain.
  - `cors_allowed_origins` string[], required: CORS origins allowed to make requests via this domain.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `422`: Client error
- `429`: Client error
- `500`: Server error
- `501`: Server error

---

[API](https://skmtc.dev/skycloak/apis/skycloak-public-api.md) · [All operations](https://skmtc.dev/skycloak/apis/skycloak-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skycloak/apis/skycloak-public-api/revisions/33a69e2ce35f?raw)
