---
title: "PUT /lb/routes/{domain}"
method: PUT
path: "/lb/routes/{domain}"
tags: ["Load Balancer"]
---

# PUT /lb/routes/{domain}

`PUT /lb/routes/{domain}`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/lb/routes/{domain}`
- Auth: none declared

## Path parameters

- `domain` string, required

## Request body

- UpdateRouteRequest
  - `enabled` boolean, required
  - `host` string, required
  - `port` integer, required
  - `route_type` string, nullable: Route type: "http" (default) matches on HTTP Host header, "tls" matches on TLS SNI hostname for TCP passthrough

## Response `200`

Route updated successfully

- RouteResponse
  - `created_at` string, date-time, required: When the route was created (ISO 8601, UTC)
  - `domain` string, required
  - `enabled` boolean, required
  - `host` string, required
  - `id` integer, required
  - `port` integer, required
  - `route_type` string, required: Route type: "http" or "tls"
  - `updated_at` string, date-time, required: When the route was last changed (ISO 8601, UTC)

## Other responses

- `400`: Invalid upstream, or a domain that is no longer allowed for an enabled route
- `403`: Requires an administrator (load_balancer:write)
- `404`: Route not found
- `409`: The domain is now an environment address or a project custom domain
- `500`: Internal server error

## Changes

- **2026-11-26** `199b8052eb32`: 2 breaking
  - the `created_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `200`
  - the `updated_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `200`
- **2026-11-15** `c5965797b8b1`: 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`
  - added the non-success response with the status `409`
- **2026-11-15** `4e654843cab2`: 3 info
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `409`
- **2026-11-15** `7b49a82605a5`: 3 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`
  - added the non-success response with the status `409`
- **2026-11-03** `0add2fdd114a`: 1 info
  - added the non-success response with the status `500`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/lb/routes/:domain/put.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
