Skip to main content
PUT
Update a memory file

Authorizations

x-cominty-token
string
header
required

A Cominty Platform API secret. A key created now starts with sk-cmt-. Send it as is, or as Bearer sk-cmt-..., with at most one Bearer prefix. A key created before the prefix existed has no sk-cmt- and still works.

Query Parameters

path
string
required

Relative path with at most one folder segment, for example notes/todo.md. a/b/todo.md returns 422.

version
string<date-time>
required

Opaque token from the last read of this file. A stale value returns 409. A malformed value returns 422. Send it back unchanged.

namespace
string | null

Namespace the file belongs to. Required for an API token. Omitting it returns 400 Missing namespace. At most 128 characters.

Maximum string length: 128
user_id
string | null

Optional. Does not select the memory namespace.

Body

application/json
content
string | null

New body. Omit the field to leave the stored body unchanged. Null does not clear it.

purpose
string | null

New purpose. Omit the field to leave the stored purpose unchanged. Null does not clear it.

Response

Successful Response

path
string
required

Path as stored.

purpose
string
required

Why the file exists.

namespace
string
required

Namespace the file belongs to.

created_at
string<date-time>
required

When the file was created.

updated_at
string<date-time>
required

When the file was last updated.

content
string
required

File body. May be empty.

version
string<date-time>
required
read-only

Opaque version identifier; echo back as version when updating.