API Keys
The API Keys page lets you create keys that external programs and scripts use to read data from the Supracontrol API - without a user logging in interactively.
Path: Settings → API keys (in the Infrastructure group)

Changes in version 4.0.5
- Keys created before version 4.0.5 no longer work. Create new ones.
- The old
APIKEYheader no longer works. UseAuthorization: Bearerinstead - see Using an API key.
What is an API key?
An API key gives a program read-only access to the Supracontrol API on behalf of the Administrator who created it.
- The key can do only what that Administrator can: it reads the same data the Administrator sees.
- The key can never change anything.
- The key doesn't ask for a two-factor code, even when its Administrator has two-factor authentication turned on.
API keys are useful for:
- Custom dashboards or monitoring tools that pull data from Supracontrol
- Scripts that query device status or export logs and reports
- Third-party integrations that only need to read data
Who can create keys
- Only Administrators can create API keys. A Superadmin can't create keys.
- Each Administrator sees and revokes only their own keys.
- Each Administrator can have at most 10 active keys.
Create an API key
Open the API Keys section
Go to Settings → API keys.
Open the creation dialog
Click Create (the + button) in the toolbar. If you have no keys yet, you can also click Create API key in the middle of the page.
Fill in the key details

| Field | Required | Description |
|---|---|---|
| Name | Yes | A descriptive label for this key (e.g. "Dashboard Integration", "Backup Script"). The name must be unique among your active keys |
| Expires after | Yes | How long the key stays valid: 30, 90, 180 or 365 days. The default is 90 days. There are no keys that never expire |
Save and copy the key
Click Save. The full key value is displayed - copy it now and put it straight into a safe place, such as a password manager or the secret settings of the program that will use it.
The dialog can't be closed until you tick I have copied the key. Then click Done.

The key is shown once
The full key value can't be shown again after you close the dialog. If the key is lost, create a new one.
Using an API key
Send the key in the Authorization header of every request, with the Bearer prefix. Keys start with sc_.
curl -H "Authorization: Bearer sc_XXXXXXXX" https://<api-address>/api/LocationReplace sc_XXXXXXXX with your key and <api-address> with the address of your Supracontrol Web API. That address can differ from the one you use to open Supracontrol in the browser, for example by using a different port. Ask your system administrator if you are not sure.
To keep the key out of the command itself, store it in an environment variable first. Adding -i prints the status code together with the response:
export SC_API_KEY="sc_XXXXXXXX"curl -i -H "Authorization: Bearer $SC_API_KEY" https://<api-address>/api/LocationA valid key returns 200 and the list of locations as JSON.
| Request | Result |
|---|---|
Any read (GET) | Allowed |
A search sent as POST (e.g. POST api/Log/GetLogs) | Allowed |
| Anything that changes data | Refused with 403 "API keys are read-only." |
| A read that returns secrets (e.g. camera passwords) | Refused with 403 "API keys can't use this endpoint." |
| A request with an invalid, expired or revoked key | Refused with 401 "Invalid API key." |
A request without the Authorization header | Refused with 401 "Missing authentication token." |
A refused request returns the message in the response body. For a request that changes data:
{ "Errors": ["lngError0#API keys are read-only."] }For an invalid, expired or revoked key:
{ "Errors": ["lngError0#Invalid API key."] }Which endpoints a key can call
The API reference marks every endpoint that a key can call: its description ends with "API keys: allowed (read-only)." and it offers the Bearer option. No other endpoint does.
The API reference (API Explorer) is served by your own Supracontrol server and asks you to sign in:
https://<your-server>:8082/login.htmlReplace <your-server> with the address of your Supracontrol server. The port can differ on your deployment - ask your system administrator if the page does not open.
Key list
The table lists your own keys.
| Column | Description |
|---|---|
| Status | Whether the key is active, expired or revoked |
| Name | The display name given to this key |
| Key | The short form of the key (e.g. sc_…a1b2). The full value is never shown here |
| Created on | The date and time this key was created |
| Expires | The date and time this key stops working |
| Last used | The last time a request was made with this key, accurate to within a few minutes. Shows "Never" until the key is first used |
The list opens filtered to Active keys. To see expired and revoked keys, clear the filter in the Status column header. They are shown greyed out.
The toolbar has these tools, plus a search bar:
| Tool | Description |
|---|---|
| Create | Opens the dialog to create a new key |
| Revoke | Revokes the selected key |
| Refresh | Reloads the list |
| Column settings | Chooses which columns are shown |
Revoke an API key
When a key is no longer needed or may have leaked, revoke it:
Select the key row
Click the key row you want to revoke.
Revoke and confirm
Click Revoke in the toolbar, then click Revoke in the confirmation dialog.
An expired key can be revoked too.
Revoking is immediate and can't be undone
Any program using the revoked key loses API access at once.
Rotate a key
To replace a key without interrupting the program that uses it:
- Create a new key.
- Switch the program to the new key.
- Revoke the old key.
When a key stops working by itself
A key also stops working when:
- It reaches its expiry date.
- The Administrator who created it is deactivated or deleted.
- The Administrator who created it loses the Administrator role.
Security
Treat an API key like a password
- Never put a key in source code or share it in chat.
- Revoke a key at once if it may have leaked.
- Supracontrol stores only a fingerprint (hash) of the key, so nobody can recover it - not even Supracontrol support.