---
title: UniFi API Integration on Truto
slug: unifi
category: Device Management
canonical: "https://truto.one/integrations/detail/unifi/"
---

# UniFi API Integration on Truto



**Category:** Device Management  
**Status:** Generally available

## MCP-ready AI tools

Truto exposes 14 tools for UniFi that AI agents can call directly.

- **list_all_uni_fi_devices** — List UniFi devices managed by hosts where the calling UI account is the owner or a super admin. Returns: hostId, hostName, devices, updatedAt. The devices array includes per-device id, mac, model, status, version, and firmwareStatus. Optional filters: host_ids, time.
- **list_all_uni_fi_hosts** — List UniFi hosts associated with the UI account making the API call. Returns: id, hardwareId, type, ipAddress, owner, isBlocked, registrationTime, lastConnectionStateChange, latestBackupTime, userData, reportedState. The structure of userData and reportedState may vary depending on the UniFi OS or Network Server version.
- **get_single_uni_fi_host_by_id** — Get a UniFi host by id. Returns the full host object including id, hardwareId, type, ipAddress, owner, isBlocked, registrationTime, lastConnectionStateChange, latestBackupTime, userData, and reportedState. The structure of userData and reportedState may vary depending on the UniFi OS or Network Server version. Required: id.
- **list_all_uni_fi_sites** — List all UniFi sites associated with the UI account making the API call. Returns: siteId, hostId, meta, statistics, permission, isOwner. The meta and statistics field structures may vary by UniFi Network version.
- **list_all_uni_fi_sd_wan_configs** — List all hub-and-spoke SD-WAN configurations associated with the UniFi account. Returns: id, name, type.
- **get_single_uni_fi_sd_wan_config_by_id** — Get detailed information about a specific SD-WAN configuration in UniFi by id. Returns the full config object including id, name, type, variant, settings, hubs, and spokes. Required: id.
- **list_all_uni_fi_sd_wan_config_status** — Get the deployment status of a specific UniFi SD-WAN configuration, including hub and spoke WAN status, tunnel connections, errors, and warnings. Returns: id, fingerprint, updatedAt, hubs, spokes, lastGeneratedAt, generateStatus, errors, warnings. Required: sd_wan_config_id.
- **list_all_uni_fi_isp_metrics** — List UniFi ISP metrics for all sites linked to the API key using 5m or 1h intervals. Returns: metricType, periods, hostId, siteId. The `duration` parameter is mutually exclusive with `begin_timestamp` and `end_timestamp`. 5m metrics are retained for at least 24 hours, 1h metrics for at least 30 days. Required: type.
- **list_all_uni_fi_isp_metric_queries** — Query UniFi ISP metrics for specified sites and time ranges, returning WAN performance data per interval. Returns: metricType, periods, hostId, siteId. 5m metrics are retained for at least 24 hours and 1h metrics for at least 30 days. Required: type.
- **list_all_uni_fi_console_paths** — Forward a GET request to a UniFi console's proxied API path via the UniFi Site Manager connector. Returns: id, internalReference, name. Required: console_id, path.
- **create_a_uni_fi_console_path** — Forward a POST request to a UniFi console's Network or Protect application via the UniFi Site Manager connector proxy. The request body is whatever the proxied upstream endpoint expects, and the upstream API response is passed through directly. Required: console_id, path.
- **uni_fi_console_paths_partial_update** — Forward a PATCH request to a UniFi console's proxied API path via the cloud connector. Returns the upstream response passed through directly — the shape depends on the path being proxied (e.g., id, liveview, modelKey, name, state, streamLimit for a Protect viewer, or vouchersDeleted for a Network voucher operation). Required: id, path. Console firmware must be >= 5.0.3.
- **uni_fi_console_paths_bulk_update** — Forward a PUT request to a UniFi console's Network or Protect application via the UniFi Site Manager connector proxy. Returns: id, metadata, name, liveview, modelKey, state, streamLimit, vouchersDeleted, applicationVersion. Required: id, path.
- **uni_fi_console_paths_bulk_delete** — Forward a DELETE request to a UniFi console's proxied API path via the cloud connector. Returns the upstream response passed through directly — the shape depends on the path being proxied (e.g., vouchersDeleted for a Network voucher deletion, or success for a guest access revocation). Required: id, path. Console firmware must be >= 5.0.3.

## How it works

1. **Link your customer's UniFi account.** Use Truto's frontend SDK; we handle every OAuth and API key flow so you don't need to create the OAuth app.
2. **Authentication is automatic.** Truto refreshes tokens, stores credentials securely, and injects them into every API request.
3. **Call Truto's API to reach UniFi.** The Proxy API is a 1-to-1 mapping of the UniFi API.
4. **Get a unified response format.** Every response uses a single shape, with cursor-based pagination and data in the `result` field.

## Use cases

