Skip to main content
POST
cURL
Extract and store memories from a conversation using the V3 additive pipeline. The endpoint uses single-pass ADD-only extraction: one LLM call, no UPDATE/DELETE. Memories accumulate over time; nothing is overwritten.

Endpoint

  • Method: POST
  • URL: /v3/memories/add/
  • Content-Type: application/json
Processing is asynchronous. The response returns an event_id you can poll via GET /v1/event/{event_id}/.

Required headers

HeaderRequiredDescription
Authorization: Token <MEM0_API_KEY>YesAPI key scoped to your workspace.
Accept: application/jsonYesEnsures a JSON response.

Request body

Provide conversation messages for Mem0 to extract memories from. At least one entity ID (user_id, agent_id, app_id, or run_id) is required so the memory is scoped to a session. Entity IDs are accepted at the top level.

Common fields

FieldTypeRequiredDescription
messagesarrayYesConversation turns for Mem0 to extract memories from. Each object should include role and content.
user_idstringNo*Associates the memory with a user.
agent_idstringNo*Associates the memory with an agent.
run_idstringNo*Associates the memory with a run.
app_idstringNo*Associates the memory with an app.
metadataobjectOptionalCustom key/value metadata (e.g., {"topic": "preferences"}).
inferboolean (default true)OptionalSet to false to skip inference and store the provided text as-is.
expiration_datestringOptionalDate in YYYY-MM-DD format. The memory is visible through this date and hidden by default after it passes.
* At least one entity ID (user_id, agent_id, app_id, or run_id) is required.
Need more details? See all request parameters below for complete field descriptions, types, and constraints.

Response

The request is queued for background processing. The response contains an event_id for tracking status.
Poll the event status via GET /v1/event/{event_id}/. Status will be SUCCEEDED or FAILED once processing completes.
Memories with expiration_date remain stored after they expire. Search and get-all hide them by default; pass show_expired: true to include them.
Python uses expiration_date; TypeScript uses expirationDate.

Body

application/json
messages
object[]
required

Conversation messages to extract memories from.

user_id
string

Scope memories to this user.

agent_id
string

Scope memories to this agent.

run_id
string

Scope memories to this session / run.

metadata
object

User-supplied metadata to attach to each extracted memory.

expiration_date
string<date> | null

Optional expiration date in YYYY-MM-DD format. After this date, memories are hidden from search and get-all unless show_expired is true.

custom_instructions
string

Project-level instructions that guide extraction for this call.

custom_categories
object[]

Category catalog for this call. Replaces the project-level list rather than merging with it. Omit to fall back to the project list, then the default catalog.

infer
boolean
default:true

When false, stores each message verbatim without running the extraction LLM.

Response

Memory addition queued; returns an event identifier clients can poll via GET /v1/event/{event_id}/.

message
string
status
enum<string>
Available options:
PENDING,
SUCCEEDED,
FAILED
event_id
string<uuid>