API for managing personal memory items with authentication and user-specific data.
API for managing personal memory items with authentication and user-specific data.
This API supports three authentication methods:
X-API-Key
headerX-API-Key: <your-api-key>
X-Session-Token
headerX-Session-Token: <your-session-token>
Authorization
headerAuthorization: Bearer <token>
All endpoints require one of these authentication methods.
Search through memories with authentication required.
Authentication Required: One of the following authentication methods must be used:
Authorization
headerX-API-Key
headerX-Session-Token
headerRecommended Headers:
Accept-Encoding: gzip
The API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.
HIGHLY RECOMMENDED SETTINGS FOR BEST RESULTS:
enable_agentic_graph: true
for intelligent, context-aware search that can understand ambiguous referencesmax_memories: 15-20
for comprehensive memory coveragemax_nodes: 10-15
for comprehensive graph entity relationshipsAgentic Graph Benefits: When enabled, the system can understand vague references by first identifying specific entities from your memory graph, then performing targeted searches. For example:
User Resolution Precedence:
HIGHLY RECOMMENDED: Maximum number of memories to return. Use at least 15-20 for comprehensive results. Lower values (5-10) may miss relevant information. Default is 20 for optimal coverage.
Detailed search query describing what you're looking for. For best results, write 2-3 sentences that include specific details, context, and time frame. Examples: 'Find recurring customer complaints about API performance from the last month. Focus on issues where customers specifically mentioned timeout errors or slow response times in their conversations.' 'What are the main issues and blockers in my current projects? Focus on technical challenges and timeline impacts.' 'Find insights about team collaboration and communication patterns from recent meetings and discussions.'
Whether to enable additional ranking of search results. Default is false because results are already ranked when using an LLM for search (recommended approach). Only enable this if you're not using an LLM in your search pipeline and need additional result ranking.
HIGHLY RECOMMENDED: Enable agentic graph search for intelligent, context-aware results. When enabled, the system can understand ambiguous references by first identifying specific entities from your memory graph, then performing targeted searches. Examples: 'customer feedback' → identifies your customers first, then finds their specific feedback; 'project issues' → identifies your projects first, then finds related issues; 'team meeting notes' → identifies team members first, then finds meeting notes. This provides much more relevant and comprehensive results. Set to false only if you need faster, simpler keyword-based search.
Optional internal user ID to filter search results by a specific user. If not provided, results are not filtered by user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional internal user ID to filter search results by a specific user. If not provided, results are not filtered by user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional internal user ID to filter search results by a specific user. If not provided, results are not filtered by user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional external user ID to filter search results by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional external user ID to filter search results by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional external user ID to filter search results by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional metadata filter. Any field in MemoryMetadata (including custom fields) can be used for filtering.
Optional metadata filter. Any field in MemoryMetadata (including custom fields) can be used for filtering.
curl -i -X POST \
'https://memory.papr.ai/v1/memory/search?max_memories=20&max_nodes=15' \
-H 'Accept-Encoding: gzip' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"enable_agentic_graph": true,
"external_user_id": "external_abc",
"metadata": {
"customMetadata": {
"priority": "high"
},
"location": "US",
"topics": "API performance"
},
"query": "Find recurring customer complaints about API performance from the last month. Focus on issues that multiple customers have mentioned and any specific feature requests or workflow improvements they'\''ve suggested.",
"rank_results": false,
"user_id": "user123"
}'
Successfully retrieved memories
Search results if successful
Search results if successful
Error message if failed
Error message if failed
Error message if failed
Additional error details or context
Additional error details or context
Additional error details or context
Unique identifier for this search query, maps to QueryLog objectId in Parse Server
Unique identifier for this search query, maps to QueryLog objectId in Parse Server
Unique identifier for this search query, maps to QueryLog objectId in Parse Server
{ "code": 200, "data": { "memories": [], "nodes": [] }, "search_id": "abc123def456", "status": "success" }
curl -i -X POST \
https://memory.papr.ai/v1/user \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"email": "user@example.com",
"external_id": "user123",
"metadata": {
"name": "John Doe",
"preferences": {
"theme": "dark"
}
},
"type": "developerUser"
}'
{ "code": 200, "created_at": "2024-03-20T10:00:00.000Z", "email": "user@example.com", "external_id": "user123", "metadata": { "name": "John Doe", "preferences": { … } }, "status": "success", "updated_at": "2024-03-20T10:00:00.000Z", "user_id": "abc123" }
curl -i -X GET \
'https://memory.papr.ai/v1/user?email=string&external_id=string&page=1&page_size=10' \
-H 'X-API-Key: string'
{ "code": 200, "data": [ { … } ], "page": 1, "page_size": 10, "status": "success", "total": 1 }