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
Papr Memory API
https://platform.papr.ai/_mock/apis/
Production server
https://memory.papr.ai/

v1

Operations

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:
object(Metadata)
typestring(UserType)
Default "developerUser"
Enum"developerUser""user""agent"
Example: "developerUser"
curl -i -X POST \
  https://platform.papr.ai/_mock/apis/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:
object(Metadata)
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://platform.papr.ai/_mock/apis/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 }

Get User

Request

Get user details by user_id (_User.objectId) and developer association

Path
user_idstring(User Id)required
Headers
x-api-keystring(X-Api-Key)required
curl -i -X GET \
  'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
  -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"
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:
object(Metadata)
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" }

Update User

Request

Update user details by user_id (_User.objectId) and developer association

Path
user_idstring(User Id)required
Headers
x-api-keystring(X-Api-Key)required
Bodyapplication/jsonrequired
emailEmail (string) or Email (null)(Email)
Example: "updated.user@example.com"
Any of:
string(Email)
external_idExternal Id (string) or External Id (null)(External Id)
Example: "updated_user_123"
Any of:
string(External Id)
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"Updated User","preferences":{"theme":"light"}}
Any of:
object(Metadata)
typeUserType (string) or null
Example: "developerUser"
Any of:
string(UserType)
Enum"developerUser""user""agent"
curl -i -X PUT \
  'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: string' \
  -d '{
    "email": "updated.user@example.com",
    "external_id": "updated_user_123",
    "metadata": {
      "name": "Updated User",
      "preferences": {
        "theme": "light"
      }
    },
    "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:
object(Metadata)
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" }

Delete User

Request

Delete user association with developer and the user itself by user_id (_User.objectId)

Path
user_idstring(User Id)required
Headers
x-api-keystring(X-Api-Key)required
curl -i -X DELETE \
  'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
  -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"
user_idUser Id (string) or User Id (null)(User Id)

ID of the user attempted to delete

Example: "abc123"
Any of:

ID of the user attempted to delete

string(User Id)

ID of the user attempted to delete

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

Success or error message

Example: "User and association deleted successfully"
Any of:

Success or error message

string(Message)

Success or error 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

Response
application/json
{ "code": 200, "message": "User and association deleted successfully", "status": "success", "user_id": "abc123" }

Add Memory V1

Request

Add a new memory item to the system with size validation and background processing.

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')

The API validates content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).

Query
skip_background_processingboolean(Skip Background Processing)

If True, skips adding background tasks for processing

Default false
Bodyapplication/jsonrequired
contentstring(Content)required

The content of the memory item you want to add to memory

Example: "Meeting notes from the product planning session"
typestring(MemoryType)

Content type of the memory item

Default "text"
Enum"text""code_snippet""document"
Example: "text"
metadataMemoryMetadata (object) or null

Metadata used in Neo4J and Pinecone for a memory item

Example: {"conversationId":"conv-123","createdAt":"2024-03-21T10:00:00Z","emoji tags":"📊,💡,📝","emotion tags":"focused, productive","hierarchical structures":"Business/Planning/Product","location":"Conference Room A","sourceUrl":"https://meeting-notes.example.com/123","topics":"product, planning"}
Any of:

Metadata used in Neo4J and Pinecone for a memory item

contextArray of Context (objects) or Context (null)(Context)

Context can be conversation history or any relevant context for a memory item

Example: [{"content":"Let's discuss the Q2 product roadmap","role":"user"},{"content":"I'll help you plan the roadmap. What are your key objectives?","role":"assistant"}]
Any of:

Context can be conversation history or any relevant context for a memory item

relationships_jsonArray of Relationships Json (objects) or Relationships Json (null)(Relationships Json)

Array of relationships that we can use in Graph DB (neo4J)

Example: [{"metadata":{"relevance":"high"},"related_item_id":"previous_memory_item_id","related_item_type":"TextMemoryItem","relation_type":"follows"}]
Any of:

Array of relationships that we can use in Graph DB (neo4J)

