create_traffic_route
Create a traffic route on a UniFi site to enable policy-based routing or WAN load-balancing by specifying source network, matching target, and target devices.
Instructions
Create a traffic route on a site (policy-based routing / WAN load-balancing).
host: console name, ID, or composite ID (MAC:numericId format). site: site name or ID. payload: required fields (validated locally — a missing field raises ValueError naming it — and verified against the live controller). This v2 endpoint uses snake_case wire field names (verified: 'network_id' is accepted, 'networkId' is not):
network_id (str): source network UUID (from list_networks), or 'ANY'
matching_target: 'INTERNET'|'ALL' or a traffic matching list ID
target_devices: the devices/networks the route applies to Optional: matching_target_type ('INTERNET'|'DOMAIN'|'IP_GROUP'), description (str).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | ||
| site | Yes | ||
| payload | Yes |