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

Update User Schema V1

Request

Update an existing schema.

Allows modification of schema properties, node types, relationship types, and status. User must have write access to the schema. Updates create a new version while preserving the existing data.

Status Management:

  • Set status to "active" to activate the schema and trigger Neo4j index creation
  • Set status to "draft" to deactivate the schema
  • Set status to "archived" to soft-delete the schema
Path
schema_idstring(Schema Id)required
Bodyapplication/jsonrequired
property name*anyadditional property
curl -i -X PUT \
  'http://memory.papr.ai/v1/schemas/{schema_id}' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{}'

Responses

Schema updated successfully

Bodyapplication/json
successboolean(Success)required
dataUserGraphSchema (object) or null
Any of:

Complete user-defined graph schema

errorError (string) or Error (null)(Error)
Any of:
string(Error)
codeinteger(Code)
Default 200
Response
application/json
{ "success": true, "data": { "id": "string", "name": "string", "description": "string", "version": "1.0.0", "user_id": "string", "workspace_id": "string", "organization": "string", "namespace": "string", "node_types": {}, "relationship_types": {}, "status": "draft", "scope": "personal", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "read_access": [], "write_access": [], "usage_count": 0, "last_used_at": "2019-08-24T14:15:22Z" }, "error": "string", "code": 200 }

Delete User Schema V1

Request

Delete a schema.

Soft deletes the schema by marking it as archived. The schema data and associated graph nodes/relationships are preserved for data integrity. User must have write access to the schema.

Path
schema_idstring(Schema Id)required
curl -i -X DELETE \
  'http://memory.papr.ai/v1/schemas/{schema_id}' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Schema deleted successfully

Bodyapplication/json
any
Response
application/json
null

Store Message

Request

Store a chat message and queue it for AI analysis and memory creation.

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

Processing Control:

  • Set process_messages: true (default) to enable full AI analysis and memory creation
  • Set process_messages: false to store messages only without processing into memories

Processing Flow (when process_messages=true):

  1. Message is immediately stored in PostMessage class
  2. Background processing analyzes the message for memory-worthiness
  3. If worthy, creates a memory with appropriate role-based categorization
  4. Links the message to the created memory

Role-Based Categories:

  • User messages: preference, task, goal, facts, context
  • Assistant messages: skills, learning

Session Management:

  • sessionId is required to group related messages
  • Use the same sessionId for an entire conversation
  • Retrieve conversation history using GET /messages/sessions/{sessionId}
Bodyapplication/jsonrequired
contentContent (string) or Array of Content (objects)(Content)required

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

Any of:

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

string(Content)

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

rolestring(MessageRole)required

Role of the message sender (user or assistant)

Enum"user""assistant"
sessionIdstring(Sessionid)required

Session ID to group related messages in a conversation

metadataMemoryMetadata (object) or null

Optional metadata for the message

Any of:

Optional metadata for the message

process_messagesboolean(Process Messages)

Whether to process messages into memories (true) or just store them (false). Default is true.

Default true
organization_idOrganization Id (string) or Organization Id (null)(Organization Id)

Optional organization ID for multi-tenant message scoping

Any of:

Optional organization ID for multi-tenant message scoping

string(Organization Id)

Optional organization ID for multi-tenant message scoping

namespace_idNamespace Id (string) or Namespace Id (null)(Namespace Id)

Optional namespace ID for multi-tenant message scoping

Any of:

Optional namespace ID for multi-tenant message scoping

string(Namespace Id)

Optional namespace ID for multi-tenant message scoping

curl -i -X POST \
  http://memory.papr.ai/v1/messages \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "content": "Can you help me plan the Q4 product roadmap?",
    "metadata": {
      "location": "Office",
      "topics": [
        "product",
        "planning",
        "roadmap"
      ]
    },
    "process_messages": true,
    "role": "user",
    "sessionId": "session_123"
  }'

Responses

Message stored and queued for processing

Bodyapplication/json
objectIdstring(Objectid)required

Parse Server objectId of the stored message

Example: "msg_abc123"
sessionIdstring(Sessionid)required

Session ID of the conversation

Example: "session_123"
rolestring(MessageRole)required

Role of the message sender

Enum"user""assistant"
Example: "user"
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

createdAtstring(date-time)(Createdat)required

When the message was created

Example: "2024-01-15T10:30:00Z"
processing_statusstring(Processing Status)

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

Default "queued"
Example: "queued"
Response
application/json
{ "content": "Can you help me plan the Q4 product roadmap?", "createdAt": "2024-01-15T10:30:00Z", "objectId": "msg_abc123", "processing_status": "queued", "role": "user", "sessionId": "session_123" }

Memory

Operations

User

Operations

Feedback

Operations

Sync

Operations

Schema Management

Operations

Messages

Operations

Document

Operations

GraphQL

Operations