Skip to content

API Key Management

API keys provide programmatic access to the Neuramancer API. This guide covers API key management, rotation strategies, and best practices for maintaining secure, uninterrupted access to the API.

API keys are managed through dedicated endpoints at /v1/auth/api. Each tenant can have multiple API keys with different expiration dates, enabling sophisticated rotation strategies.

  • Multiple keys per tenant: Support overlapping keys for zero-downtime rotation
  • Mandatory expiration dates: All keys must have future expiry dates
  • One-time secret visibility: Secrets shown only during creation
  • UUID-based deletion: Delete keys by their unique identifier
  • Regularly rotate API keys using overlapping expiration dates
  • Use descriptive names for each key (e.g., “Production”, “Staging”, “CI/CD”)
  • Set expiration dates to enforce key rotation

Retrieve all API keys for your tenant. The response never includes secret values - only metadata.

Endpoint: GET /v1/auth/api?tenantName=<tenant_name>

Create a new API key for your tenant using POST /v1/auth/api. The secret is returned only once in the response.

Endpoint: POST /v1/auth/api

Response: 201 Created

Delete an API key by its UUID.

Endpoint: DELETE /v1/auth/api?tenantName=<tenant_name>&uuid=<uuid>

Set expiration dates based on environment:

  • Production: 3-6 months
  • Test: Up to 12 months
  • Use secrets managers: AWS Secrets Manager, HashiCorp Vault, Azure Key Vault
  • Never commit to version control: Add to .gitignore
  • Encrypt at rest: Use encrypted environment variables
  • Limit access: Only authorized personnel/systems
  • Audit access: Log who retrieves keys and when

If an API key is compromised:

  1. Inform us immediately at [email protected]
  2. Immediately deactivate the compromised key
  3. Create a new key with different expiration
  4. Update all systems to use new key
  5. Audit usage logs for unauthorized access
  6. Document incident for security review
  7. Delete compromised key after migration
  • Limit key distribution to necessary systems only
  • Consider using different tenants for isolated environments
  • Monitor usage patterns for anomalies

Cause: This is by design. Secrets are only visible on first retrieval.

Solution: Create a new key - there’s no way to view a masked secret again.