go-unifi

Create Network

Create a new network on a site.

POST
/v1/sites/{siteId}/networks

Create a new network on a site.

X-Api-Key<token>

UniFi API key. Create one under Control Plane → Admins & Users → your admin → Create API Key (requires controller 9.0.114+).

In: header

Path Parameters

siteId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/sites/497f6eca-6276-4993-bfeb-53cbbbba6f08/networks" \  -H "Content-Type: application/json" \  -d '{    "management": "string",    "name": "Default Network",    "enabled": true,    "vlanId": 1  }'
{  "management": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "Default Network",  "enabled": true,  "vlanId": 1,  "metadata": {    "origin": "string"  },  "dhcpGuarding": {    "trustedDhcpServerIpAddresses": [      "string"    ]  },  "default": true}