---
title: "POST /lb/routes"
method: POST
path: "/lb/routes"
tags: ["Load Balancer"]
---

# POST /lb/routes

`POST /lb/routes`

## Request

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

## Request body

- CreateRouteRequest
  - `domain` string, required
  - `enabled` boolean, nullable: Whether the route serves traffic as soon as it is created. Defaults to `true`; send `false` to create the route disabled and enable it later with `PUT /lb/routes/{domain}`.
  - `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 `201`

Route created 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 domain or upstream: malformed, reserved or generated by the platform, or an upstream that is not an allowed destination
- `401`: Unauthorized
- `403`: Requires an administrator (load_balancer:write)
- `409`: The domain is already a route, a status page host, an environment address or a project custom domain

## Changes

- **2026-11-26** `199b8052eb32`: 2 breaking, 1 info
  - the `created_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
  - the `updated_at` response's property type changed from `integer` to `string`, and format from `int64` to `date-time` for status `201`
  - added the new optional request property `enabled`
- **2026-11-15** `c5965797b8b1`: 3 info
  - added the non-success response with the status `401`
  - 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 `401`
  - 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 `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `409`
- **2026-01-11** `50604ba8d4a8`: 2 info
  - added the new optional request property `route_type`
  - added the required property `route_type` to the response with the `201` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/lb/routes/post.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)
