---
title: "PATCH /admin/gate-settings"
method: PATCH
path: "/admin/gate-settings"
tags: ["AdminGate"]
---

# PATCH /admin/gate-settings

`PATCH /admin/gate-settings`

## Request

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

## Request body

- UpdateAdminGateRequest
  - `allowed_hosts` string[], required
  - `allowed_ips` string[], required
  - `trust_forwarded_for` boolean, required

## Response `200`

Updated admin gate config

- AdminGateResponse
  - `allowed_hosts` string[], required: `Host` header values allowed. Empty = any host.
  - `allowed_ips` string[], required: IPs / CIDRs allowed to reach the admin listener. Empty = any source.
  - `editable` boolean, required: True when the config is writable through this API. False when env vars are dictating the active config.
  - `source` 'default' | 'db' | 'env', required: Where the active config came from.
  - `trust_forwarded_for` boolean, required: When true, the gate trusts `X-Forwarded-For` from loopback peers.

## Other responses

- `400`: Invalid IP/CIDR/host
- `401`: Unauthorized
- `403`: Insufficient permissions
- `409`: Env-overridden or would lock out caller

## Changes

- **2026-05-30** `b72341d12f63`: 1 info
  - endpoint added

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