Skip to main content
POST
/
v4
/
memories
Create memories directly
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    memories: [
      {
        content: 'John prefers dark mode',
        isStatic: false,
        metadata: {},
        forgetAfter: '2026-06-01T00:00:00Z',
        forgetReason: 'temporary project deadline',
        temporalContext: {documentDate: '<string>', eventDate: ['<string>']}
      }
    ],
    containerTag: 'user_123'
  })
};

fetch('https://api.supermemory.ai/v4/memories', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "documentId": "<string>",
  "memories": [
    {
      "id": "<string>",
      "memory": "<string>",
      "isStatic": true,
      "createdAt": "<string>",
      "forgetAfter": "<string>",
      "forgetReason": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
memories
object[]
required

Array of memories to create

Required array length: 1 - 100 elements
containerTag
string
required

The space / container tag these memories belong to.

Maximum string length: 100
Pattern: ^[a-zA-Z0-9_:-]+$
Example:

"user_123"

Response

Memories created successfully

Response after creating memories

documentId
string | null
required

ID of the source document created

memories
object[]
required