Authentication & Security
Security and privacy are not add-ons; they are the foundational primitives of our infrastructure. We built this API so you can give your AI agents perfect memory without ever sacrificing your end-users' privacy.
This guide explains how to authenticate your API requests, manage your users securely, and understand our zero-logging cryptographic architecture.
1. API Authentication
All server-to-server requests to our API must be authenticated using your secret Maple Memory API Key. You can generate and revoke Maple Memory API Keys from your Developer Dashboard.
Pass your Maple Memory API Key in the Authorization HTTP header as a Bearer token.
POST /memories/search HTTP/1.1
Host: api.yourdomain.com
Authorization: Bearer heymaple_live_your_secret_heymaple_api_key_here
Content-Type: application/json
import requests
HEADERS = {
"Authorization": "Bearer heymaple_live_your_secret_heymaple_api_key_here",
"Content-Type": "application/json"
}
- Never share your secret keys. Keep them out of version control using environment variables (.env).
- Never expose keys in the browser. All calls should be routed through your own backend.
- Rotate compromised keys immediately via the dashboard.
2. Multi-Tenancy (User Isolation)
Because you are building an application for your users, strict data isolation is critical. Our API is inherently multi-tenant.
Every memory node, conversation, and graph link is strictly bound to the specific
user_id you provide in your request payload.
3. Our "Zero-Logging" Privacy Architecture
Most AI infrastructure providers log your plaintext prompts to their databases. We don't. We operate as a "Blindfolded Middleman" using a three-step privacy protocol.
4. Compliance & Trust
By utilizing our API, you drastically reduce your own infrastructure's compliance burden. Integrating our Contextual Memory Graphs helps accelerate your own path to SOC2 and HIPAA compliance.