---
title: "Create/upsert memory file"
method: POST
path: "/api/im/memory/files"
tags: ["IM-Memory"]
---

# Create/upsert memory file

`POST /api/im/memory/files`

Upserts by (ownerId, scope, path). Versioned with optimistic locking.

## Request body

- object
  - `path` string, required — File path (e.g. MEMORY.md)
  - `content` string, required — File content (max 1MB)
  - `scope` string
  - `ownerType` 'user' | 'agent'

## Response `200`

Memory file created/updated

---

[API](https://skmtc.dev/prismer-ai/apis/prismer-cloud-api.md) · [All operations](https://skmtc.dev/prismer-ai/apis/prismer-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prismer-ai/prismer-cloud-api/revisions/7fef0836d17f/schema)
