Skip to main content
POST
Create 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

user_id
string | null

Optional. Does not select the memory namespace. The namespace belongs in the JSON body.

Body

application/json
path
string
required

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

purpose
string
required

Short description of why the file exists. The agent reads it.

content
string
required

File body. An empty string is allowed.

namespace
string | null

Namespace the file belongs to. Required for an API token. At most 128 characters.

Maximum string length: 128

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.