API Reference

REST API for HyperSpark Memory

The HyperSpark Memory API allows you to store, retrieve, and manage memories programmatically. Use it to give your AI applications persistent memory across sessions.

Base URL
https://memory.hypersparkai.com//api/v1

Authentication

All API requests require authentication using an API key. You can create API keys from yourdashboard. If your organization provided an API key, you can use it directly; no HyperSpark account required. Ask your org admin about which scopes are enabled.

Authentication Methods

You can authenticate using either method:

curl https://memory.hypersparkai.com//api/v1/memory/recall \
  -H "Authorization: Bearer hsmem_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"query": "user preferences"}'

API Key Format

API keys follow the format hsmem_ followed by 48 hexadecimal characters.

hsmem_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4

API Key Scopes

API keys can have different permission scopes that control what operations they can perform:

ScopePermissions
readQuery and retrieve memories
writeCreate and store memories
deleteRemove memories (forget operations)
adminAll permissions including org-wide operations

Multi-Tenant Support

All endpoints support an optional tenantId parameter for multi-tenant applications. This allows you to isolate memories by customer or workspace.

// Include tenantId in your request body
{
  "tenantId": "tenant_acme_corp",
  "userId": "user_123",
  "query": "project updates"
}

Endpoints

Response Format

All API responses follow a consistent JSON format with a success indicator:

{
  "success": true,
  "data": {
    // Response data varies by endpoint
  }
}

Usage Headers

Responses include headers to help you track usage:

HeaderDescription
X-Memory-LimitTotal memory storage limit
X-Memory-UsedCurrent memory usage count
X-Query-LimitMonthly query limit
X-Query-UsedQueries used this month

Error Codes

StatusCodeDescription
400Bad RequestInvalid request body or parameters
401UnauthorizedMissing or invalid API key
403ForbiddenAPI key lacks required scope
429Too Many RequestsRate limit or usage limit exceeded
500Internal ErrorServer-side error (please report)

Next Steps