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 bearer token in the Authorization header
    Authorization: Bearer <token>

All endpoints require one of these authentication methods.

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

v1

Operations

Search V1

Request

Search through memories with authentication required.

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

Recommended Headers:

Accept-Encoding: gzip

The API supports response compression for improved performance. Responses larger than 1KB will be automatically compressed when this header is present.

HIGHLY RECOMMENDED SETTINGS FOR BEST RESULTS:

  • Set enable_agentic_graph: true for intelligent, context-aware search that can understand ambiguous references
  • Use max_memories: 15-20 for comprehensive memory coverage
  • Use max_nodes: 10-15 for comprehensive graph entity relationships

Agentic Graph Benefits: When enabled, the system can understand vague references by first identifying specific entities from your memory graph, then performing targeted searches. For example:

  • "customer feedback" → identifies your customers first, then finds their specific feedback
  • "project issues" → identifies your projects first, then finds related issues
  • "team meeting notes" → identifies your team members first, then finds meeting notes

User Resolution Precedence:

  • If both user_id and external_user_id are provided, user_id takes precedence.
  • If only external_user_id is provided, it will be resolved to the internal user.
  • If neither is provided, the authenticated user is used.
Query
max_memoriesinteger(Max Memories)[ 10 .. 50 ]

HIGHLY RECOMMENDED: Maximum number of memories to return. Use at least 15-20 for comprehensive results. Lower values (5-10) may miss relevant information. Default is 20 for optimal coverage.

Default 20
max_nodesinteger(Max Nodes)[ 10 .. 50 ]

HIGHLY RECOMMENDED: Maximum number of neo nodes to return. Use at least 10-15 for comprehensive graph results. Lower values may miss important entity relationships. Default is 15 for optimal coverage.

Default 15
Headers
Accept-Encodingstring

Recommended to use 'gzip' for response compression

Default gzip
Bodyapplication/jsonrequired
querystring(Query)required

Detailed search query describing what you're looking for. For best results, write 2-3 sentences that include specific details, context, and time frame. Examples: 'Find recurring customer complaints about API performance from the last month. Focus on issues where customers specifically mentioned timeout errors or slow response times in their conversations.' 'What are the main issues and blockers in my current projects? Focus on technical challenges and timeline impacts.' 'Find insights about team collaboration and communication patterns from recent meetings and discussions.'

Example: "Find recurring customer complaints about API performance from the last month. Focus on issues that multiple customers have mentioned and any specific feature requests or workflow improvements they've suggested."
rank_resultsboolean(Rank Results)

Whether to enable additional ranking of search results. Default is false because results are already ranked when using an LLM for search (recommended approach). Only enable this if you're not using an LLM in your search pipeline and need additional result ranking.

Default false
enable_agentic_graphboolean(Enable Agentic Graph)

HIGHLY RECOMMENDED: Enable agentic graph search for intelligent, context-aware results. When enabled, the system can understand ambiguous references by first identifying specific entities from your memory graph, then performing targeted searches. Examples: 'customer feedback' → identifies your customers first, then finds their specific feedback; 'project issues' → identifies your projects first, then finds related issues; 'team meeting notes' → identifies team members first, then finds meeting notes. This provides much more relevant and comprehensive results. Set to false only if you need faster, simpler keyword-based search.

Default false
Example: true
user_idUser Id (string) or User Id (null)(User Id)

Optional internal user ID to filter search results by a specific user. If not provided, results are not filtered by user. If both user_id and external_user_id are provided, user_id takes precedence.

Example: "user123"
Any of:

Optional internal user ID to filter search results by a specific user. If not provided, results are not filtered by user. If both user_id and external_user_id are provided, user_id takes precedence.

string(User Id)

Optional internal user ID to filter search results by a specific user. If not provided, results are not filtered by user. If both user_id and external_user_id are provided, user_id takes precedence.

external_user_idExternal User Id (string) or External User Id (null)(External User Id)

Optional external user ID to filter search results by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.

Example: "external_abc"
Any of:

Optional external user ID to filter search results by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.

string(External User Id)

Optional external user ID to filter search results by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.

metadataMemoryMetadata (object) or null

Optional metadata filter. Any field in MemoryMetadata (including custom fields) can be used for filtering.

Example: {"customMetadata":{"priority":"high"},"location":"US","topics":"API performance"}
Any of:

Optional metadata filter. Any field in MemoryMetadata (including custom fields) can be used for filtering.

