Create a personal API key
1
Open your profile
From the user menu in the top-right corner of the Kosli app, click Profile:
2
Add an API key
In the API keys section, click Add API key. Choose a Time-To-Live (TTL), add a descriptive label, and click Add.
3
Copy the key immediately
Kosli stores only a cryptographic hash of the token. The original value is shown once and cannot be retrieved later.
Use the key
The same usage applies as for service account keys — see Authenticating to Kosli.Rotate a key
To replace a personal API key without downtime, regenerate it. Kosli issues a new key and keeps the old one valid for a grace period, as described in API key rotation.- Open Profile, and in the API keys section open the menu of the key you want to replace.
- Click Regenerate.
- Choose when the new key expires and how many hours the current key stays valid (24 by default), then click Regenerate.
- Copy the new key immediately and update everything that uses the old one.
Delete a key
To delete a personal API key, open Profile → API keys, open the key’s menu, and click Delete. The key stops working immediately.Manage keys from the CLI
Thekosli API key commands manage your own personal keys when you pass --personal instead of --service-account. Personal keys belong to you, not to an organization, so --org is not needed. You can’t combine --personal with --service-account.
--api-token is itself a personal API key, these limits apply:
- A key you create with it expires no later than that key, and is deleted along with it.
- You can only rotate or delete that key and the keys created with it.
kosli create api-key, kosli rotate api-key, kosli list api-keys, kosli get api-key, and kosli delete api-key for every flag.
Service accounts can’t manage personal API keys. Use the service account key commands for them.