Skip to content

create_wlan

Create a WiFi SSID bound to an existing network/VLAN.

Side effects:

  • Adds a new WLAN record. Access points start broadcasting the SSID within seconds of the apply.
  • Mutates controller state. Use dry_run=True to preview the change without applying.

AP-group binding:

  • UniFi controllers reject POST /rest/wlanconf with api.err.ApGroupMissing when ap_group_ids is absent. When ap_group_ids is unset, this tool calls list_ap_groups and uses the controller’s “default” group automatically. Pass an explicit list to broadcast only on specific groups.
create_wlan(name="iot", passphrase="hunter2hunter2", network_id="65f...")
ParameterTypeRequiredDefaultDescription
namestringyesSSID broadcast name (e.g. "iot").
passphrasestringyesWPA pre-shared key (8-63 chars). Required unless security="open".
network_idstringyes_id of the network/VLAN this SSID lives on. Get it from list_networks.
securitystringno”wpapsk”"wpapsk" (default), "wpaeap", or "open".
wpa_modestringno”wpa2”"wpa2" (default) or "wpa3" if all clients support it.
is_guestbooleannofalseTrue isolates clients from each other and the rest of the LAN.
hide_ssidbooleannofalseTrue suppresses SSID broadcast.
wlan_bandstringno”both”"2g", "5g", "6g", or "both" (default).
ap_group_ids`arraynull`nonull
ap_group_modestringno”all”"all" (default) broadcasts on every AP in the listed groups. Matches the controller UI default.
controllerstringno”default”Name of the UniFi controller to target. Defaults to "default".
dry_runbooleannofalsePreview the change without applying it. Returns the predicted change set.