---
title: "Replace a Frontend route"
method: PUT
path: "/projects/{id}/frontends/{frontendId}/frontend-routes/{routeId}"
tags: ["Frontends"]
---

# Replace a Frontend route

`PUT /projects/{id}/frontends/{frontendId}/frontend-routes/{routeId}`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/frontends/{frontendId}/frontend-routes/{routeId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Replaces the route's mounted Frontend and path. The new values must meet the same rules as on create.

## Path parameters

- `id` string, uuid, required
- `frontendId` string, uuid, required
- `routeId` string, uuid, required

## Request body

- CreateFrontendRouteRequest
  - `target_frontend_id` string, uuid, required: The Frontend to mount. It must be another Frontend in the Project.
  - `path_prefix` string, required

## Response `200`

Frontend route replaced

- FrontendRoute: A path prefix on this Frontend's hostnames served by another Frontend in the Project, the mounted Frontend. Paths are forwarded unchanged, so the mounted Frontend serves its prefix as real pages (page directories or a matching `basePath`).
  - `id` string, uuid, required
  - `project_id` string, uuid, required
  - `frontend_id` string, uuid, required: The Frontend whose hostnames serve the route
  - `target_frontend_id` string, uuid, required: The mounted Frontend
  - `path_prefix` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid path, or the Frontend would mount itself
- `401`: Unauthorized
- `403`: Project not owned by the caller
- `404`: Frontend route, Frontend, or mounted Frontend not found, or, with code `feature_unavailable`, Frontend routes are not available in this environment (see `GET /capabilities`)
- `409`: Path is already routed, or this Frontend or the mounted Frontend is being deleted
- `500`: Failed to replace Frontend route

## Changes

- **2026-10-26** `4b0676e06128`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/frontends/:frontendId/frontend-routes/:routeId/put.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
