You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A comprehensive developer reference and integration guide for Ubiquiti's UniFi Controller APIs - covering Site Manager Cloud, Cloud Connector Proxy, Local Network Integration, and Classic/Internal APIs.
Overview
The UniFi API allows programmatic control over your entire UniFi network - devices, clients, WLANs, firewalls, vouchers, and more. Ubiquiti provides officially supported Cloud APIs, a secure Cloud Connector Proxy, and local REST endpoints, alongside the legacy internal controller API.
API Flavors
Depending on your architecture, select the appropriate Integration API:
Flavor
Scope
Auth
Base URL / Path
Status
Site Manager API
Cloud - monitor/manage deployments at scale
X-API-KEY
https://api.ui.com/v1/
Official, GA
Connector Proxy
Cloud-to-Local - secure remote access to local consoles
Local - per-application control on a local console
X-API-KEY
https://{console}/proxy/network/integration/
Official, Network App >= 9.3
Classic Controller API
Local - full internal legacy interface
Cookie session
https://{controller}:8443/api/ or /proxy/network/api/
Unofficial but stable
Prefer the Official Network Integration API (either directly or routed via the Connector Proxy) for new applications. Use the Classic API only for features not yet exposed officially (e.g. firewall rules, port forwards, routing).
Cloud Connector Proxy (Proxied Control)
Firmware version 5.0.3+ introduces the UniFi Connector Proxy. This allows your cloud applications to execute local API actions remotely by proxying the request through Ubiquiti's cloud endpoint to the physical console without exposing ports or establishing VPNs.
Proxy Routing Example (Axios)
Simply replace the base URL and supply the consoleId:
constclient=axios.create({baseURL:
"https://api.ui.com/v1/connector/consoles/YOUR_CONSOLE_ID/proxy/network/integration/v1",headers: {"X-API-KEY": process.env.UNIFI_API_KEY,Accept: "application/json",},});// Retrieves local network sites securely via the Cloud Proxyconst{ data }=awaitclient.get("/sites");
Core Concepts
Site Structure: Most endpoints require a site identifier (default is the primary site).
Response Format: JSON with standard structure { "meta": { "rc": "ok" }, "data": [...] }. On error: { "meta": { "rc": "error", "msg": "api.err.Invalid" } }.
MAC Addresses: Use lowercase, typically without separators (e.g., 00112233aabb).
IDs: Most objects use a MongoDB-style _id field.
Authentication
Official API Key (X-API-KEY)
Available on UniFi OS-based consoles (UDM, UDR, UCG, UX, UDW, UCG-Ultra, UniFi OS Server). The key inherits the creator admin's permissions.
Send the session cookie (or X-API-KEY where supported) on the upgrade request. Useful for live client join/leave, device state, alarm push, and voucher consumption without polling /stat/event.
About
A comprehensive developer reference and integration guide for Ubiquiti's UniFi APIs (Cloud, Local, and Connector Proxy).