Skip to main content

API keys

Your application authenticates its requests with an API key that starts with divyam-sw-v1-. Manage keys on the API Keys page of the console.

Create a key​

  1. Select API Keys, then Create API key.
  2. Enter a Key name that identifies the application or environment, such as customer-app-test, and select Create key.
  3. Select Copy key and store the key in your application's secret settings.
  4. Check I understand this key will not be shown again, then select Done.

Active key names must be unique, up to 100 characters.

The key is shown once

If you lose it, create a new key and revoke the old one.

Keep keys in backend settings or a secret manager, never in source control or browser code.

Find or rename a key​

The list shows each key's Key name, Created and Last used dates. Use Search by name or Sort by to find one.

To rename a key, select Rename, change the name, and select Save name. The key itself doesn't change.

Set the key in a terminal​

Copy your key and run this, with your key in place of the placeholder:

export DIVYAM_API_KEY='divyam-sw-v1-...'

The key applies to programs started from that terminal. For a deployed application, use its usual secret settings.

Rotation​

To rotate a key, move every application to a new key before you revoke the old one.

  1. Create a new key with a distinct name, such as customer-app-test-next, and store it.
  2. Update every application that uses the old key, restart it if needed, and check its next request in Logs.
  3. In API Keys, check the box next to the old key only, and select Revoke selected.
  4. Check I understand this action cannot be undone, then select Revoke 1 key.
  5. Check the applications still work.
Revoking is permanent

A revoked key stops working at once, and you can't restore it. Requests that use it get HTTP 401.

Key limits​

Your plan sets how many active keys you can have, and the console tells you when you reach the limit. Revoke an unused key to free a slot, or email hello@divyam.ai for more. Don't revoke a key that's still in use to make room.

Revoke a key​

Check the box next to each key, select Revoke selected, check I understand this action cannot be undone, and confirm. If some keys fail to revoke, select them and try again.

Revoke all

If a key leaks and you can't tell which one, Revoke all stops every key on the account. Every application fails until it gets a new key. Don't use it to rotate.

For errors after a key change, see Troubleshooting.