Getting Started

The UniFi API was created to enable developers to programmatically monitor and manage UniFi deployments at scale. It provides robust tools to access and control your UniFi devices’ data, allowing you to retrieve detailed information, monitor performance, and manage your network infrastructure efficiently.  
 
UniFi API Version 0.1 centers around extracting data from the UniFi Site Manager (unifi.ui.com). Future versions will expand support to include more granular configurations, allowing management of individual sites and the devices within those sites.  
 
Your feedback is crucial in helping us enhance and customize the API to better meet your needs.

Authentication

An API Key is a unique identifier used to authenticate API requests. These keys are crucial for ensuring secure access to your UniFi account and its associated devices. Each key is tied to the UI account that created it, allowing for secure and personalized API interactions.

Obtaining an API Key

  1. Sign in to the UniFi Site Manager at unifi.ui.com.
  2. From the left navigation bar, click on API.
  3. Click Create API Key.
  4. Copy the key and store it securely, as it will only be displayed once.
  5. Click Done to ensure the key is hashed and securely stored.

Use the API Key

Incorporate the API key into the X-API-Key header. Follow the Example, replacing YOUR_API_KEY with your actual API key.

Example
curl -X GET 'https://api.ui.com/ea/hosts' \
 -H 'X-API-KEY: YOUR_API_KEY' \
 -H 'Accept: application/json'

Rate Limiting

The API rate limit is set to 100 requests per minute. If you exceed this limit, the server will respond with a 429 Too Many Requests status code.