---
title: "Update KMS/Gateway URLs"
method: PATCH
path: "/api/v1/cvms/{cvm_id}/network-config"
tags: ["CVMs", "cvms-network-config"]
---

# Update KMS/Gateway URLs

`PATCH /api/v1/cvms/{cvm_id}/network-config`

Update KMS and/or Gateway URLs for this CVM. Requires VMM >= 0.5.7.

## Path parameters

- `cvm_id` string, required

## Request body

- UpdateNetworkConfigRequest — Partial update for KMS/Gateway URLs. Only set fields are applied.
  - `kms_urls` string[], nullable
  - `gateway_urls` string[], nullable
  - `restart` boolean — Restart the CVM after applying changes to reload configuration.

## Response `200`

Updated network configuration

- NetworkConfigResponse — Real-time network configuration from VMM.
  - `kms_urls` string[]
  - `gateway_urls` string[]
  - `ports` NetworkConfigPortMappingEntry[]
    - `host_port` integer, required
    - `vm_port` integer, required
    - `protocol` string
    - `host_address` string

## Other responses

- `400` — VMM too old or invalid request
- `403` — Feature not enabled for this workspace
- `404` — CVM not found
- `422` — Validation Error

---

[API](https://skmtc.net/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.net/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/versions/83c6ae62e860/schema)
