JavaScript
const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: JSON.stringify({ memories: [{content: 'John prefers dark mode', isStatic: false, metadata: {}}], 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>" } ] }
Create memories directly, bypassing the document ingestion workflow. Generates embeddings and makes them immediately searchable.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Array of memories to create
1 - 100
Show child attributes
The space / container tag these memories belong to.
"user_123"
Memories created successfully
Response after creating memories
ID of the source document created
Was this page helpful?