> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neoagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Connecting UniFi to Neo

> Choose a UniFi connection type, save its credentials, and set each agent's access

Save one UniFi connection at the MSP level, then enable access per agent. Choose credentials for the API your controller exposes.

## Which setup applies to you

| Your controller | What to enter in Neo |
| - | - |
| **UniFi Site Manager** at unifi.ui.com | Select the Site Manager connection type and enter its **API Key** (step 1). |
| **UniFi OS Server or console by URL** with the Network Integration API | Select the UniFi OS URL connection type. Enter **Controller URL** and a console-created **API Key** (step 1b). Use it for a UniFi OS Server adopted into Site Manager when Ubiquiti's Connector refuses that server on its firmware version (see Troubleshooting). |
| **Self-hosted Network Server** using the legacy session API | Select the self-hosted connection type. Enter **Controller URL**, **Username** and **Password** for a local controller admin (step 1c). |

A server you reach on port **11443**, such as a HostiFi server on that port, is usually a UniFi OS Server. Connect it with the UniFi OS URL connection type and an API key (step 1b). The self-hosted connection type logs in through the classic `/api/login` path, and UniFi OS Servers have answered that login with `401 Unauthorized` and an `{"error": ...}` body even with a correct password.

The legacy login was verified in a lab running Network 10.6.101. That lab did not expose API-key creation; this does not establish a limit for every self-hosted deployment. Confirm the API your deployment exposes before choosing a connection type.

## 1. Create an API key in UniFi Site Manager

**1. Sign in to unifi.ui.com**

Use the UI account that manages your customers' consoles. The key sees exactly the consoles that account can manage — for an MSP that is usually the organization owner account.

**2. Create the key**

Open **Settings → API Keys** and click **Create New API Key**.

> [!TIP]
>
> Copy the key somewhere safe once it's generated — UniFi shows it only once.

## 1b. Or: create an API key in your UniFi OS console

**1. Sign in to the controller**

Open your UniFi OS Server or console in the browser. This connection uses its Network Integration API at `/proxy/network/integration/v1/`. A controller URL alone does not establish that this API is available.

**2. Create the key**

Open **Settings → Control Plane → Integrations** and click **Create API Key**. Copy it once it's generated — it is shown only once.

> [!TIP]
>
> The key inherits the permissions of the admin who creates it, so create it from an account that can see every customer site you want Neo to work on.

A Site Manager key and a console-created key serve different APIs. Use the console-created key for a direct connection.

## 1c. Or: use a local controller admin

Create a dedicated local admin on the self-hosted Network Server, with access only to the sites Neo needs. Enter that account's username and password in Neo. This login cannot answer an MFA challenge; use a dedicated account compatible with password-only login, subject to your security policy.

Neo logs in through `/api/login` and uses the returned session cookie for the legacy API. You do not enter a cookie or an API key.

Both URL connection types reach one controller's Network application. They do not provide the Site Manager fleet views or cloud ISP and SD-WAN endpoints. Available network operations depend on the controller's API and version; the legacy API does not have the same endpoints as the modern Integration API.

### Controller URL and TLS

Use the controller root, including its port, such as `https://unifi.example.com:8443`. Omit browser paths such as `/manage`.

The URL must be reachable from Neo's backend and present a certificate trusted by that backend, with a matching hostname. TLS certificate verification stays enabled for credential checks, legacy login and subsequent requests. Neo has no option to bypass verification. A private address reachable only from your workstation will not work without a network route from Neo.

## 2. Add the credentials in Neo

**1. Open Integrations**

