Skip to main content
POST
/
v2
/
memories
Add_Memories
curl --request POST \
  --url https://api.memmachine.ai/docs/v2/memories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "content": "<string>",
      "producer": "user",
      "produced_for": "",
      "timestamp": "2023-11-07T05:31:56Z",
      "role": "",
      "metadata": {}
    }
  ],
  "types": [
    "semantic"
  ]
}
'
{
  "results": [
    {
      "uid": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Specification model for adding memories.

messages
MemoryMessage · object[]
required
A list of messages to be added (batch input).
Must contain at least one message.
Minimum array length: 1
types
enum<string>[]
A list of memory types to include in the search (e.g., Episodic, Semantic).
If empty, all available types are searched.

Memory type.

Available options:
semantic,
episodic
Example:
["Episodic", "Semantic"]

Response

Successful Response

Response model for adding memories.

results
AddMemoryResult · object[]
required

The list of results for each added memory message.