curl -i -X POST \
  'https://memory.papr.ai/v1/memory/search?max_memories=20&max_nodes=15' \
  -H 'Accept-Encoding: gzip' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "enable_agentic_graph": true,
    "external_user_id": "external_abc",
    "metadata": {
      "customMetadata": {
        "priority": "high"
      },
      "location": "US",
      "topics": "API performance"
    },
    "query": "Find recurring customer complaints about API performance from the last month. Focus on issues that multiple customers have mentioned and any specific feature requests or workflow improvements they'\''ve suggested.",
    "rank_results": false,
    "user_id": "user123"
  }'

Responses

Successfully retrieved memories

Bodyapplication/json
codeinteger(Code)

HTTP status code

Default 200
Example: 200
statusstring(Status)

'success' or 'error'

Default "success"
Example: "success"
dataSearchResult (object) or null

Search results if successful

Example: {"memories":[],"nodes":[]}
Any of:

Search results if successful

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

search_idSearch Id (string) or Search Id (null)(Search Id)

Unique identifier for this search query, maps to QueryLog objectId in Parse Server

Example: "abc123def456"
Any of:

Unique identifier for this search query, maps to QueryLog objectId in Parse Server

string(Search Id)

Unique identifier for this search query, maps to QueryLog objectId in Parse Server

Response
application/json
{ "code": 200, "data": { "memories": [], "nodes": [] }, "search_id": "abc123def456", "status": "success" }

Create User

Request

Create a new user or link existing user to developer

Headers
X-API-Keystring(X-Api-Key)required
Bodyapplication/jsonrequired
emailEmail (string) or Email (null)(Email)
Example: "user@example.com"
Any of:
string(email)(Email)
external_idstring(External Id)required
Example: "user123"
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"John Doe","preferences":{"theme":"dark"}}
Any of:
typestring(UserType)
Default "developerUser"
Enum"developerUser""user""agent"
Example: "developerUser"
curl -i -X POST \
  https://memory.papr.ai/v1/user \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: string' \
  -d '{
    "email": "user@example.com",
    "external_id": "user123",
    "metadata": {
      "name": "John Doe",
      "preferences": {
        "theme": "dark"
      }
    },
    "type": "developerUser"
  }'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
user_idUser Id (string) or User Id (null)(User Id)
Example: "abc123"
Any of:
string(User Id)
emailEmail (string) or Email (null)(Email)
Example: "user@example.com"
Any of:
string(Email)
external_idExternal Id (string) or External Id (null)(External Id)
Example: "user123"
Any of:
string(External Id)
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"John Doe","preferences":{"theme":"dark"}}
Any of:
created_atCreated At (string) or Created At (null)(Created At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Created At)
updated_atUpdated At (string) or Updated At (null)(Updated At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Updated At)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "code": 200, "created_at": "2024-03-20T10:00:00.000Z", "email": "user@example.com", "external_id": "user123", "metadata": { "name": "John Doe", "preferences": {} }, "status": "success", "updated_at": "2024-03-20T10:00:00.000Z", "user_id": "abc123" }

List Users

Request

List users for a developer

Query
pageinteger(Page)>= 1
Default 1
page_sizeinteger(Page Size)[ 1 .. 100 ]
Default 10
external_idExternal Id (string) or External Id (null)(External Id)
Any of:
string(External Id)
emailEmail (string) or Email (null)(Email)
Any of:
string(Email)
Headers
X-API-Keystring(X-Api-Key)required
curl -i -X GET \
  'https://memory.papr.ai/v1/user?email=string&external_id=string&page=1&page_size=10' \
  -H 'X-API-Key: string'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
dataArray of Data (objects) or Data (null)(Data)
Example: [{"created_at":"2024-03-20T10:00:00.000Z","email":"user1@example.com","external_id":"user123","metadata":{"name":"John Doe","preferences":{"theme":"dark"}},"updated_at":"2024-03-20T10:00:00.000Z","user_id":"abc123"}]
Any of:
totalTotal (integer) or Total (null)(Total)
Example: 1
Any of:
integer(Total)
pagePage (integer) or Page (null)(Page)
Example: 1
Any of:
integer(Page)
page_sizePage Size (integer) or Page Size (null)(Page Size)
Example: 10
Any of:
integer(Page Size)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "code": 200, "data": [ {} ], "page": 1, "page_size": 10, "status": "success", "total": 1 }

Memory

Operations

User

Operations

Feedback

Operations