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.
Retrieve feedback by ID.
This endpoint allows developers to fetch feedback details by feedback ID. Only the user who created the feedback or users with appropriate permissions can access it.
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headerRequired Headers:
curl -i -X GET \
'http://memory.papr.ai/v1/feedback/{feedback_id}' \
-H 'X-API-Key: YOUR_API_KEY_HERE'{ "code": 200, "status": "success", "feedback_id": "fb_123456789", "message": "Feedback retrieved successfully", "details": { "feedback_type": "thumbs_up", "feedback_score": 1, "feedback_text": "This was helpful!", "search_id": "search_123", "created_at": "2024-01-17T17:30:45.123456Z" } }
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:
Organization ID this schema belongs to. Accepts legacy 'organization' alias.
Organization ID this schema belongs to. Accepts legacy 'organization' alias.
Organization ID this schema belongs to. Accepts legacy 'organization' alias.
Namespace ID this schema belongs to. Accepts legacy 'namespace' alias.
Namespace ID this schema belongs to. Accepts legacy 'namespace' alias.
Namespace ID this schema belongs to. Accepts legacy 'namespace' alias.
Default memory policy for memories using this schema. Includes mode ('auto', 'manual'), node_constraints (applied in auto mode when present), and OMO safety settings (consent, risk). Memory-level policies override schema-level.
Default memory policy for memories using this schema. Includes mode ('auto', 'manual'), node_constraints (applied in auto mode when present), and OMO safety settings (consent, risk). Memory-level policies override schema-level.
Schema scopes available through the API
DEPRECATED: Use 'organization_id' instead. Accepts Parse pointer or objectId.
DEPRECATED: Use 'organization_id' instead. Accepts Parse pointer or objectId.
DEPRECATED: Use 'organization_id' instead. Accepts Parse pointer or objectId.
DEPRECATED: Use 'namespace_id' instead. Accepts Parse pointer or objectId.
DEPRECATED: Use 'namespace_id' instead. Accepts Parse pointer or objectId.
DEPRECATED: Use 'namespace_id' instead. Accepts Parse pointer or objectId.
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",
"namespace_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"
],
"constraint": {
"name": "Schema Level - Task with Multiple Match Strategies",
"summary": "Define unique identifiers for Task nodes (node_type implicit at schema level)",
"value": {
"create": "auto",
"search": {
"properties": [
{
"name": "id",
"mode": "exact"
},
{
"name": "title",
"mode": "semantic",
"threshold": 0.85
}
]
}
}
},
"resolution_policy": "upsert",
"link_only": false,
"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"
],
"constraint": {
"name": "Schema Level - Task with Multiple Match Strategies",
"summary": "Define unique identifiers for Task nodes (node_type implicit at schema level)",
"value": {
"create": "auto",
"search": {
"properties": [
{
"name": "id",
"mode": "exact"
},
{
"name": "title",
"mode": "semantic",
"threshold": 0.85
}
]
}
}
},
"resolution_policy": "upsert",
"link_only": false,
"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",
"constraint": {
"name": "Schema Level - Controlled Vocabulary Edge",
"summary": "Link to existing targets only, don'\''t create new (edge_type implicit)",
"value": {
"create": "never",
"search": {
"properties": [
{
"name": "name",
"mode": "semantic",
"threshold": 0.9
}
]
}
}
},
"resolution_policy": "upsert",
"link_only": false,
"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",
"constraint": {
"name": "Schema Level - Controlled Vocabulary Edge",
"summary": "Link to existing targets only, don'\''t create new (edge_type implicit)",
"value": {
"create": "never",
"search": {
"properties": [
{
"name": "name",
"mode": "semantic",
"threshold": 0.9
}
]
}
}
},
"resolution_policy": "upsert",
"link_only": false,
"color": "#e74c3c"
}
},
"memory_policy": {},
"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_id": "string", "namespace_id": "string", "organization": "string", "namespace": "string", "node_types": { … }, "relationship_types": { … }, "memory_policy": {}, "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 }
List all schemas accessible to the authenticated user.
Returns schemas that the user owns or has read access to, including:
Authentication Required: One of the following authentication methods must be used:
Authorization headerX-API-Key headerX-Session-Token headercurl -i -X GET \
'http://memory.papr.ai/v1/schemas?status_filter=string&workspace_id=string' \
-H 'X-API-Key: YOUR_API_KEY_HERE'{ "success": true, "data": [ { … } ], "code": 200, "total": 1 }