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

Get Session History

Request

Retrieve message history for a specific conversation session.

Authentication Required: Bearer token, API key, or session token

Pagination:

  • Use limit and skip parameters for pagination
  • Messages are returned in chronological order (oldest first)
  • total_count indicates total messages in the session

Access Control:

  • Only returns messages for the authenticated user
  • Workspace scoping is applied if available
Path
session_idstring(Session Id)required
Query
limitinteger(Limit)[ 1 .. 100 ]

Maximum number of messages to return

Default 50
skipinteger(Skip)>= 0

Number of messages to skip for pagination

Default 0
curl -i -X GET \
  'http://memory.papr.ai/v1/messages/sessions/{session_id}?limit=50&skip=0' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Message history retrieved

Bodyapplication/json
sessionIdstring(Sessionid)required

Session ID of the conversation

Example: "session_123"
messagesArray of objects(Messages)required

List of messages in chronological order

Example: [{"content":"Can you help me plan the Q4 product roadmap?","createdAt":"2024-01-15T10:30:00Z","objectId":"msg_abc123","processing_status":"completed","role":"user","sessionId":"session_123"},{"content":"I'd be happy to help you plan your Q4 roadmap. Let's start by identifying your key objectives.","createdAt":"2024-01-15T10:31:00Z","objectId":"msg_def456","processing_status":"completed","role":"assistant","sessionId":"session_123"}]
messages[].​objectIdstring(Objectid)required

Parse Server objectId of the stored message

Example: "msg_abc123"
messages[].​sessionIdstring(Sessionid)required

Session ID of the conversation

Example: "session_123"
messages[].​rolestring(MessageRole)required

Role of the message sender

Enum"user""assistant"
Example: "user"
messages[].​contentContent (string) or Array of Content (objects)(Content)required

Content of the message - can be a simple string or structured content objects

Example: "Can you help me plan the Q4 product roadmap?"
Any of:

Content of the message - can be a simple string or structured content objects

string(Content)

Content of the message - can be a simple string or structured content objects

messages[].​createdAtstring(date-time)(Createdat)required

When the message was created

Example: "2024-01-15T10:30:00Z"
messages[].​processing_statusstring(Processing Status)

Status of background processing (queued, analyzing, completed, failed)

Default "queued"
Example: "queued"
total_countinteger(Total Count)required

Total number of messages in the session

Example: 2
Response
application/json
{ "messages": [ {}, {} ], "sessionId": "session_123", "total_count": 2 }

Get Session Status

Request

Get processing status for messages in a session.

Authentication Required: Bearer token, API key, or session token

Status Information:

  • Total messages in session
  • Processing status breakdown (queued, analyzing, completed, failed)
  • Any messages with processing errors
Path
session_idstring(Session Id)required
curl -i -X GET \
  'http://memory.papr.ai/v1/messages/sessions/{session_id}/status' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Session processing status

Bodyapplication/json
any
Response
application/json
null

Process Session Messages

Request

Process all stored messages in a session that were previously stored with process_messages=false.

Authentication Required: Bearer token, API key, or session token

This endpoint allows you to retroactively process messages that were initially stored without processing. Useful for:

  • Processing messages after deciding you want them as memories
  • Batch processing large conversation sessions
  • Re-processing sessions with updated AI models

Processing Behavior:

  • Only processes messages with status 'stored_only' or 'pending'
  • Uses the same smart batch analysis (every 15 messages)
  • Respects existing memory creation pipeline
Path
sessionIdstring(Sessionid)required
curl -i -X POST \
  'http://memory.papr.ai/v1/messages/sessions/{sessionId}/process' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Session messages queued for processing

Bodyapplication/json
any
Response
application/json
null

Memory

Operations

User

Operations

Feedback

Operations

Document

Operations

Schema Management

Operations

Messages

Operations

GraphQL

Operations