curl -i -X POST \
  'https://platform.papr.ai/_mock/apis/v1/memory?skip_background_processing=false' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "content": "Meeting notes from the product planning session",
    "context": [
      {
        "content": "Let'\''s discuss the Q2 product roadmap",
        "role": "user"
      },
      {
        "content": "I'\''ll help you plan the roadmap. What are your key objectives?",
        "role": "assistant"
      }
    ],
    "imageGenerationCategory": "business_management",
    "metadata": {
      "conversationId": "conv-123",
      "createdAt": "2024-03-21T10:00:00Z",
      "emoji tags": "📊,💡,📝",
      "emotion tags": "focused, productive",
      "hierarchical structures": "Business/Planning/Product",
      "location": "Conference Room A",
      "sourceUrl": "https://meeting-notes.example.com/123",
      "topics": "product, planning"
    },
    "relationships_json": [
      {
        "metadata": {
          "relevance": "high"
        },
        "related_item_id": "previous_memory_item_id",
        "related_item_type": "TextMemoryItem",
        "relation_type": "follows"
      }
    ],
    "type": "text"
  }'

Responses

Memory successfully added

Bodyapplication/json
codeinteger(Code)

HTTP status code

Default 200
statusstring(Status)

'success' or 'error'

Default "success"
dataArray of Data (objects) or Data (null)(Data)

List of memory items if successful

Any of:

List of memory items 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

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

Update Memory V1

Request

Update an existing memory item by ID.

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')

The API validates content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).

Path
memory_idstring(Memory Id)required
Bodyapplication/jsonrequired
contentContent (string) or Content (null)(Content)

The new content of the memory item

Example: "Updated meeting notes from the product planning session"
Any of:

The new content of the memory item

string(Content)

The new content of the memory item

typeMemoryType (string) or null

Content type of the memory item

Example: "text"
Any of:

Content type of the memory item

string(MemoryType)

Content type of the memory item

Enum"text""code_snippet""document"
metadataMemoryMetadata (object) or null

Updated metadata for Neo4J and Pinecone

Example: {"emoji tags":"📊,💡,📝,✨","emotion tags":"focused, productive, satisfied","hierarchical structures":"Business/Planning/Product/Updates","topics":"product, planning, updates"}
Any of:

Updated metadata for Neo4J and Pinecone

contextArray of Context (objects) or Context (null)(Context)

Updated context for the memory item

Example: [{"content":"Let's update the Q2 product roadmap","role":"user"},{"content":"I'll help you update the roadmap. What changes would you like to make?","role":"assistant"}]
Any of:

Updated context for the memory item

relationships_jsonArray of Relationships Json (objects) or Relationships Json (null)(Relationships Json)

Updated relationships for Graph DB (neo4J)

Example: [{"metadata":{"relevance":"high"},"related_item_id":"previous_memory_item_id","related_item_type":"TextMemoryItem","relation_type":"updates"}]
Any of:

Updated relationships for Graph DB (neo4J)

curl -i -X PUT \
  'https://platform.papr.ai/_mock/apis/v1/memory/{memory_id}' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "content": "Updated meeting notes from the product planning session",
    "context": [
      {
        "content": "Let'\''s update the Q2 product roadmap",
        "role": "user"
      },
      {
        "content": "I'\''ll help you update the roadmap. What changes would you like to make?",
        "role": "assistant"
      }
    ],
    "metadata": {
      "emoji tags": "📊,💡,📝,✨",
      "emotion tags": "focused, productive, satisfied",
      "hierarchical structures": "Business/Planning/Product/Updates",
      "topics": "product, planning, updates"
    },
    "relationships_json": [
      {
        "metadata": {
          "relevance": "high"
        },
        "related_item_id": "previous_memory_item_id",
        "related_item_type": "TextMemoryItem",
        "relation_type": "updates"
      }
    ],
    "type": "text"
  }'

Responses

Memory successfully updated

Bodyapplication/json
codeinteger(Code)

HTTP status code

Default 200
statusstring(Status)

'success' or 'error'

Default "success"
memory_itemsArray of Memory Items (objects) or Memory Items (null)(Memory Items)

