API for managing personal memory items with authentication and user-specific data.
API for managing personal memory items with authentication and user-specific data.
This API supports three authentication methods:
X-API-Key headerX-API-Key: <your-api-key>X-Session-Token headerX-Session-Token: <your-session-token>Authorization headerAuthorization: Bearer <token>All endpoints require one of these authentication methods.
Max Tier 0 items (goals/OKRs/use-cases)
Optional workspace id to scope tiers
Optional workspace id to scope tiers
Optional workspace id to scope tiers
Optional internal user ID to filter tiers 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.
Optional internal user ID to filter tiers 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.
Optional internal user ID to filter tiers 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.
Optional external user ID to filter tiers by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional external user ID to filter tiers by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional external user ID to filter tiers by a specific external user. If both user_id and external_user_id are provided, user_id takes precedence.
Optional organization ID for multi-tenant scoping. When provided, tiers are scoped to memories within this organization.
Optional organization ID for multi-tenant scoping. When provided, tiers are scoped to memories within this organization.
Optional organization ID for multi-tenant scoping. When provided, tiers are scoped to memories within this organization.
Optional namespace ID for multi-tenant scoping. When provided, tiers are scoped to memories within this namespace.
Optional namespace ID for multi-tenant scoping. When provided, tiers are scoped to memories within this namespace.
Optional namespace ID for multi-tenant scoping. When provided, tiers are scoped to memories within this namespace.
Include embeddings in the response. Format controlled by embedding_format parameter.
Embedding format: 'int8' (quantized, 4x smaller, default for efficiency), 'float32' (full precision, recommended for CoreML/ANE fp16 models). Only applies to Tier1; Tier0 always uses float32 when embeddings are included.
Embedding model hint: 'sbert' or 'bigbird' or 'Qwen4B'
curl -i -X POST \
http://memory.papr.ai/v1/sync/tiers \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"embed_limit": 200,
"embed_model": "sbert",
"external_user_id": "external_user_abc",
"include_embeddings": false,
"max_tier0": 300,
"max_tier1": 1000,
"user_id": "internal_user_123",
"workspace_id": "workspace_123"
}'Tier assignments returned
Tier 0 items (goals/OKRs/use-cases)
Tier 1 items (hot memories)
Cursor for pagination
Cursor for pagination
Cursor for pagination
Error message if failed
Error message if failed
Error message if failed
{ "code": 200, "has_more": false, "status": "success", "tier0": [ { … } ], "tier1": [ { … } ], "transitions": [] }
curl -i -X GET \
'http://memory.papr.ai/v1/sync/delta?cursor=string&include_embeddings=false&limit=200&workspace_id=string' \
-H 'X-API-Key: YOUR_API_KEY_HERE'{}
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:
status to "active" to immediately activate the schema, or "draft" to save as draft (default)enum_values to restrict property values to a predefined list (max 15 values)Schema Limits (optimized for LLM performance):
Property Types & Validation:
string: Text values with optional enum_values, min_length, max_length, patterninteger: Whole numbers with optional min_value, max_valuefloat: Decimal numbers with optional min_value, max_valueboolean: True/false valuesdatetime: ISO 8601 timestamp stringsarray: Lists of valuesobject: Complex nested objectsEnum Values:
enum_values to any string property to restrict values to a predefined listdefault to set a default enum value"enum_values": ["small", "medium", "large"]When to Use Enums:
When to Avoid Enums:
Unique Identifiers & Entity Resolution:
unique_identifiers are used for entity deduplication and mergingLLM-Friendly Descriptions:
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerRequired Headers:
Schema scopes available through the API
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": "string",
"namespace": "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"
}'{ "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 }