Open [**Integrations**](https://dashboard.neoagent.io/integrations?open=unifi) and find **Ubiquiti UniFi** under **Networking**.

**2. Save the credentials**

Select **Connection type** and enter the fields listed above. Click **Save**. Neo checks Site Manager access, direct Network site access, or the legacy login and site list before it stores the connection.

## 3. Turn UniFi on per agent

Each agent decides whether it uses UniFi and which areas it can touch. Open the agent, go to its **Tools & Settings** tab, click **Networking**, and expand the **Ubiquiti UniFi** block.

### Pick a preset

> [card] Read Only
>
> Every area set to read only. The agent can look up consoles, sites, devices, clients, networks and firewall rules, but never makes changes.

> [card] Helpdesk
>
> Hotspot Vouchers and Clients read and write — issuing and deleting vouchers goes through on its own; client actions such as authorizing a guest wait on a technician. Devices, networks and firewall read only.

> [card] IT Admin
>
> Every writable area read and write. Device, client and voucher writes go through on their own; firewall and network changes wait on a technician.

> [card] Full Automation
>
> Every writable area read and write, with no approval. Only a write that sets a WiFi passphrase or another secret waits on a technician.

### Or set each area by hand

These groups cover the APIs Neo exposes. The selected connection type and controller version determine which operations are available. Fleet inventory, cloud ISP metrics and SD-WAN require Site Manager; legacy controllers use their own device, client, network, firewall and voucher endpoints.

| Area | Access levels you can pick | Notes |
| - | - | - |
| **Consoles & Sites** | Disabled, Read Only | Consoles, sites, fleet-wide device inventory, ISP health, SD-WAN. Read only by API design. |
| **Devices** | Disabled, Read Only, Read and Write | Adopted and pending devices, statistics, restart, PoE power-cycle, adopt/unadopt. |
| **Clients** | Disabled, Read Only, Read and Write | Connected clients and guest authorization. |
| **Networks & WiFi** | Disabled, Read Only, Read and Write | Networks/VLANs, SSIDs, WANs, VPNs, RADIUS, switching, DNS policies. A write that sets a WiFi passphrase or another secret always waits on a technician. |
| **Firewall & ACLs** | Disabled, Read Only, Read and Write | Firewall policies and zones, ACL rules, traffic matching lists. |
| **Hotspot Vouchers** | Disabled, Read Only, Read and Write | Guest hotspot vouchers. |

## Safety controls

* **Each write follows the area's approval setting.** Turn on **Require approval** on an area and every write there waits on a technician.
* **A write that sets a secret always waits on a technician.** A WiFi passphrase, a RADIUS or VPN secret or another password needs a technician's sign-off, whatever the access profile or approval setting.
* **Consoles & Sites is always read only.** Neo does not expose site creation or deletion.
* **Only the Network application is reachable.** Protect (cameras) and other UniFi applications are not exposed to agents.
* **Path safety.** Suspicious URL paths (anything containing `..`, for example) are rejected before they reach UniFi.
* **Company mapping.** Neo matches UniFi site names to PSA companies during PSA metadata sync. With Site Manager, a site still named "Default" that is the only site on its console is matched by the console's name instead, when the console reports one; a "Default" site on a console with several sites keeps its own name. Review matches on **Organization Mapping**, especially after a change of connection type. A site you remove from UniFi leaves the tab at the next sync that still matches at least one of your UniFi sites to a company. A mapping you set by hand stays until you clear it. Legacy requests use the site's `name` slug (for example `default`); modern direct requests use its Integration API UUID. These identifiers are not interchangeable.
* **A customer's own key.** A customer who runs its own UniFi account can have [its own key](https://docs.neoagent.io/integrations/customer-credentials.md). Add it on the customer's parent company in your PSA, and tickets on each of its site companies use it too. The sites that key sees do not appear on **Organization Mapping**, which lists what your own key sees; on those tickets Neo finds the site in the customer's account.
* **Rate limiting.** Neo paces calls at 100 requests per minute per Connector console, or in a shared bucket for calls without a Connector console ID.

## If UniFi refuses Neo's requests

| What the error says | Cause | Fix |
| - | - | - |
| `401 Unauthorized` with API-key authentication | The key may be invalid, revoked or lack access | Check the selected connection type and the key's source and permissions |
| Legacy login fails with "answered as a UniFi OS Server" (`HTTP 401`) | The Controller URL answered the classic `/api/login` login as a UniFi OS Server does, often on port 11443 | Create an API key in that server under **Settings → Control Plane → Integrations**, then select the UniFi OS URL connection type with the same Controller URL (step 1b) |
| Legacy login rejected or MFA required | The local account's credentials or login requirements do not match this connection | Check the dedicated local admin and its site access; Neo cannot answer MFA challenges |
| Certificate verification or connection failure | Neo cannot reach or trust the Controller URL | Check DNS, routing, port and the certificate's trust chain and hostname; keep TLS verification enabled |
| Save fails with `404` on a Controller URL | The URL or selected API does not match the deployment | Use the controller root and confirm which API it exposes; do not assume a hosting provider supports either API |
| `403 forbidden: host not found` | The console is not one this key's account can manage | Give the UI account admin access to that console in Site Manager, or create the key from an account that has it |
| `408 DeviceTimeout` on a console path | The console is offline, or it is a self-hosted UniFi Network Server — Ubiquiti's Connector only proxies to UniFi OS consoles | Cloud-level data (consoles, sites, devices, ISP health) still works for that server; per-site detail needs a UniFi OS console |
| `400 ... console firmware version ... is below minimum required version v5.0.3` on a console path | The Connector refused the console on the firmware version Site Manager reports. A UniFi OS Server can report a placeholder version (ending in `+mock`) while it runs 5.x; on console hardware, the firmware is older than 5.0.3 | For a UniFi OS Server, connect it by URL instead (step 1b); this replaces the Site Manager connection. For console hardware, update the console |
| `404 device_offline` on a console path | The console is known to Site Manager but not connected to the cloud right now | Bring the console back online; cloud-level data still works meanwhile |
| `404` on a console path | The console's firmware or Network application is older than the endpoint (the Connector needs UniFi OS 5.0.3 or newer) | Update the console |

Until it is fixed, agents that use UniFi report the failure on the ticket they were working. The rest of Neo keeps running.

## Disconnecting Ubiquiti UniFi

**1. Open the integration**

In the Neo Dashboard, open **Integrations** and select the Ubiquiti UniFi card.

**2. Disconnect**

Click **Disconnect** and confirm. Neo removes the credentials from Key Vault.

Your Organization Mapping is kept, including any mapping you set by hand, so reconnecting later
picks up where you left off. Agents that use Ubiquiti UniFi stop working until you connect it again.

## Security

* Neo stores connection credentials in Azure Key Vault. A self-hosted login is exchanged for a session cookie, cached for 20 minutes per tenant, controller URL and admin account. The password itself is never cached. Changing the Controller URL or the admin retires the cached session.
* All traffic goes over HTTPS. In the Site Manager setup calls go to `api.ui.com` and per-console calls are proxied by Ubiquiti's cloud Connector, so Neo never connects to a console directly. With a Controller URL, Neo connects to that controller over HTTPS with TLS certificate verification enabled. `http://` URLs are refused.
* Write access to UniFi is opt in per area, per agent.

Once your credentials are saved and an agent has permissions, the UniFi tool is added to that agent automatically.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.