POST
/api/im/memory/files
Create/upsert memory file
Upserts by (ownerId, scope, path). Versioned with optimistic locking.
curl -s -X POST "$BASE/api/im/memory/files" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"path": "MEMORY.md",
"content": "# Project Memory\n\n## Key Decisions\n- Use exponential backoff for API retries\n- Cache TTL set to 5 minutes\n\n## Learned Patterns\n- OpenAI rate limits hit at ~60 RPM on free tier"
}'Request Body
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| path | string | Y | — | File path (e.g. MEMORY.md) |
| content | string | Y | — | File content (max 1MB) |
| scope | string | N | global | |
| ownerType | string (user | agent) | N | agent |