Request Templates
Canonical request shapes for reliable integrations.
Prerequisites
- Papr API key configured in your client runtime
- Endpoint-level access for memory, messages, and document APIs
- Tenant identifiers (
organization_id,namespace_id) for multi-tenant workloads
Minimal Setup
- Start from one template on this page.
- Replace placeholders with your app IDs and metadata.
- Validate payloads against API reference schemas before production rollout.
Add Memory (Current)
{
"content": "memory text",
"type": "text",
"external_user_id": "user_123",
"organization_id": "org_demo",
"namespace_id": "ns_prod",
"metadata": {
"role": "assistant",
"category": "learning",
"topics": ["topic_a", "topic_b"]
},
"memory_policy": {
"mode": "auto",
"consent": "implicit",
"risk": "none",
"acl": {
"read": ["external_user:user_123"],
"write": ["external_user:user_123"]
}
}
}Add Memory in Manual Graph Mode
{
"content": "structured ingest event",
"external_user_id": "ops_admin",
"memory_policy": {
"mode": "manual",
"nodes": [
{
"id": "acct_1",
"type": "Account",
"properties": {"name": "Acme Corp"}
},
{
"id": "opp_1",
"type": "Opportunity",
"properties": {"stage": "proposal"}
}
],
"relationships": [
{
"source": "acct_1",
"target": "opp_1",
"type": "HAS_OPPORTUNITY"
}
]
}
}Search Memory (Recommended Baseline)
{
"query": "What does this user prefer for notifications?",
"external_user_id": "user_123",
"organization_id": "org_demo",
"enable_agentic_graph": true
}Query params:
max_memories=20max_nodes=15response_format=toonfor LLM-bound output
Store Message
{
"sessionId": "session_123",
"role": "user",
"content": "I want weekly summaries by email.",
"external_user_id": "user_123",
"process_messages": true
}Document Upload (Form Fields)
Use multipart form:
fileexternal_user_id- optional:
organization_id,namespace_id,memory_policy
Notes
- Prefer
external_user_idover internaluser_id. - Prefer
memory_policyover deprecated graph fields. - Keep tenant scope fields explicit in multi-tenant apps.
Validation Checklist
- Required fields are present for each endpoint
- Deprecated fields are not present in request payloads
- Tenant and user scope fields are explicit where needed
Troubleshooting
If a template fails validation, use Error Playbook and Deprecations and Migrations.