Authentication
Managing Keys
View, rotate, and revoke API keys
Managing Keys
This guide covers viewing, rotating, and revoking your HyperMemory API keys.
Viewing active keys
In the dashboard
- Go to app.hypermemory.io
- Navigate to Settings → API Keys
- View your active keys:
| Column | Description |
|---|---|
| Name | The label you gave the key |
| Prefix | First 8 characters (e.g., hm_live_) |
| Scopes | Permissions assigned to the key |
| Created | When the key was created |
| Last Used | Most recent API call with this key |
For security, full keys are never displayed after creation. You only see the prefix.
Via API
import httpx
response = httpx.get(
"https://api.hypermemory.io/v1/api-keys",
headers={"Authorization": f"Bearer {admin_api_key}"}
)
for key in response.json()["keys"]:
print(f"{key['name']}: {key['prefix']}... (scopes: {key['scopes']})")
Revoking a key
Revoking permanently disables a key. Use this when:
- A key may have been compromised
- An employee leaves
- A project is decommissioned
In the dashboard
- Navigate to Settings → API Keys
- Find the key to revoke
- Click the ⋮ menu → Revoke
- Confirm the action
Via API
import httpx
response = httpx.delete(
f"https://api.hypermemory.io/v1/api-keys/{key_id}",
headers={"Authorization": f"Bearer {admin_api_key}"}
)
if response.status_code == 200:
print("Key revoked successfully")
Rotating keys
Key rotation means replacing an old key with a new one without service interruption.
Why rotate?
- Regular security hygiene — Limits impact of potential compromise
- After personnel changes — When team members leave
- After potential exposure — If a key might have been leaked
Rotation process
Create new key
Generate a new key with the same scopes as the old one.
Update applications
Update all applications to use the new key:
- Configuration files
- Environment variables
- Secrets management systems
Verify functionality
Test that all applications work with the new key:
- Run health checks
- Verify memory operations
- Check logs for errors
Revoke old key
Once everything works, revoke the old key.
Zero-downtime rotation
For critical systems, use this pattern:
import os
from datetime import datetime, timedelta
class KeyRotator:
def __init__(self):
self.primary_key = os.environ.get("HYPERMEMORY_API_KEY")
self.backup_key = os.environ.get("HYPERMEMORY_API_KEY_BACKUP")
def get_key(self):
"""Return primary key, fall back to backup if needed"""
return self.primary_key or self.backup_key
def rotate(self, new_key: str):
"""Rotate to a new primary key"""
self.backup_key = self.primary_key
self.primary_key = new_key
# Update environment
os.environ["HYPERMEMORY_API_KEY_BACKUP"] = self.backup_key
os.environ["HYPERMEMORY_API_KEY"] = self.primary_key
Key naming conventions
Use descriptive names to identify keys easily:
| Pattern | Example | Use Case |
|---|---|---|
{env}-{service} | prod-api-server | Service identification |
{team}-{purpose} | backend-ci-testing | Team/purpose identification |
{date}-{name} | 2026-03-agent-v2 | Time-based tracking |
Monitoring key usage
Usage dashboard
The API Keys page shows:
- Requests today — Total API calls per key
- Last used — Most recent activity timestamp
- Error rate — Percentage of failed requests
Alerts
Set up alerts for unusual activity:
- Navigate to Settings → Alerts
- Create a new alert:
- Condition: “API key usage > X requests/minute”
- Action: Email notification
Audit logs
View detailed key activity:
- Navigate to Settings → Audit Log
- Filter by API key
- Review activity:
- Successful requests
- Failed authentication attempts
- Key creation/revocation events
Key limits per plan
| Plan | Max Keys | Notes |
|---|---|---|
| Free | 1 | Single key for testing |
| Developer | 5 | Enough for dev/staging/prod + backups |
| Pro | 20 | Multi-team support |
| Enterprise | Unlimited | Custom limits available |
What counts toward limits
- Active keys count toward your limit
- Revoked keys don’t count
- Creating a key immediately counts
Upgrading for more keys
If you need more keys:
- Navigate to Settings → Billing
- Click Upgrade Plan
- Select a plan with higher key limits
Emergency key revocation
If you suspect a key has been compromised:
Revoke immediately
Don't wait — revoke the potentially compromised key now.
Create replacement
Generate a new key with the same scopes.
Update applications
Deploy the new key to all affected systems.
Audit activity
Review the audit log for unauthorized access during the exposure window.
Investigate source
Determine how the key was exposed to prevent recurrence.