Skip to main content
Protected operations accept a UNIFI_API_KEY:
Q. How to obtain it?
A. Create a named key from the UniFi web app.

API keys for server integrations

Create a named API key in the UniFi web app and store it in a server-side secret manager.

Create a key in the web app

1

Open API Keys

Sign in, open the API page, and select New API Key. The Keys tab shows the number of active keys allowed by the current plan.
UniFi API Keys tab with no API keys and a New API Key action

Start from the empty Keys view.

Create API key sheet asking for a unique key name

Open the Create API key sheet.

2

Name, create, and copy the key

Enter a clear, unique name and select Create key. Creation uses the signed-in session and does not require an additional authenticator check. UniFi then opens a Shown once sheet with the key masked by default. Use Copy key, place the credential in your server-side secret manager, and select I’ve saved it only after it is safely stored.
Create API key sheet with marketplace entered as the key name

Use a name that identifies the integration.

The secret is returned only by this creation request. UniFi stores a one-way hash and the Keys table retains only the name, creation time, and revoke action. A lost key cannot be revealed; revoke it and create a replacement.
3

Monitor usage and revoke unused keys

Use Quota to review the active plan, remaining credits, and renewal date. Delete a key when an integration no longer needs it; deletion takes effect immediately.
UniFi API Quota tab showing the active Free plan, remaining credits, and next renewal

Review plan and credit usage from Quota.

Delete API key confirmation warning that applications using the key will lose access

Confirm before permanently revoking a key.

This is a sample curl API request for getting USDT balance on Ethereum.
The credential must be authorized for the user_id in user-scoped routes. Never ship the key in browser JavaScript, a public repository, a mobile binary, logs, or analytics events. Key-creation responses use Cache-Control: no-store, and the same policy is preserved through the UniFi FEP.