All API endpoints require authentication via API key in the X-Api-Key header.
Create API Key:
- Log in to UniFi Network UI
- Navigate to Settings → Admins
- Select your admin account
- Click "Create API Token"
- Copy and save the token securely
Base Path: /proxy/network/api/s/{site}/rest
Legacy REST API with 31 endpoints covering traditional UniFi features.
Base Path: /proxy/network/v2/api/site/{site}
Modern REST API with 12 endpoints for newer features (DNS records, traffic rules, firewall zones, topology).
V1 REST API:
{
"meta": {"rc": "ok"},
"data": [{"_id": "123", "name": "example"}]
}V2 API:
[
{"_id": "123", "name": "example"}
]- Authentication - API key and session authentication
- Sites - Site management
- Accounts - RADIUS accounting records
- API Methods - REST, LIST, STAT, and GET patterns
- Networks - Network and VLAN configuration
- WiFi - WiFi network configuration
- WLAN Groups - WLAN group management
- DNS Records - Static DNS (V2 API only)
- DHCP & DNS - DHCP and DNS configuration
- Routing - Static route management
- Routing Table - Active routing table
- Port Forwarding - NAT port forwarding
- Dynamic DNS - Dynamic DNS configuration
- Users - Client configurations and DHCP reservations
- User Groups - Client user groups and QoS
- Port Configuration - Switch port profiles
- Tags - Device and client tags
- Guest Portal - Hotspot operators, vouchers, payments
- RF Environment - Channel assignments and country codes
- Traffic Rules - Traffic rules (V2 API only)
- NAT Rules - NAT rules (V2 API only)
- Network Topology - Network topology (V2 API only)
- AP Groups - AP groups (V2 API only)
- Firewall Rules - Firewall rule management
- Firewall Groups - Address and port groups
- Firewall Zones - Firewall zones (V2 API only)
- Firewall Zone Matrix - Zone matrix (V2 API only)
- Firewall Policies - Zone policies (V2 API only)
- RADIUS - RADIUS profiles and accounts
- IPS Events - Intrusion Prevention System events
- Rogue APs - Detected nearby access points
- Authorization - Client authorization records
- Events & Alarms - System events and alarms
- Alerts - Alerts (V2 API only)
- Notifications - Notifications (V2 API only)
- DPI & Traffic - Deep Packet Inspection statistics
- DPI Stats - Site and client DPI statistics
- Dashboard - Dashboard statistics and overview
- Health - Network subsystem health status
- Reports - Daily and hourly statistics reports
- Detailed Reports - 5-minute, hourly, and daily reports
- Clients - Connected client information
- All Users - All users (current and historical)
- Guest Access - Authorized guest users
- System - UniFi OS system information
- System Info - Network Application system information
- Settings - System settings and configuration
- Devices - UniFi device management
- Devices V2 - Devices (V2 API only)
- Device Basic Info - Basic device information (lightweight)
- Feature Flags - Feature flags (V2 API only)
- Network Status - Network Application status