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...")
Parameter Type Required Default Description
name string yes SSID broadcast name (e.g. "iot").
passphrase string yes WPA pre-shared key (8-63 chars). Required unless security="open".
network_id string yes _id of the network/VLAN this SSID lives on. Get it from list_networks.
security string no “wpapsk” "wpapsk" (default), "wpaeap", or "open".
wpa_mode string no “wpa2” "wpa2" (default) or "wpa3" if all clients support it.
is_guest boolean no false True isolates clients from each other and the rest of the LAN.
hide_ssid boolean no false True suppresses SSID broadcast.
wlan_band string no “both” "2g", "5g", "6g", or "both" (default).
ap_group_ids `array null` no null
ap_group_mode string no “all” "all" (default) broadcasts on every AP in the listed groups. Matches the controller UI default.
controller string no “default” Name of the UniFi controller to target. Defaults to "default".
dry_run boolean no false Preview the change without applying it. Returns the predicted change set.