List of updated memory items if successful

Any of:

List of updated memory items 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

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

Status message

Any of:

Status message

string(Message)

Status message

status_objSystemUpdateStatus (object) or null

System update status (pinecone, neo4j, parse)

Any of:

System update status (pinecone, neo4j, parse)

Response
application/json
{ "code": 200, "status": "success", "memory_items": [ {} ], "error": "string", "details": {}, "message": "string", "status_obj": { "pinecone": false, "neo4j": false, "parse": false } }

Delete Memory V1

Request

Delete a memory item by ID.

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
memory_idstring(Memory Id)required
Query
skip_parseboolean(Skip Parse)

Skip Parse Server deletion

Default false
curl -i -X DELETE \
  'https://platform.papr.ai/_mock/apis/v1/memory/{memory_id}?skip_parse=false' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Memory successfully deleted

Bodyapplication/json
codeinteger(Code)

HTTP status code

Default 200
statusstring(Status)

'success' or 'error'

Default "success"
messageMessage (string) or Message (null)(Message)
Any of:
string(Message)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
memoryIdstring(Memoryid)
Default ""
objectIdstring(Objectid)
Default ""
deletion_statusDeletionStatus (object) or null
Any of:
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "code": 200, "status": "success", "message": "string", "error": "string", "memoryId": "", "objectId": "", "deletion_status": { "pinecone": false, "neo4j": false, "parse": false }, "details": {} }

Get Memory V1

Request

Retrieve a memory item by ID.

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
memory_idstring(Memory Id)required
curl -i -X GET \
  'https://platform.papr.ai/_mock/apis/v1/memory/{memory_id}' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

Responses

Memory successfully retrieved

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

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

Add Memory Batch V1

Request

Add multiple memory items in a batch with size validation and background processing.

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')

The API validates individual memory content size against MAX_CONTENT_LENGTH environment variable (defaults to 15000 bytes).

Query
skip_background_processingboolean(Skip Background Processing)

If True, skips adding background tasks for processing

Default false
Bodyapplication/jsonrequired
memoriesArray of objects(Memories)[ 1 .. 50 ] itemsrequired

List of memory items to add in batch

Example: [{"content":"Meeting notes from the product planning session","metadata":{"createdAt":"2024-03-21T10:00:00Z","emoji tags":"📊,💡,📝","emotion tags":"focused, productive","hierarchical structures":"Business/Planning/Product","topics":"product, planning"},"type":"text"},{"content":"Follow-up tasks from the planning meeting","metadata":{"createdAt":"2024-03-21T11:00:00Z","emoji tags":"✅,📋","emotion tags":"organized","hierarchical structures":"Business/Tasks/Planning","topics":"tasks, planning"},"type":"text"}]
memories[].​contentstring(Content)required

The content of the memory item you want to add to memory

Example: "Meeting notes from the product planning session"
memories[].​typestring(MemoryType)

Content type of the memory item

Default "text"
Enum"text""code_snippet""document"
Example: "text"
memories[].​metadataMemoryMetadata (object) or null

Metadata used in Neo4J and Pinecone for a memory item

Example: {"conversationId":"conv-123","createdAt":"2024-03-21T10:00:00Z","emoji tags":"📊,💡,📝","emotion tags":"focused, productive","hierarchical structures":"Business/Planning/Product","location":"Conference Room A","sourceUrl":"https://meeting-notes.example.com/123","topics":"product, planning"}
Any of:

Metadata used in Neo4J and Pinecone for a memory item

memories[].​contextArray of Context (objects) or Context (null)(Context)

Context can be conversation history or any relevant context for a memory item

Example: [{"content":"Let's discuss the Q2 product roadmap","role":"user"},{"content":"I'll help you plan the roadmap. What are your key objectives?","role":"assistant"}]
Any of:

Context can be conversation history or any relevant context for a memory item

memories[].​relationships_jsonArray of Relationships Json (objects) or Relationships Json (null)(Relationships Json)

Array of relationships that we can use in Graph DB (neo4J)

Example: [{"metadata":{"relevance":"high"},"related_item_id":"previous_memory_item_id","related_item_type":"TextMemoryItem","relation_type":"follows"}]
Any of:

Array of relationships that we can use in Graph DB (neo4J)

batch_sizeBatch Size (integer) or Batch Size (null)(Batch Size)

Number of items to process in parallel

Default 10
Example: 10
Any of:

Number of items to process in parallel

[ 1 .. 50 ]
integer(Batch Size)[ 1 .. 50 ]

Number of items to process in parallel

Default 10
curl -i -X POST \
  'https://platform.papr.ai/_mock/apis/v1/memory/batch?skip_background_processing=false' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "batch_size": 10,
    "memories": [
      {
        "content": "Meeting notes from the product planning session",
        "metadata": {
          "createdAt": "2024-03-21T10:00:00Z",
          "emoji tags": "📊,💡,📝",
          "emotion tags": "focused, productive",
          "hierarchical structures": "Business/Planning/Product",
          "topics": "product, planning"
        },
        "type": "text"
      },
      {
        "content": "Follow-up tasks from the planning meeting",
        "metadata": {
          "createdAt": "2024-03-21T11:00:00Z",
          "emoji tags": "✅,📋",
          "emotion tags": "organized",
          "hierarchical structures": "Business/Tasks/Planning",
          "topics": "tasks, planning"
        },
        "type": "text"
      }
    ]
  }'

Responses

Memories successfully added

Bodyapplication/json
codeinteger(Code)

HTTP status code for the batch operation

Default 200
statusstring(Status)

'success', 'partial', or 'error'

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)

Batch-level error message, if any

Any of:

Batch-level error message, if any

string(Error)

Batch-level error message, if any

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

successfulArray of objects(Successful)

List of successful add responses

errorsArray of objects(Errors)

List of errors for failed items

total_processedinteger(Total Processed)
Default 0
total_successfulinteger(Total Successful)
Default 0
total_failedinteger(Total Failed)
Default 0
total_content_sizeinteger(Total Content Size)
Default 0
total_storage_sizeinteger(Total Storage Size)
Default 0
Response
application/json
{ "code": 200, "status": "success", "message": "string", "error": "string", "details": {}, "successful": [ {} ], "errors": [ {} ], "total_processed": 0, "total_successful": 0, "total_failed": 0, "total_content_size": 0, "total_storage_size": 0 }

Upload Document V1

Request

Upload a document (PDF/HTML/TXT) to be processed and added to memory.

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: multipart/form-data
  • X-Client-Type: (e.g., 'papr_plugin', 'browser_extension')

Form Data:

  • file: The document file to upload (PDF/HTML/TXT)
  • metadata: (optional) JSON string containing additional metadata
Query
skip_background_processingboolean(Skip Background Processing)

If True, skips adding background tasks for processing

Default false
post_objectIdPost Objectid (string) or Post Objectid (null)(Post Objectid)

Optional Post objectId for updating status

Any of:

Optional Post objectId for updating status

string(Post Objectid)

Optional Post objectId for updating status

curl -i -X POST \
  'https://platform.papr.ai/_mock/apis/v1/document?post_objectId=string&skip_background_processing=false' \
  -H 'X-API-Key: YOUR_API_KEY_HERE'

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.​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", "status_type": "processing", "error": "string" }, "memory_items": [ {} ], "memories": [ {} ] }

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.

Query
max_memoriesinteger(Max Memories)[ 1 .. 50 ]

Maximum number of memories to return

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

Maximum number of neo nodes to return

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. For example: '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.'

Example: "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."
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
Example: true
user_idUser Id (string) or User Id (null)(User Id)

Optional user ID to filter search results by a specific user. If not provided, results are not filtered by user.

Example: "user123"
Any of:

Optional user ID to filter search results by a specific user. If not provided, results are not filtered by user.

string(User Id)

Optional user ID to filter search results by a specific user. If not provided, results are not filtered by user.

curl -i -X POST \
  'https://platform.papr.ai/_mock/apis/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 '{
    "query": "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.",
    "rank_results": true,
    "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

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

User

Operations