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:
API Key: Include your API key in the X-API-Key
header
X-API-Key: <your-api-key>
Session Token: Include your session token in the X-Session-Token
header
X-Session-Token: <your-session-token>
Bearer Token: Include your OAuth2 token from Auth0 in the Authorization
header
Authorization: Bearer <token>
All endpoints require one of these authentication methods.
curl -i -X POST \
https://platform.papr.ai/_mock/apis/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://platform.papr.ai/_mock/apis/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 }
curl -i -X GET \
'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
-H 'x-api-key: string'
{ "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 PUT \
'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
-H 'Content-Type: application/json' \
-H 'x-api-key: string' \
-d '{
"email": "updated.user@example.com",
"external_id": "updated_user_123",
"metadata": {
"name": "Updated User",
"preferences": {
"theme": "light"
}
},
"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 DELETE \
'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
-H 'x-api-key: string'
Successful Response
ID of the user attempted to delete
ID of the user attempted to delete
ID of the user attempted to delete
Success or error message
Success or error message
Success or error message
Error message if failed
Error message if failed
Error message if failed
{ "code": 200, "message": "User and association deleted successfully", "status": "success", "user_id": "abc123" }
Add a new memory item to the system with size validation and background processing.
Authentication Required: One of the following authentication methods must be used:
Authorization
headerX-API-Key
headerX-Session-Token
headerRequired Headers:
The API validates content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).
The content of the memory item you want to add to memory
Content type of the memory item
Metadata used in Neo4J and Pinecone for a memory item
Metadata used in Neo4J and Pinecone for a memory item
Context can be conversation history or any relevant context for a memory item
Context can be conversation history or any relevant context for a memory item
Array of relationships that we can use in Graph DB (neo4J)
Array of relationships that we can use in Graph DB (neo4J)
curl -i -X POST \
'https://platform.papr.ai/_mock/apis/v1/memory?skip_background_processing=false' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"content": "Meeting notes from the product planning session",
"context": [
{
"content": "Let'\''s discuss the Q2 product roadmap",
"role": "user"
},
{
"content": "I'\''ll help you plan the roadmap. What are your key objectives?",
"role": "assistant"
}
],
"imageGenerationCategory": "business_management",
"metadata": {
"conversationId": "conv-123",
"createdAt": "2024-03-21T10:00:00Z",
"emoji tags": "📊,💡,📝",
"emotion tags": "focused, productive",
"hierarchical structures": "Business/Planning/Product",
"location": "Conference Room A",
"sourceUrl": "https://meeting-notes.example.com/123",
"topics": "product, planning"
},
"relationships_json": [
{
"metadata": {
"relevance": "high"
},
"related_item_id": "previous_memory_item_id",
"related_item_type": "TextMemoryItem",
"relation_type": "follows"
}
],
"type": "text"
}'
{ "code": 200, "status": "success", "data": [ { … } ] }
Update an existing memory item by ID.
Authentication Required: One of the following authentication methods must be used:
Authorization
headerX-API-Key
headerX-Session-Token
headerRequired Headers:
The API validates content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).
The new content of the memory item
The new content of the memory item
The new content of the memory item
Content type of the memory item
Content type of the memory item
Content type of the memory item
Updated metadata for Neo4J and Pinecone
Updated metadata for Neo4J and Pinecone
Updated context for the memory item
Updated context for the memory item
Updated relationships for Graph DB (neo4J)
Updated relationships for Graph DB (neo4J)
curl -i -X PUT \
'https://platform.papr.ai/_mock/apis/v1/memory/{memory_id}' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"content": "Updated meeting notes from the product planning session",
"context": [
{
"content": "Let'\''s update the Q2 product roadmap",
"role": "user"
},
{
"content": "I'\''ll help you update the roadmap. What changes would you like to make?",
"role": "assistant"
}
],
"metadata": {
"emoji tags": "📊,💡,📝,✨",
"emotion tags": "focused, productive, satisfied",
"hierarchical structures": "Business/Planning/Product/Updates",
"topics": "product, planning, updates"
},
"relationships_json": [
{
"metadata": {
"relevance": "high"
},
"related_item_id": "previous_memory_item_id",
"related_item_type": "TextMemoryItem",
"relation_type": "updates"
}
],
"type": "text"
}'
Memory successfully updated
List of updated memory items if successful
List of updated memory items 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
Status message
Status message
Status message
{ "code": 200, "status": "success", "memory_items": [ { … } ], "error": "string", "details": {}, "message": "string", "status_obj": { "pinecone": false, "neo4j": false, "parse": false } }
curl -i -X DELETE \
'https://platform.papr.ai/_mock/apis/v1/memory/{memory_id}?skip_parse=false' \
-H 'X-API-Key: YOUR_API_KEY_HERE'
{ "code": 200, "status": "success", "message": "string", "error": "string", "memoryId": "", "objectId": "", "deletion_status": { "pinecone": false, "neo4j": false, "parse": false }, "details": {} }
curl -i -X GET \
'https://platform.papr.ai/_mock/apis/v1/memory/{memory_id}' \
-H 'X-API-Key: YOUR_API_KEY_HERE'
{ "code": 200, "data": { "memories": [], "nodes": [] }, "status": "success" }
Add multiple memory items in a batch with size validation and background processing.
Authentication Required: One of the following authentication methods must be used:
Authorization
headerX-API-Key
headerX-Session-Token
headerRequired Headers:
The API validates individual memory content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).
List of memory items to add in batch
The content of the memory item you want to add to memory
Content type of the memory item
Metadata used in Neo4J and Pinecone for a memory item
Metadata used in Neo4J and Pinecone for a memory item
Context can be conversation history or any relevant context for a memory item
Context can be conversation history or any relevant context for a memory item
Array of relationships that we can use in Graph DB (neo4J)
Array of relationships that we can use in Graph DB (neo4J)
curl -i -X POST \
'https://platform.papr.ai/_mock/apis/v1/memory/batch?skip_background_processing=false' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"batch_size": 10,
"memories": [
{
"content": "Meeting notes from the product planning session",
"metadata": {
"createdAt": "2024-03-21T10:00:00Z",
"emoji tags": "📊,💡,📝",
"emotion tags": "focused, productive",
"hierarchical structures": "Business/Planning/Product",
"topics": "product, planning"
},
"type": "text"
},
{
"content": "Follow-up tasks from the planning meeting",
"metadata": {
"createdAt": "2024-03-21T11:00:00Z",
"emoji tags": "✅,📋",
"emotion tags": "organized",
"hierarchical structures": "Business/Tasks/Planning",
"topics": "tasks, planning"
},
"type": "text"
}
]
}'
Memories successfully added
Human-readable status message
Human-readable status message
Human-readable status message
Batch-level error message, if any
Batch-level error message, if any
Batch-level error message, if any
Additional error details or context
Additional error details or context
Additional error details or context
{ "code": 200, "status": "success", "message": "string", "error": "string", "details": {}, "successful": [ { … } ], "errors": [ { … } ], "total_processed": 0, "total_successful": 0, "total_failed": 0, "total_content_size": 0, "total_storage_size": 0 }
Upload a document (PDF/HTML/TXT) to be processed and added to memory.
Authentication Required: One of the following authentication methods must be used:
Authorization
headerX-API-Key
headerX-Session-Token
headerRequired Headers:
Form Data:
curl -i -X POST \
'https://platform.papr.ai/_mock/apis/v1/document?post_objectId=string&skip_background_processing=false' \
-H 'X-API-Key: YOUR_API_KEY_HERE'
Document upload started
Human-readable status message
Human-readable status message
Human-readable status message
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
Status and progress of the document upload
Processing status type
Processing status type
Processing status type
{ "code": 200, "status": "success", "message": "string", "error": "string", "details": {}, "document_status": { "progress": 0, "current_page": 0, "total_pages": 0, "current_filename": "string", "upload_id": "string", "status_type": "processing", "error": "string" }, "memory_items": [ { … } ], "memories": [ { … } ] }
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.
Detailed search query describing what you're looking for. For best results, write 2-3 sentences that include specific details, context, and time frame. For example: '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.'
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.
Optional user ID to filter search results by a specific user. If not provided, results are not filtered by user.
Optional user ID to filter search results by a specific user. If not provided, results are not filtered by user.
Optional user ID to filter search results by a specific user. If not provided, results are not filtered by user.
curl -i -X POST \
'https://platform.papr.ai/_mock/apis/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 '{
"query": "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.",
"rank_results": true,
"user_id": "user123"
}'
{ "code": 200, "data": { "memories": [], "nodes": [] }, "status": "success" }