Skip to content
DunSocial Docs

Memories and collections

Save brand memory and search it semantically.

Memory powers AI that knows your voice and facts. Needs Bearer + X-Workspace-Id.

Collections

Collections group memories. Listing lazy-creates default Personal and Workspace collections if needed.

Method Path Body
GET /api/memory/collections
POST /api/memory/collections { name, color?, isPrivate? }
GET /api/memory/collections/:id
PATCH /api/memory/collections/:id { name?, color?, isPrivate? }
DELETE /api/memory/collections/:id

You can only edit or delete collections you created. Default collections cannot change visibility or be deleted (400 / 403).

Save memories

POST /api/memory

curl -X POST https://api.dunsocial.com/api/memory \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Workspace-Id: YOUR_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
  "text": "We ship on Fridays and never use corporate jargon.",
  "collectionId": "COLLECTION_ID"
}'

Batch: POST /api/memory/batch with { texts: string[], collectionId }{ success, count }.

List memories

GET /api/memory?collectionId=COLLECTION_ID&limit=

collectionId is required (400 if missing).

POST /api/memory/search

{
"prompt": "How do we talk about pricing?",
"collectionIds": ["COLLECTION_ID"],
"topK": 5
}

Returns matches with text, score, and collectionId.

Update or delete

Method Path Body
PATCH /api/memory/:id { collectionId, memoryId, text }
DELETE /api/memory/:id { collectionId, memoryId }

Both need the collection id in the body so permissions can be checked.