Papr Memory API (1.0.0)

API for managing personal memory items 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

Telemetry Events

Request

Telemetry proxy endpoint for anonymous OSS adoption tracking.

This endpoint receives telemetry events from OSS installations and forwards them to Amplitude using Papr's API key (which stays secure on the server).

Privacy:

  • All user IDs are hashed/anonymized
  • No PII is collected
  • Data is used only for understanding OSS adoption patterns

Opt-in: Users must explicitly enable telemetry in their OSS installation.

Request Body:

{
  "events": [
    {
      "event_name": "memory_created",
      "properties": {
        "type": "text",
        "has_metadata": true
      },
      "user_id": "hashed_user_id",
      "timestamp": 1234567890000
    }
  ],
  "anonymous_id": "session_id"
}
Bodyapplication/jsonrequired
eventsArray of objects(Events)required

List of telemetry events to track

events[].​event_namestring(Event Name)required

Event name (e.g., 'memory_created', 'search_performed')

events[].​propertiesProperties (object) or Properties (null)(Properties)

Event properties (will be anonymized)

Any of:

Event properties (will be anonymized)

events[].​user_idUser Id (string) or User Id (null)(User Id)

Anonymous user ID (hashed)

Any of:

Anonymous user ID (hashed)

string(User Id)

Anonymous user ID (hashed)

events[].​timestampTimestamp (integer) or Timestamp (null)(Timestamp)

Event timestamp (Unix epoch in milliseconds)

Any of:

Event timestamp (Unix epoch in milliseconds)

integer(Timestamp)

Event timestamp (Unix epoch in milliseconds)

anonymous_idAnonymous Id (string) or Anonymous Id (null)(Anonymous Id)

Anonymous session ID

Any of:

Anonymous session ID

string(Anonymous Id)

Anonymous session ID

curl -i -X POST \
  http://memory.papr.ai/v1/telemetry/events \
  -H 'Content-Type: application/json' \
  -d '{
    "events": [
      {
        "event_name": "string",
        "properties": {},
        "user_id": "string",
        "timestamp": 0
      }
    ],
    "anonymous_id": "string"
  }'

Responses

Successful Response

Bodyapplication/json
successboolean(Success)required

Whether the events were successfully processed

events_receivedinteger(Events Received)required

Number of events received

events_processedinteger(Events Processed)required

Number of events successfully processed

messageMessage (string) or Message (null)(Message)

Optional message

Any of:

Optional message

string(Message)

Optional message

Response
application/json
{ "success": true, "events_received": 0, "events_processed": 0, "message": "string" }

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)
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)
memory_policyMemory Policy (string) or Memory Policy (null)(Memory Policy)

JSON-encoded memory policy. Includes mode ('auto'/'manual'), schema_id, node_constraints (applied in auto mode when present), and OMO fields (consent, risk, acl). This is the recommended way to configure memory processing.

Any of:

JSON-encoded memory policy. Includes mode ('auto'/'manual'), schema_id, node_constraints (applied in auto mode when present), and OMO fields (consent, risk, acl). This is the recommended way to configure memory processing.

string(Memory Policy)

JSON-encoded memory policy. Includes mode ('auto'/'manual'), schema_id, node_constraints (applied in auto mode when present), and OMO fields (consent, risk, acl). This is the recommended way to configure memory processing.

namespace_idNamespace Id (string) or Namespace Id (null)(Namespace Id)
Any of:
string(Namespace Id)
external_user_idExternal User Id (string) or External User Id (null)(External User Id)

Your application's user identifier. This is the primary way to identify users. Also accepts legacy 'end_user_id'.

Any of:

Your application's user identifier. This is the primary way to identify users. Also accepts legacy 'end_user_id'.

string(External User Id)

Your application's user identifier. This is the primary way to identify users. Also accepts legacy 'end_user_id'.

user_idUser Id (string) or User Id (null)(User Id)

DEPRECATED: Internal Papr Parse user ID. Most developers should use external_user_id.

Any of:

DEPRECATED: Internal Papr Parse user ID. Most developers should use external_user_id.

string(User Id)

DEPRECATED: Internal Papr Parse user ID. Most developers should use external_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 graph_override=string \
  -F property_overrides=string \
  -F memory_policy=string \
  -F namespace_id=string \
  -F external_user_id=string \
  -F 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": [ {} ] }

Get Document Status

Request

Get processing status for an uploaded document

Path
upload_idstring(Upload Id)required
curl -i -X GET \
  'http://memory.papr.ai/v1/document/status/{upload_id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successful Response

Bodyapplication/json
property name*anyadditional property
Response
application/json
{}

Memory

Operations

User

Operations

Feedback

Operations

Schema Management

Operations

Messages

Operations

omo

Operations

Sync

Operations

Telemetry

Operations

Document

Operations

GraphQL

Operations

Authentication

Operations