Delete a Secret Key

Remove unused or compromised API keys to maintain security and manage access to your organization.

Delete secret keys that are no longer needed or have been compromised to maintain security and prevent unauthorized access to your organization's resources.

⚠️

Before you delete

  • Deletion is immediate and permanent — Applications using the key will lose access instantly
  • Cannot be undone — You must create a new key if you delete one by mistake
  • Update your applications — Ensure all applications have switched to a new key before deleting the old one
  • Consider rotation schedule — Regularly rotate keys as a security best practice

When to delete a secret key

Delete keys in these situations:

  • Compromised security — The key was accidentally exposed or shared
  • No longer needed — The application or integration is decommissioned
  • Regular rotation — Part of scheduled security maintenance
  • User departure — Keys created by users who have left the organization
  • Testing completed — Development or testing keys no longer required

Navigate to secret keys

  1. Click on your organization name in the top navigation bar

  2. Select Secret Keys from the sidebar menu

  3. Locate the key you want to delete in the keys table


Delete a secret key

  1. Find the key you want to remove in the Secret Keys table

  2. Click the action menu (⋯) in the Action column for that key

  3. Select Remove Key from the dropdown menu

📘

Delete action menu

Secret key action menu showing Remove Key option

The action menu provides two options:

  • Edit Permission — Modify the key's access and permissions
  • Remove Key — Delete the key permanently
  1. A confirmation dialog appears asking you to confirm the deletion

  2. Click Confirm or Remove to permanently delete the key

🔒

Immediate effect

Once deleted, the key is immediately revoked. Any application or service using this key will receive authentication errors on the next API request.


Verify deletion

After deletion, the key is removed from the Secret Keys table and can no longer be used to authenticate with Datature Vi services. Applications using the deleted key will encounter authentication errors.


Update applications after deletion

If you deleted a key that was actively in use, update your applications with a new key:

  1. Create a new secret key with the appropriate permissions

  2. Update your application configuration with the new key

Update Vi SDK with new secret key

Direct initialization:

import vi

# Update with new key
client = vi.Client(
    secret_key="your-new-secret-key-here",
    organization_id="your-organization-id-here"
)

Using environment variables:

# Update environment variables
export DATATURE_VI_SECRET_KEY="your-new-secret-key"
export DATATURE_VI_ORGANIZATION_ID="your-organization-id"

Then initialize the client:

import os
import vi

client = vi.Client(
    secret_key=os.getenv("DATATURE_VI_SECRET_KEY"),
    organization_id=os.getenv("DATATURE_VI_ORGANIZATION_ID")
)

Configuration files:

Update any configuration files, deployment settings, or CI/CD pipelines that reference the old key.


Security best practices

Rotate keys regularly

Schedule periodic key rotation (e.g., every 90 days) to minimize risk from undetected compromises

Monitor key usage

Check the "Last Used" column to identify inactive keys that can be safely deleted

Use separate keys

Create different keys for production, staging, and development environments

Document key purposes

Use descriptive names to track which application or service uses each key


Next steps