API Reference
Authentication

Authentication

The Hypersave API uses API keys to authenticate requests. You can manage your API keys in the Hypersave Platform (opens in a new tab).

API Key Types

TypePrefixDescription
Livehs_live_Production keys for live applications
Tesths_test_Test keys for development and testing
⚠️

Your API keys carry many privileges, so be sure to keep them secure! Do not share your API keys in publicly accessible areas such as GitHub, client-side code, etc.

Using Your API Key

Include your API key in the Authorization header of all requests:

Authorization: Bearer YOUR_API_KEY

Example Request

curl https://api.hypersave.io/v1/memories \
  -H "Authorization: Bearer hs_live_xxxxxxxxxxxx"

Creating API Keys

  1. Log in to the Hypersave Platform (opens in a new tab)
  2. Navigate to API Keys
  3. Click Create New Key
  4. Enter a name for your key (e.g., "Production App", "Development")
  5. Optionally configure:
    • Rate limit per hour — Custom rate limit
    • Monthly request limit — Maximum monthly requests
    • Expiration — Key expiration date
  6. Click Create and copy your new API key

Your full API key is only shown once at creation. Store it securely!

Key Management

View Keys

GET /keys

Lists all your API keys (keys are redacted for security).

Regenerate Key

POST /keys/:id/regenerate

Generates a new API key value while keeping all settings. The old key becomes invalid immediately.

Revoke Key

DELETE /keys/:id

Permanently deletes an API key. This action cannot be undone.

Best Practices

  1. Use environment variables — Never hardcode API keys in your source code
  2. Rotate keys regularly — Regenerate keys periodically for security
  3. Use separate keys — Use different keys for development and production
  4. Set appropriate limits — Configure rate limits based on expected usage
  5. Monitor usage — Check your usage dashboard regularly

Environment Variable Example

# .env file
HYPERSAVE_API_KEY=hs_live_xxxxxxxxxxxx
// In your code
const apiKey = process.env.HYPERSAVE_API_KEY;

Error Responses

Invalid API Key

{
  "success": false,
  "error": "UNAUTHORIZED",
  "message": "Invalid API key provided"
}

Missing API Key

{
  "success": false,
  "error": "UNAUTHORIZED",
  "message": "No API key provided. Include your API key in the Authorization header."
}

Expired API Key

{
  "success": false,
  "error": "UNAUTHORIZED",
  "message": "API key has expired"
}

Rate Limited

{
  "success": false,
  "error": "RATE_LIMITED",
  "message": "Rate limit exceeded",
  "retryAfter": 3600
}