Papr Memory API (1.0.0)

API for managing memory, context, and retrieval for AI agents or apps with authentication and user-specific data.

Authentication

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.

Download OpenAPI description
Languages
Servers
Production server
http://memory.papr.ai/

v1

Operations

Submit Batch Feedback V1

Request

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:

  • Bearer token in Authorization header
  • API Key in X-API-Key header
  • Session token in X-Session-Token header

Required Headers:

  • Content-Type: application/json
  • X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')
Bodyapplication/jsonrequired
feedback_itemsArray of objects(Feedback Items)[ 1 .. 100 ] itemsrequired

List of feedback items to submit

Example: [{"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"}]
feedback_items[].​search_idstring(Search Id)required

The search_id from SearchResponse that this feedback relates to

Example: "abc123def456"
feedback_items[].​feedbackDataobject(FeedbackData)required

The feedback data containing all feedback information

Example: {"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"}}
feedback_items[].​feedbackData.​userMessageParsePointer (object) or null
Example: {"__type":"Pointer","className":"PostMessage","objectId":"abc123def456"}
Any of:

A pointer to a Parse object

feedback_items[].​feedbackData.​assistantMessageParsePointer (object) or null
Example: {"__type":"Pointer","className":"PostMessage","objectId":"abc123def456"}
Any of:

A pointer to a Parse object

feedback_items[].​feedbackData.​feedbackTypestring(FeedbackType)required

Types of feedback that can be provided

Enum"thumbs_up""thumbs_down""rating""correction""report""copy_action""save_action""create_document""memory_relevance""answer_quality"
Example: "thumbs_up"
feedback_items[].​feedbackData.​feedbackValueFeedbackvalue (string) or Feedbackvalue (null)(Feedbackvalue)
Example: "helpful"
Any of:
string(Feedbackvalue)
feedback_items[].​feedbackData.​feedbackScoreFeedbackscore (number) or Feedbackscore (null)(Feedbackscore)
Example: 1
Any of:
number(Feedbackscore)
feedback_items[].​feedbackData.​feedbackTextFeedbacktext (string) or Feedbacktext (null)(Feedbacktext)
Example: "This answer was very helpful and accurate"
Any of:
string(Feedbacktext)
feedback_items[].​feedbackData.​feedbackSourcestring(FeedbackSource)required

Where the feedback was provided from

Enum"inline""post_query""session_end""memory_citation""answer_panel"
Example: "inline"
feedback_items[].​feedbackData.​citedMemoryIdsArray of Citedmemoryids (strings) or Citedmemoryids (null)(Citedmemoryids)
Example: ["mem_123","mem_456"]
Any of:
feedback_items[].​feedbackData.​citedNodeIdsArray of Citednodeids (strings) or Citednodeids (null)(Citednodeids)
Example: ["node_123","node_456"]
Any of:
feedback_items[].​feedbackData.​feedbackProcessedFeedbackprocessed (boolean) or Feedbackprocessed (null)(Feedbackprocessed)
Example: true
Any of:
boolean(Feedbackprocessed)
feedback_items[].​feedbackData.​feedbackImpactFeedbackimpact (string) or Feedbackimpact (null)(Feedbackimpact)
Example: "positive"
Any of:
string(Feedbackimpact)
feedback_items[].​user_idUser Id (string) or User Id (null)(User Id)

Internal user ID (if not provided, will be resolved from authentication)

Example: "abc123def456"
Any of:

Internal user ID (if not provided, will be resolved from authentication)

string(User Id)

Internal user ID (if not provided, will be resolved from authentication)

feedback_items[].​external_user_idExternal User Id (string) or External User Id (null)(External User Id)

External user ID for developer API keys acting on behalf of end users

Example: "dev_api_key_123"
Any of:

External user ID for developer API keys acting on behalf of end users

string(External User Id)

External user ID for developer API keys acting on behalf of end users

feedback_items[].​organization_idOrganization Id (string) or Organization Id (null)(Organization Id)

Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.

Any of:

Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.

string(Organization Id)

Optional organization ID for multi-tenant feedback scoping. When provided, feedback is scoped to this organization.

feedback_items[].​namespace_idNamespace Id (string) or Namespace Id (null)(Namespace Id)

Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.

Any of:

Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.

string(Namespace Id)

Optional namespace ID for multi-tenant feedback scoping. When provided, feedback is scoped to this namespace.

session_contextSession Context (object) or Session Context (null)(Session Context)

Session-level context for batch feedback

Any of:

Session-level context for batch feedback

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": {}
  }'

Responses

Batch feedback processed successfully

Bodyapplication/json
codeinteger(Code)required

HTTP status code

statusstring(Status)required

'success' or 'error'

feedback_idsArray of strings(Feedback Ids)

List of feedback IDs

successful_countinteger(Successful Count)

Number of successfully processed feedback items

Default 0
failed_countinteger(Failed Count)

Number of failed feedback items

Default 0
errorsArray of objects(Errors)

List of error details

messagestring(Message)required

Human-readable message

errorError (string) or Error (null)(Error)

Error message if status is 'error'

Any of:

Error message if status is 'error'

string(Error)

Error message if status is 'error'

Response
application/json
{ "code": 200, "status": "success", "feedback_ids": [ "fb_123", "fb_456" ], "successful_count": 2, "failed_count": 0, "errors": [], "message": "Processed 2 feedback items successfully" }

Get Feedback By Id V1

Request

Retrieve feedback by ID.

This endpoint allows developers to fetch feedback details by feedback ID. Only the user who created the feedback or users with appropriate permissions can access it.

Authentication Required: One of the following authentication methods must be used:

  • Bearer token in Authorization header
  • API Key in X-API-Key header
  • Session token in X-Session-Token header

Required Headers:

  • X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')
