---
title: "PATCH /preview-gateway/settings"
method: PATCH
path: "/preview-gateway/settings"
tags: ["Preview Gateway"]
---

# PATCH /preview-gateway/settings

`PATCH /preview-gateway/settings`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/preview-gateway/settings`
- Auth: HTTP bearer

## Request body

- PatchSettingsRequest
  - `auto_upgrade` boolean, nullable
  - `container_name` string, nullable: Docker container name for this instance's gateway; empty resets it to the default. Change it only when several Temps instances share one Docker daemon: each needs its own name and host port. A new name first removes this instance's gateway under the old one, and while the gateway is enabled it is then created under the new one. Refused while this host has sandboxes: their networks keep the current name.
  - `enabled` boolean, nullable: Turn the gateway off (its containers are removed at once, so preview URLs stop being served) or on (it is created again).
  - `host_port` integer, nullable
  - `image` string, nullable

## Response `200`

- PreviewGatewaySettingsResponse
  - `auto_upgrade` boolean, required
  - `container_name` string, required: Docker container name of this instance's gateway.
  - `default_container_name` string, required: The default container name. Only installs that share one Docker daemon with another Temps instance need a different one.
  - `default_host_port` integer, required: The compile-time default host port.
  - `default_image` string, required: The compile-time default image — exposed so the UI can offer a "Reset to default" link without round-tripping.
  - `enabled` boolean, required: Whether Temps runs the gateway. While false its containers are removed and workspace preview URLs are not served.
  - `host_port` integer, required
  - `image` string, required

## Other responses

- `400`: The container name is not one Docker accepts
- `409`: Another gateway operation is still running, or the container name cannot change while this host has sandboxes
- `500`: Saving the settings failed, or applying them to the gateway's containers failed

## Changes

- **2026-11-09** `12896146b193`: 3 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `409` status
  - removed the required property `extensions` from the response with the `500` status
- **2026-10-05** `4b228ebed583`: 8 info
  - added the new optional request property `container_name`
  - added the new optional request property `enabled`
  - added the non-success response with the status `400`
  - added the non-success response with the status `409`
  - …4 more
- **2026-10-05** `63a80791dc58`: 3 breaking, 3 warning, 2 info
  - removed the required property `container_name` from the response with the `200` status
  - removed the required property `default_container_name` from the response with the `200` status
  - removed the required property `enabled` from the response with the `200` status
  - removed the request property `container_name`
  - …4 more
- **2026-10-03** `de8387218c0b`: 7 info
  - added the new optional request property `container_name`
  - added the new optional request property `enabled`
  - added the non-success response with the status `400`
  - added the non-success response with the status `409`
  - …3 more
- **2026-09-23** `f4efc4d5c7b7`: 1 info
  - added the optional property `status` to the response with the `500` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/preview-gateway/settings/patch.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)
