---
title: "Update a GatewayConfig."
method: POST
path: "/v1/gateway-configs/{id}"
tags: ["gateway-configs"]
---

# Update a GatewayConfig.

`POST /v1/gateway-configs/{id}`

Update an existing GatewayConfig. All fields are optional.

## Path parameters

- `id` string, required

## Request body

- GatewayConfigUpdateParameters — Parameters for updating an existing GatewayConfig. All fields are optional - only specified fields will be updated.
  - `name` string, nullable — New name for the GatewayConfig. Must be unique within your account.
  - `endpoint` string, nullable — New target endpoint URL (e.g., 'https://api.anthropic.com').
  - `auth_mechanism` AuthMechanismView — Defines how the primary credential is applied to requests proxied to the upstream.
    - `type` string, required — The type of authentication mechanism: 'header', 'bearer', or 'basic'. For 'basic', store the secret as plain 'user:pass'; the proxy base64-encodes it.
    - `key` string, nullable — The header name (e.g., 'x-api-key'). Required for 'header' type; invalid for other types.
  - `description` string, nullable — New description for this gateway configuration.
  - `custom_headers` CustomHeaderView[], nullable — New list of additional headers. Replaces the existing list entirely; use an empty list to clear all custom headers. At most 8 entries.
    - `name` string, required — The header name (e.g., 'DD-APPLICATION-KEY').
    - `secret` string, nullable — Account secret providing the header value. Accepts a secret name or 'sec_' id on writes; reads always return the 'sec_' id.
    - `value` string, nullable — Literal header value. Stored in plaintext and returned by reads - use 'secret' for credentials or other sensitive values.

## Response `200`

GatewayConfig updated successfully.

- GatewayConfigView — A GatewayConfig defines a configuration for proxying API requests through the agent gateway. It specifies the target endpoint and how credentials should be applied.
  - `id` string, required — The unique identifier of the GatewayConfig.
  - `account_id` string, nullable — The account ID that owns this config.
  - `name` string, required — The human-readable name of the GatewayConfig. Unique per account (or globally for system configs).
  - `endpoint` string, required — The target endpoint URL (e.g., 'https://api.anthropic.com').
  - `auth_mechanism` AuthMechanismView, required — Defines how the primary credential is applied to requests proxied to the upstream.
    - `type` string, required — The type of authentication mechanism: 'header', 'bearer', or 'basic'. For 'basic', store the secret as plain 'user:pass'; the proxy base64-encodes it.
    - `key` string, nullable — The header name (e.g., 'x-api-key'). Required for 'header' type; invalid for other types.
  - `description` string, nullable — Optional description for this gateway configuration.
  - `custom_headers` CustomHeaderView[], nullable — Additional headers applied to proxied requests after the auth mechanism. Secret-backed entries reference the secret by 'sec_' id; values are never returned.
    - `name` string, required — The header name (e.g., 'DD-APPLICATION-KEY').
    - `secret` string, nullable — Account secret providing the header value. Accepts a secret name or 'sec_' id on writes; reads always return the 'sec_' id.
    - `value` string, nullable — Literal header value. Stored in plaintext and returned by reads - use 'secret' for credentials or other sensitive values.
  - `create_time_ms` integer, required — Creation time of the GatewayConfig (Unix timestamp in milliseconds).

## Other responses

- `400` — Bad request. Invalid parameters.
- `401` — Unauthorized. Invalid or missing authentication.
- `403` — Forbidden. Account does not have devbox capability.
- `404` — GatewayConfig not found.
- `500` — Internal server error.

---

[API](https://skmtc.dev/runloopai/apis/runloop-api.md) · [All operations](https://skmtc.dev/runloopai/apis/runloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runloopai/runloop-api/revisions/e9dc776053e4/schema)
