Memokit
Getting Started

Authentication

Learn how to authenticate with the Memokit API

Authentication

All Memokit API requests require authentication using an API key.

API Keys

API keys are used to authenticate requests to the Memokit API. Each API key:

  • Starts with the prefix mk_
  • Is associated with your account
  • Has its own quota and rate limits
  • Provides isolated data access

Getting Your API Key

  1. Log in to the Memokit Console
  2. Navigate to API Keys in the sidebar
  3. Click Create API Key
  4. Give your key a descriptive name
  5. Copy the key immediately

Security Note: Your API key is only displayed once at creation. If you lose it, you'll need to create a new one.

Using Your API Key

Include your API key in the Authorization header of every request:

curl -X GET https://api.memokit.dev/v1/memories \
  -H "Authorization: Bearer mk_your_api_key"

Header Format

Authorization: Bearer mk_your_api_key

Security Best Practices

Keep Keys Secret

  • Never commit API keys to version control
  • Use environment variables to store keys
  • Don't share keys in public forums or documentation
# Good: Use environment variables
export MEMOKIT_API_KEY="mk_your_api_key"
curl -H "Authorization: Bearer $MEMOKIT_API_KEY" ...

Rotate Keys Regularly

  • Create new keys periodically
  • Delete old keys after transitioning to new ones
  • Monitor key usage in the console

Use Separate Keys for Environments

  • Create different keys for development, staging, and production
  • This makes it easier to track usage and revoke access if needed

Managing API Keys

View Keys

In the Console, go to API Keys to see all your keys with:

  • Key name
  • Creation date
  • Last used timestamp
  • Status (active/revoked)

Revoke Keys

If a key is compromised:

  1. Go to API Keys in the Console
  2. Find the compromised key
  3. Click the Delete button
  4. Confirm deletion

The key is immediately invalidated and cannot be used for future requests.

Error Responses

Missing Authorization Header

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authorization header is required"
  }
}

Invalid API Key

{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The provided API key is invalid"
  }
}

Revoked API Key

{
  "error": {
    "code": "API_KEY_REVOKED",
    "message": "This API key has been revoked"
  }
}

Next Steps

On this page