---
title: "Update device network configuration"
method: PATCH
path: "/v1/device/{device_id}/network"
tags: ["Devices"]
---

# Update device network configuration

`PATCH /v1/device/{device_id}/network`

Update the network configuration for a device. The configuration is tested after it is applied, and rolled back if invalid.

## Path parameters

- `device_id` string, required — ID of a device

## Request body

- DeviceNetworkUpdate — Device network configuration update
  - `dns_server_primary` string, ipv4 — Primary DNS server IP address. Required when network_mode is "static".
  - `dns_server_secondary` string, ipv4 — Secondary DNS server IP address. Optional when network_mode is "static".
  - `network_address` string — IP address and network mask in CIDR notation (e.g., "192.168.1.100/24"). Required when network_mode is "static".
  - `network_gateway` string, ipv4 — Gateway IP address. Required when network_mode is "static".
  - `network_mode` 'dhcp' | 'static' — Network mode (DHCP or static IP)

## Response `200`

OK

- DeviceNetwork — Device network configuration
  - `dns_server_primary` string, ipv4 — Primary DNS server IP address. Required when network_mode is "static".
  - `dns_server_secondary` string, ipv4 — Secondary DNS server IP address. Optional when network_mode is "static".
  - `network_address` string — IP address and network mask in CIDR notation (e.g., "192.168.1.100/24"). Required when network_mode is "static".
  - `network_gateway` string, ipv4 — Gateway IP address. Required when network_mode is "static".
  - `network_mode` 'dhcp' | 'static', required — Network mode (DHCP or static IP)
  - `network_update_pending` boolean — Returned in response only, to indicate that the network update is in progress.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/slide/apis/slide-api.md) · [All operations](https://skmtc.net/slide/apis/slide-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/slide/slide-api/revisions/c63e4b604dd1/schema)
