Loading the documentation…

Manage the API key

Your company holds one API key for direct AI use: your own applications' calls to the API. DataMind OS runs on License Keys instead, one for each install, kept on Instances, and a License Key never appears on this card. You manage the API key on the API key card in Settings. Company setup does not ask for one (Finish company setup): create the key when your applications need it.

Note

A DataMind OS server your company installed with its API key keeps working on it until it moves to a License Key of its own. DataMind prepares the License Key, and the DataMind Installer on that server takes it over at its next update.

The key card

The card is headed API key, notes "For direct AI API use. DataMind OS runs on License Keys, under Instances.", and shows the key's name and the start and end of its secret with •••• between them, so you can tell keys apart. An older key may show only its start, followed by …, until it is rotated. The card also shows:

ElementWhat it shows
Active / NoneWhether the company has an active key.
Last usedThe last AI request served with the key. It reads Never until the first one.
CreatedWhen the key was created.
LimitThe rule the card states: One active key per company.

With no active key, the card reads "No active key yet." and offers Create key. A Viewer sees "No active key. Ask an administrator to create one." instead. With a key active, Rotate and Revoke appear when you hover over the card or move focus to it.

If an action cannot complete, the console reports Create failed, Rotate failed or Revoke failed. Try the action again; if it keeps failing, contact DataMind support.

Create a key

  1. On the API key card, click Create key.
  2. In New API key, enter a Name, such as Production server, and click Create key. The dialog states: "Name the key so you can identify it later." The name can be up to 100 characters; leaving it empty shows "Name is required".
  3. In API key created, copy the secret and store it where your team keeps secrets. Click Done.
Important

The secret is shown once, in the API key created and API key rotated dialogs: "Copy it now - it is shown once and cannot be recovered." Afterwards the card keeps only the start and end of the secret, and the full secret cannot be shown again.

If you close New API key while its name is unsaved, the console first asks Unsaved Changes: "You have unsaved changes. If you close, your changes will be lost." Choose Discard & Close to leave without creating anything, or Keep Editing to go back.

Rotate a key

Rotating replaces the secret and keeps the key, its name and its history.

  1. Hover over the key card and click Rotate.
  2. The confirmation Rotate <name>? states: "The current secret stops working immediately and a new one is issued." Confirm with Rotate.
  3. Copy the new secret from API key rotated, then update every place that used the old one: your applications and, on a server that still runs on the API key, DataMind OS under Administration → AI Configuration and the DataMind Installer. Click Done when you are finished.

Anything still sending the old secret is refused until it sends the new one.

Revoke a key

Revoking switches the key off for good.

  1. Hover over the key card and click Revoke.
  2. The confirmation Revoke <name>? states: "This permanently disables the key. Applications using it will lose access." Confirm with Revoke.
  3. The toast reads API key revoked. The card then shows no active key, and Create key returns.

Revoking is permanent: the key cannot be restored, and a revoked key cannot be rotated. Your applications lose access until a new key is in place, and so does any DataMind OS server that still runs on the API key. Servers that run on a License Key are not affected.

Both actions stop the current secret at once; they differ in what is left behind:

RotateRevoke
The secretA new secret is issued; the old one stops working immediately.The key is disabled permanently.
The keyKeeps its name; only the secret changes.Ends, and Create key returns so you can replace it.
AfterwardsPaste the new secret everywhere the old one was used.Create a new key and paste it everywhere the old one was used.

Who can manage keys

Every member can see the card. Managing the key needs permissions: viewing requires View API Keys, and creating, rotating and revoking are separate grants. In the built-in roles, an Administrator can create, rotate and revoke; a Viewer sees the card without the buttons.

Questions, answered

Can our company have more than one API key?

No. The card states the rule: One active key per company. To change the secret, rotate the current key; to end the key, revoke it, which frees the slot and brings back Create key.

I lost the secret. Can I see it again?

No. The secret is shown once, in the API key created or API key rotated dialog, and it cannot be shown again. Click Rotate to issue a new secret, then update your applications and, on a server that still runs on the API key, DataMind OS.

What do I update after I rotate the key?

Every place that used the old secret: your applications and, on a server that still runs on the API key, DataMind OS under Administration → AI Configuration and the DataMind Installer. The old secret stops working immediately, so anything still sending it is refused.

Can I undo a revocation?

No. Revoking is permanent, and a revoked key cannot be rotated. Create a new key instead: the card offers Create key once the old key is revoked, and your applications work again when they send the new secret.

Why can't I create or change the key?

Managing the key needs permissions a Viewer does not hold. Viewing requires View API Keys, and creating, rotating and revoking are separate grants; in the built-in roles only an Administrator has them. A Viewer sees the card without the buttons.

Why does Last used say Never?

No AI request has been served with the key yet. It stays Never until the first one; installing or updating DataMind OS software does not change it.

Do DataMind OS and my applications use the same key?

No. Your applications send the API key in the x-api-key header (Use the API). Each DataMind OS install runs on its own License Key, which this card never shows. A server installed with the API key keeps using it until its DataMind Installer takes over a License Key at its next update.

Is a key created if I close New API key early?

No. Nothing is created until you click Create key in the dialog. If you typed a name and close it, the console asks Unsaved Changes first: Discard & Close leaves without saving anything, Keep Editing returns to the dialog.