---
title: "Create network"
method: POST
path: "/v1/network"
tags: ["Networks"]
---

# Create network

`POST /v1/network`

## Request body

- object
  - `bridge_device_id` string — ID of a device
  - `client_id` string — ID of a client or an empty string
  - `comments` string — Comments about the network
  - `dhcp` boolean — Whether the disaster network should have DHCP
  - `dhcp_range_end` string — DHCP range end for the network
  - `dhcp_range_start` string — DHCP range start for the network
  - `internet` boolean — Whether the network should have Internet access
  - `name` string, required — Name of the network
  - `nameservers` string[] — List of DNS servers
  - `router_prefix` string — Router IP and netmask for the network
  - `type` 'standard' | 'bridge-lan', required — Network type of the disaster network
  - `vlan_tag` integer — VLAN tag for bridge-LAN networks (0 = no tagging, 1-4094 = tagged)
  - `wg` boolean — Whether the network should have WireGuard enabled
  - `wg_prefix` string — WireGuard IP address and netmask for the WireGuard network

## Response `201`

Created

- Network — Network object that represents a network.
  - `bridge_device_id` string — ID of a device
  - `client_id` string — ID of a client
  - `comments` string, required — Comments about the network
  - `connected_virt_ids` VirtID[], required — List of the virtual machines connected to the network.
  - `dhcp` boolean — Whether the disaster network should have DHCP
  - `dhcp_range_end` string — DHCP range end for the network
  - `dhcp_range_start` string — DHCP range start for the network
  - `internet` boolean — Whether the network should have Internet access
  - `ipsec_conns` NetworkIPSecConn[]
    - `ipsec_id` string, required — ID of an IPsec connection
    - `local_addrs` string[], required — Public IP addresses of the Slide Cloud gateway that manages the IPsec connection
    - `local_id` string, required — Identifier for the Slide Cloud-side of the IPsec connection
    - `local_networks` string[], required — List of Slide-side networks that are accessible through the IPsec connection
    - `name` string, required — Name of the IPsec connection
    - `psk` string, required — Pre-shared key for the IPsec connection
    - `remote_addrs` string[], required — Public IP addresses of the partner-side of the router/firewall
    - `remote_id` string, required — Identifier for the partner-side of the IPsec connection
    - `remote_networks` string[], required — List of partner-side networks that are accessible through the IPsec connection
  - `name` string, required — Name of the network
  - `nameservers` string[] — List of DNS servers
  - `network_id` string, required — ID of an network
  - `port_forwards` NetworkPortForward[]
    - `dest` string, required — Destination IP address and port pair
    - `endpoint` string — Public host:port pair of the public gateway of the port forward
    - `port` integer, required — Listen port number on the public gateway
    - `port_forward_id` string, required — ID of a port forward definition
    - `proto` string, required — Protocol, tcp or udp
  - `router_prefix` string — Router IP and netmask for the network
  - `type` 'standard' | 'bridge-lan', required — Network type of the disaster network
  - `vlan_tag` integer — VLAN tag for bridge-LAN networks (0 = no tagging, 1-4094 = tagged)
  - `wg` boolean — Whether the network should have WireGuard enabled
  - `wg_peers` NetworkWGPeer[]
    - `peer_name` string, required — Name of the WireGuard client
    - `remote_networks` string[], required — List of remote networks
    - `wg_address` string, required — WireGuard address of this peer, part of the network defined in wg_prefix
    - `wg_endpoint` string, required — Address of the WireGuard endpoint that this peer connects to
    - `wg_peer_id` string, required — ID of a WireGuard peer
    - `wg_private_key` string, required — WireGuard private key of this peer
    - `wg_public_key` string, required — WireGuard public key of this peer
  - `wg_prefix` string — WireGuard IP address and netmask for the WireGuard network
  - `wg_public_key` string — WireGuard server's public key

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `409` — Conflict
- `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)