Path
feedback_idstring(Feedback Id)required
curl -i -X GET \
  'http://memory.papr.ai/v1/feedback/{feedback_id}' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Feedback retrieved successfully

Bodyapplication/json
codeinteger(Code)required

HTTP status code

statusstring(Status)required

'success' or 'error'

feedback_idFeedback Id (string) or Feedback Id (null)(Feedback Id)

Unique feedback ID

Any of:

Unique feedback ID

string(Feedback Id)

Unique feedback ID

messagestring(Message)required

Human-readable message

errorError (string) or Error (null)(Error)

Error message if status is 'error'

Any of:

Error message if status is 'error'

string(Error)

Error message if status is 'error'

detailsDetails (object) or Details (null)(Details)

Additional error details

Any of:

Additional error details

Response
application/json
{ "code": 200, "status": "success", "feedback_id": "fb_123456789", "message": "Feedback retrieved successfully", "details": { "feedback_type": "thumbs_up", "feedback_score": 1, "feedback_text": "This was helpful!", "search_id": "search_123", "created_at": "2024-01-17T17:30:45.123456Z" } }

Upload Document

Request

Upload and process documents using the pluggable architecture.

Authentication Required: Bearer token or API key

Supported Providers: TensorLake.ai, Reducto AI, Gemini Vision (fallback)

Features:

  • Multi-tenant organization/namespace scoping
  • Temporal workflow for durable execution
  • Real-time WebSocket status updates
  • Integration with Parse Server (Post/PostSocial/PageVersion)
  • Automatic fallback between providers
Bodymultipart/form-datarequired
filestring(binary)(File)required
preferred_providerPreferredProvider (string) or null
Any of:

Preferred provider for document processing.

string(PreferredProvider)

Preferred provider for document processing.

Enum"gemini""tensorlake""reducto""auto"
hierarchical_enabledboolean(Hierarchical Enabled)
Default true
schema_idSchema Id (string) or Schema Id (null)(Schema Id)
Any of:
string(Schema Id)
simple_schema_modeboolean(Simple Schema Mode)
Default false
graph_overrideGraph Override (string) or Graph Override (null)(Graph Override)
Any of:
string(Graph Override)
property_overridesProperty Overrides (string) or Property Overrides (null)(Property Overrides)
Any of:
string(Property Overrides)
namespaceNamespace (string) or Namespace (null)(Namespace)
Any of:
string(Namespace)
user_idUser Id (string) or User Id (null)(User Id)
Any of:
string(User Id)
end_user_idEnd User Id (string) or End User Id (null)(End User Id)
Any of:
string(End User Id)
webhook_urlWebhook Url (string) or Webhook Url (null)(Webhook Url)
Any of:
string(Webhook Url)
webhook_secretWebhook Secret (string) or Webhook Secret (null)(Webhook Secret)
Any of:
string(Webhook Secret)
metadataMetadata (string) or Metadata (null)(Metadata)
Any of:
string(Metadata)
curl -i -X POST \
  http://memory.papr.ai/v1/document \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: multipart/form-data' \
  -F file=string \
  -F preferred_provider=gemini \
  -F hierarchical_enabled=true \
  -F schema_id=string \
  -F simple_schema_mode=false \
  -F graph_override=string \
  -F property_overrides=string \
  -F namespace=string \
  -F user_id=string \
  -F end_user_id=string \
  -F webhook_url=string \
  -F webhook_secret=string \
  -F metadata=string

Responses

Document upload started

Bodyapplication/json
codeinteger(Code)

HTTP status code

Default 200
statusstring(Status)

'success', 'processing', 'error', etc.

Default "success"
messageMessage (string) or Message (null)(Message)

Human-readable status message

Any of:

Human-readable status message

string(Message)

Human-readable status message

errorError (string) or Error (null)(Error)

Error message if failed

Any of:

Error message if failed

string(Error)

Error message if failed

detailsDetails (any) or Details (null)(Details)

Additional error details or context

Any of:

Additional error details or context

any(Details)

Additional error details or context

document_statusobject(DocumentUploadStatus)required

Status and progress of the document upload

document_status.​progressnumber(Progress)required

0.0 to 1.0 for percentage

document_status.​current_pageCurrent Page (integer) or Current Page (null)(Current Page)
Any of:
integer(Current Page)
document_status.​total_pagesTotal Pages (integer) or Total Pages (null)(Total Pages)
Any of:
integer(Total Pages)
document_status.​current_filenameCurrent Filename (string) or Current Filename (null)(Current Filename)
Any of:
string(Current Filename)
document_status.​upload_idUpload Id (string) or Upload Id (null)(Upload Id)
Any of:
string(Upload Id)
document_status.​page_idPage Id (string) or Page Id (null)(Page Id)

Post ID in Parse Server (user-facing page ID)

Any of:

Post ID in Parse Server (user-facing page ID)

string(Page Id)

Post ID in Parse Server (user-facing page ID)

document_status.​status_typeDocumentUploadStatusType (string) or null

Processing status type

Any of:

Processing status type

string(DocumentUploadStatusType)

Processing status type

Enum"processing""completed""failed""not_found""queued""cancelled"
document_status.​errorError (string) or Error (null)(Error)

Error message if failed

Any of:

Error message if failed

string(Error)

Error message if failed

memory_itemsArray of objects(Memory Items)

List of memory items created from the document

memoriesArray of Memories (objects) or Memories (null)(Memories)

For backward compatibility

Any of:

For backward compatibility

Response
application/json
{ "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", "page_id": "string", "status_type": "processing", "error": "string" }, "memory_items": [ {} ], "memories": [ {} ] }

Memory

Operations

User

Operations

Feedback

Operations

Document

Operations

Schema Management

Operations

GraphQL

Operations