- **Automate MSP billing based on deployed UniFi hardware** — MSP business management platforms can poll UniFi hosts, sites, and devices to count active access points, switches, and gateways per client, then feed exact fleet counts into recurring billing and compliance workflows.
- **Zero-touch guest Wi-Fi for hospitality and coworking software** — PMS and workspace booking platforms can provision and revoke UniFi guest access by creating and bulk-deleting console paths, tying network access directly to check-ins, bookings, or membership status.
- **Multi-site ISP and SD-WAN observability for retail chains** — Network observability SaaS can ingest UniFi ISP metrics and SD-WAN config status across hundreds of branch locations to correlate WAN health with in-store systems and surface SLA violations in real time.
- **Unified physical security dashboards** — Security aggregation platforms can proxy requests through UniFi console paths to fetch UniFi Protect camera state and liveview metadata, letting operators view UniFi alongside other vendors in a single pane.
- **Firmware and asset compliance reporting for IT platforms** — IT asset management and RMM tools can sync UniFi device inventory, firmware status, and connectivity state to auto-generate compliance tickets and populate CMDB records without manual audits.

## What you can build

- **Fleet inventory sync across sites and hosts** — Continuously ingest UniFi hosts, sites, and devices to maintain an up-to-date asset hierarchy with models, MAC addresses, firmware, and online/offline state inside your product.
- **Automated guest voucher lifecycle** — Programmatically create UniFi console paths to issue Wi-Fi vouchers on demand and use bulk delete to revoke them when a stay, booking, or session ends.
- **SD-WAN and ISP health dashboards** — Surface UniFi SD-WAN configs, config status, and ISP metric queries in your app to visualize WAN latency, tunnel state, and uptime trends across every customer site.
- **Firmware compliance and drift alerts** — Detect devices running outdated firmware from the UniFi device list and trigger tickets or notifications in your workflow when a fleet falls out of compliance.
- **UniFi Protect camera metadata embedding** — Use console path proxying to fetch UniFi Protect camera state, model, and liveview references so users can access footage context without leaving your product.
- **Bulk console path management for provisioning workflows** — Use bulk update and bulk delete operations on UniFi console paths to script large-scale network configuration changes across multi-tenant deployments.

## FAQs

### How does authentication work for the UniFi integration?

UniFi's Site Manager API uses API key authentication issued from a Ubiquiti account. Truto handles secure storage and injection of the API key on behalf of your end users, so they only need to paste it once during connection.

### Can we perform write operations on UniFi through Truto?

Yes. In addition to read operations for devices, hosts, sites, SD-WAN configs, and ISP metrics, you can create, partially update, bulk update, and bulk delete UniFi console paths — which is how most provisioning and configuration actions (like guest vouchers or Protect calls) are executed.

### How do we access data that isn't exposed as a dedicated endpoint, like UniFi Protect cameras or guest vouchers?

UniFi's Site Manager acts as a cloud proxy to local consoles. You can use the console path tools (create, partial update, bulk update, bulk delete) to send arbitrary requests to a customer's UniFi Network or Protect console, giving you access to endpoints beyond the standard list resources.

### What UniFi data can we pull for multi-site customers like MSPs?

You can list all hosts (consoles), sites under each host, and devices across the fleet, plus per-host details. This gives you a complete hierarchy of consoles → sites → devices suitable for multi-tenant MSP or franchise use cases.

### How fresh is the ISP and SD-WAN telemetry?

UniFi exposes ISP metrics at 5-minute and 1-hour intervals via its metric queries endpoint, and SD-WAN config status reflects near-real-time tunnel and hub-and-spoke state. Truto passes these through so your polling cadence determines freshness in your app.

### Are there rate limits we should design around?

Ubiquiti enforces per-API-key rate limits on the Site Manager API. Truto surfaces rate limit responses and supports retry and backoff patterns, and for high-volume scenarios we recommend batching via the bulk console path operations rather than issuing many single requests.

## Related reading

- [Connect UniFi to ChatGPT: Monitor Devices, SD-WAN, and Site Health](https://truto.one/blog/connect-unifi-to-chatgpt-monitor-devices-sd-wan-and-site-health/) — Learn how to connect UniFi to ChatGPT using a managed MCP server. Automate device monitoring, SD-WAN diagnostics, and site health checks with AI.
- [Connect UniFi to Claude: Manage Sites, Hosts, and ISP Performance](https://truto.one/blog/connect-unifi-to-claude-manage-sites-hosts-and-isp-performance/) — Learn how to build a managed MCP server to connect UniFi to Claude. Automate network monitoring, SD-WAN status checks, and ISP performance tracking.
- [Connect UniFi to AI Agents: Automate Network and Console Operations](https://truto.one/blog/connect-unifi-to-ai-agents-automate-network-and-console-operations/) — Learn how to connect UniFi to AI agents using Truto's unified tools layer. Automate SD-WAN deployments, troubleshoot ISP metrics, and control local consoles without the integration boilerplate.
