API for managing memory, context, and retrieval for AI agents or apps with authentication and user-specific data.
API for managing memory, context, and retrieval for AI agents or apps 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.
curl -i -X POST \
http://memory.papr.ai/v1/user/batch \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"users": [
{
"email": "user@example.com",
"external_id": "user123",
"metadata": {
"name": "John Doe",
"preferences": {
"theme": "dark"
}
},
"type": "developerUser"
}
]
}'{ "code": 200, "data": [ { … } ], "page": 1, "page_size": 10, "status": "success", "total": 1 }
Submit feedback on search results to help improve model performance.
This endpoint allows developers to provide feedback on:
The feedback is used to train and improve:
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerRequired Headers:
The search_id from SearchResponse that this feedback relates to
The feedback data containing all feedback information
A pointer to a Parse object
A pointer to a Parse object
Types of feedback that can be provided
Where the feedback was provided from
Internal user ID (if not provided, will be resolved from authentication)
Internal user ID (if not provided, will be resolved from authentication)
Internal user ID (if not provided, will be resolved from authentication)
External user ID for developer API keys acting on behalf of end users
External user ID for developer API keys acting on behalf of end users
External user ID for developer API keys acting on behalf of end users
Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.
Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.
Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.
Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.
Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.
Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.
curl -i -X POST \
http://memory.papr.ai/v1/feedback \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"external_user_id": "dev_api_key_123",
"feedbackData": {
"assistantMessage": {
"__type": "Pointer",
"className": "PostMessage",
"objectId": "abc123def456"
},
"citedMemoryIds": [
"mem_123",
"mem_456"
],
"citedNodeIds": [
"node_123",
"node_456"
],
"feedbackImpact": "positive",
"feedbackProcessed": true,
"feedbackScore": 1,
"feedbackSource": "inline",
"feedbackText": "This answer was very helpful and accurate",
"feedbackType": "thumbs_up",
"feedbackValue": "helpful",
"userMessage": {
"__type": "Pointer",
"className": "PostMessage",
"objectId": "abc123def456"
}
},
"search_id": "abc123def456",
"user_id": "abc123def456"
}'{ "code": 200, "status": "success", "feedback_id": "fb_123456789", "message": "Feedback submitted successfully and will be processed for model improvement" }
Submit multiple feedback items in a single request.
Useful for submitting session-end feedback or bulk feedback collection. Each feedback item is processed independently, so partial success is possible.
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerRequired Headers:
List of feedback items to submit
The search_id from SearchResponse that this feedback relates to
The feedback data containing all feedback information
A pointer to a Parse object
A pointer to a Parse object
Types of feedback that can be provided
Where the feedback was provided from
Internal user ID (if not provided, will be resolved from authentication)
Internal user ID (if not provided, will be resolved from authentication)
Internal user ID (if not provided, will be resolved from authentication)
External user ID for developer API keys acting on behalf of end users
External user ID for developer API keys acting on behalf of end users
External user ID for developer API keys acting on behalf of end users
Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.
Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.
Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.
Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.
Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.
Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.
curl -i -X POST \
http://memory.papr.ai/v1/feedback/batch \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"feedback_items": [
{
"external_user_id": "dev_api_key_123",
"feedbackData": {
"assistantMessage": {
"__type": "Pointer",
"className": "PostMessage",
"objectId": "abc123def456"
},
"citedMemoryIds": [
"mem_123",
"mem_456"
],
"citedNodeIds": [
"node_123",
"node_456"
],
"feedbackImpact": "positive",
"feedbackProcessed": true,
"feedbackScore": 1,
"feedbackSource": "inline",
"feedbackText": "This answer was very helpful and accurate",
"feedbackType": "thumbs_up",
"feedbackValue": "helpful",
"userMessage": {
"__type": "Pointer",
"className": "PostMessage",
"objectId": "abc123def456"
}
},
"search_id": "abc123def456",
"user_id": "abc123def456"
}
],
"session_context": {}
}'{ "code": 200, "status": "success", "feedback_ids": [ "fb_123", "fb_456" ], "successful_count": 2, "failed_count": 0, "errors": [], "message": "Processed 2 feedback items successfully" }