REST API¶
Complete REST API reference for Remembra.
Base URL¶
Authentication¶
When REMEMBRA_AUTH_ENABLED=true, include your API key in the header:
Endpoints¶
Health Check¶
Response:
Store Memory¶
Store a new memory with automatic extraction.
Request Body:
{
"content": "User's name is John. He works at Google as a senior engineer.",
"user_id": "user_123",
"project": "default",
"metadata": {
"source": "chat",
"session_id": "sess_abc"
},
"ttl": "30d"
}
Response:
{
"status": "success",
"memories": [
{
"id": "mem_abc123",
"content": "John works at Google as a senior engineer",
"action": "ADD",
"entities": ["John", "Google"]
}
],
"entities_extracted": 2,
"relationships_created": 1
}
Recall Memories¶
Query memories semantically.
Request Body:
{
"query": "What do I know about John?",
"user_id": "user_123",
"project": "default",
"limit": 10,
"threshold": 0.4,
"max_tokens": 4000,
"enable_hybrid": true,
"enable_rerank": false
}
Response:
{
"memories": [
{
"id": "mem_abc123",
"content": "John works at Google as a senior engineer",
"score": 0.92,
"created_at": "2026-03-01T10:30:00Z"
}
],
"context": "John works at Google as a senior engineer.",
"total": 1
}
Update Memory¶
Update an existing memory.
Request Body:
Response:
{
"status": "success",
"memory": {
"id": "mem_abc123",
"content": "John is a Staff Engineer at Google (promoted from Senior)"
}
}
Delete Memory¶
Delete specific memories.
Request Body:
Or delete all for a user:
List Memories¶
Get all memories for a user.
Response:
Historical Query (as_of)¶
Time-travel query.
Request Body:
Cleanup Expired¶
Remove expired memories.
Request Body:
Response:
Entity Endpoints¶
List Entities¶
Response:
{
"entities": [
{
"id": "ent_123",
"name": "John Smith",
"type": "PERSON",
"aliases": ["John", "Mr. Smith"]
},
{
"id": "ent_456",
"name": "Google",
"type": "ORG",
"aliases": ["Alphabet", "GOOG"]
}
]
}
Get Entity¶
Get Entity Relationships¶
Response:
{
"relationships": [
{
"source": "John Smith",
"target": "Google",
"type": "WORKS_AT",
"properties": {"role": "Staff Engineer"}
}
]
}
Get Entity Memories¶
Temporal Endpoints¶
Decay Report¶
View memory health and decay scores.
Response:
{
"total_memories": 100,
"healthy": 85,
"decaying": 10,
"expired": 5,
"memories": [
{
"id": "mem_123",
"content": "...",
"decay_score": 0.75,
"last_accessed": "2026-02-28T10:00:00Z"
}
]
}
Single Memory Decay¶
Run Cleanup¶
Request Body:
API Key Management¶
Create API Key¶
Headers: Master key required
curl -H "Authorization: Bearer master_key_here" \
-X POST http://localhost:8787/api/v1/keys \
-d '{"user_id": "user_123", "name": "Production"}'
Response:
Warning
The full API key is only shown once. Store it securely.
List API Keys¶
Revoke API Key¶
Rate Limits¶
Default rate limits (per API key):
| Endpoint | Limit |
|---|---|
POST /store |
30/minute |
POST /recall |
60/minute |
DELETE /memories |
10/minute |
Rate limit headers are included in responses:
Error Responses¶
| Code | HTTP Status | Description |
|---|---|---|
validation_error |
400 | Invalid request body |
authentication_error |
401 | Invalid or missing API key |
not_found |
404 | Resource not found |
rate_limit_exceeded |
429 | Too many requests |
internal_error |
500 | Server error |
OpenAPI Spec¶
Interactive API documentation available at:
Download OpenAPI spec: