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 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
{}

Cancel Document Processing

Request

Cancel document processing

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

Responses

Successful Response

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

Create User Schema V1

Request

Create a new user-defined graph schema.

This endpoint allows users to define custom node types and relationships for their knowledge graph. The schema will be validated and stored for use in future memory extractions.

Features:

  • Define custom node types with properties and validation rules
  • Define custom relationship types with constraints
  • Automatic validation against system schemas
  • Support for different scopes (personal, workspace, organization)
  • Enum support: Use enum_values to restrict property values to a predefined list (max 10 values)
  • Auto-indexing: Required properties are automatically indexed in Neo4j for optimal query performance

Property Types & Validation:

  • string: Text values with optional enum_values, min_length, max_length, pattern
  • integer: Whole numbers with optional min_value, max_value
  • float: Decimal numbers with optional min_value, max_value
  • boolean: True/false values
  • datetime: ISO 8601 timestamp strings
  • array: Lists of values
  • object: Complex nested objects

Enum Values:

  • Add enum_values to any string property to restrict values to a predefined list
  • Maximum 10 enum values allowed per property
  • Use with default to set a default enum value
  • Example: "enum_values": ["small", "medium", "large"]

When to Use Enums:

  • Limited, well-defined options (≤10 values): sizes, statuses, categories, priorities
  • Controlled vocabularies: "active/inactive", "high/medium/low", "bronze/silver/gold"
  • When you want exact matching and no variations

When to Avoid Enums:

  • Open-ended text fields: names, titles, descriptions, addresses
  • Large sets of options (>10): countries, cities, product models
  • When you want semantic similarity matching for entity resolution
  • Dynamic or frequently changing value sets

Unique Identifiers & Entity Resolution:

  • Properties marked as unique_identifiers are used for entity deduplication and merging
  • With enum_values: Exact matching is used - entities with the same enum value are considered identical
  • Without enum_values: Semantic similarity matching is used - entities with similar meanings are automatically merged
  • Example: A "name" unique_identifier without enums will merge "Apple Inc" and "Apple Inc." as the same entity
  • Example: A "sku" unique_identifier with enums will only merge entities with exactly matching SKU codes
  • Use enums for unique_identifiers when you have a limited, predefined set of values (≤10 options)
  • Avoid enums for unique_identifiers when you have broad, open-ended values or >10 possible options
  • Best practices: Use enums for controlled vocabularies (status codes, categories), avoid for open text (company names, product titles)
  • In the example above: "name" uses semantic similarity (open-ended), "sku" uses exact matching (controlled set)

LLM-Friendly Descriptions:

  • Write detailed property descriptions that guide the LLM on expected formats and usage
  • Include examples of typical values (e.g., "Product name, typically 2-4 words like 'iPhone 15 Pro'")
  • Specify data formats and constraints clearly (e.g., "Price in USD as decimal number")
  • For enums, explain when to use each option (e.g., "use 'new' for brand new items")

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')
Bodyapplication/jsonrequired
idstring(Id)
namestring(Name)[ 1 .. 100 ] charactersrequired
descriptionDescription (string) or Description (null)(Description)
Any of:
<= 500 characters
string(Description)<= 500 characters
versionstring(Version)^\d+\.\d+\.\d+$
Default "1.0.0"
user_idUser Id (string) or User Id (object) or User Id (null)(User Id)
Any of:
string(User Id)
workspace_idWorkspace Id (string) or Workspace Id (object) or Workspace Id (null)(Workspace Id)
Any of:
string(Workspace Id)
organization_idOrganization Id (string) or Organization Id (null)(Organization Id)
Any of:
string(Organization Id)
node_typesobject(Node Types)

Custom node types (max 15 per schema)

relationship_typesobject(Relationship Types)

Custom relationship types (max 20 per schema)

statusstring(SchemaStatus)
Default "draft"
Enum"draft""active""deprecated""archived"
scopestring(SchemaScope)
Default "workspace"
Enum"personal""workspace""organization"
created_atstring(date-time)(Created At)
updated_atUpdated At (string) or Updated At (null)(Updated At)
Any of:
string(date-time)(Updated At)
read_accessArray of strings(Read Access)
write_accessArray of strings(Write Access)
usage_countinteger(Usage Count)
Default 0
last_used_atLast Used At (string) or Last Used At (null)(Last Used At)
Any of:
string(date-time)(Last Used At)
curl -i -X POST \
  http://memory.papr.ai/v1/schemas \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "id": "string",
    "name": "string",
    "description": "string",
    "version": "1.0.0",
    "user_id": "string",
    "workspace_id": "string",
    "organization_id": "string",
    "node_types": {
      "property1": {
        "name": "string",
        "label": "string",
        "description": "string",
        "properties": {
          "property1": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          },
          "property2": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          }
        },
        "required_properties": [
          "string"
        ],
        "unique_identifiers": [
          "string"
        ],
        "color": "#3498db",
        "icon": "string"
      },
      "property2": {
        "name": "string",
        "label": "string",
        "description": "string",
        "properties": {
          "property1": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          },
          "property2": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          }
        },
        "required_properties": [
          "string"
        ],
        "unique_identifiers": [
          "string"
        ],
        "color": "#3498db",
        "icon": "string"
      }
    },
    "relationship_types": {
      "property1": {
        "name": "string",
        "label": "string",
        "description": "string",
        "properties": {
          "property1": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          },
          "property2": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          }
        },
        "allowed_source_types": [
          "string"
        ],
        "allowed_target_types": [
          "string"
        ],
        "cardinality": "one-to-one",
        "color": "#e74c3c"
      },
      "property2": {
        "name": "string",
        "label": "string",
        "description": "string",
        "properties": {
          "property1": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          },
          "property2": {
            "type": "string",
            "required": false,
            "default": {},
            "description": "string",
            "min_length": 0,
            "max_length": 0,
            "min_value": 0,
            "max_value": 0,
            "enum_values": [
              "string"
            ],
            "pattern": "string"
          }
        },
        "allowed_source_types": [
          "string"
        ],
        "allowed_target_types": [
          "string"
        ],
        "cardinality": "one-to-one",
        "color": "#e74c3c"
      }
    },
    "status": "draft",
    "scope": "personal",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "read_access": [
      "string"
    ],
    "write_access": [
      "string"
    ],
    "usage_count": 0,
    "last_used_at": "2019-08-24T14:15:22Z"
  }'

Responses

Successful Response

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_id": "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 }

Memory

Operations

User

Operations

Feedback

Operations

Document

Operations

Schema Management

Operations

GraphQL

Operations