Skip to main content
POST
Creates a note in your organization. If the namespace and key already exist, replaces its value.

Request body

string
required
1 to 255 characters. Agents’ memory.namespace setting has a tighter limit of 127 characters, so use at most 127 for notes an agent should access.
string
required
1 to 1024 characters. Slash paths such as preferences/report-format are useful for grouping notes.
string
required
Note text, at most 65,536 UTF-8 bytes.
integer | null
Minutes after this write before the note expires, from 1 to 2147483647. Omit to use the caller’s current privacy setting; with no retention limit, the note is kept. Pass null to keep it until explicit deletion. Every write restarts the window and chooses the retention again, including an update that omits this field.

Response

201 for a new note, 200 for a replacement. Both return the memory object.

Errors

422 for invalid input. See common errors.