POST
/
v1
/
memories

Authorizations

Authorization
string
header
required

API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'

Body

application/json
agent_id
string | null

The unique identifier of the agent associated with this memory.

app_id
string | null

The unique identifier of the application associated with this memory.

custom_categories
object | null

A list of categories with category name and it's description.

excludes
string | null

String to exclude the specific preferences in the memory.

Minimum length: 1
includes
string | null

String to include the specific preferences in the memory.

Minimum length: 1
infer
boolean
default:
true

Wether to infer the memories or directly store the messages.

messages
object[]

An array of message objects representing the content of the memory. Each message object typically contains 'role' and 'content' fields, where 'role' indicates the sender (e.g., 'user', 'assistant', 'system') and 'content' contains the actual message text. This structure allows for the representation of conversations or multi-part memories.

metadata
object | null

Additional metadata associated with the memory, which can be used to store any additional information or context about the memory.

org_id
string | null

The unique identifier of the organization associated with this memory.

org_name
string | null

The name of the organization associated with this memory. Will be deprecated soon use org_id instead.

output_format
string | null

It two output formats: v1.0 (default) and v1.1. To enable the latest format, which provides enhanced detail for each memory operation, set the output_format parameter to v1.1. Note that v1.0 will be deprecated in version 0.1.35.

project_id
string | null

The unique identifier of the project associated with this memory.

project_name
string | null

The name of the project associated with this memory. Will be deprecated soon use project_id instead.

run_id
string | null

The unique identifier of the run associated with this memory.

user_id
string | null

The unique identifier of the user associated with this memory.

Response

200 - application/json
data
object
required
event
enum<string>
required
Available options:
ADD,
UPDATE,
DELETE
id
string
required