docs: correct client call shape and stale v1 response examples (#6901)

This commit is contained in:
Kartik
2026-08-14 18:13:37 +05:30
committed by GitHub
parent 290de24bb8
commit b4c50550bf
3 changed files with 10 additions and 21 deletions
+4
View File
@@ -1043,6 +1043,10 @@
"source": "/open-source/features/graph-memory",
"destination": "/platform/features/graph-memory"
},
{
"source": "/open-source/features/reranking",
"destination": "/open-source/features/reranker-search"
},
{
"source": "/features/:slug",
"destination": "/platform/features/:slug"
+2 -12
View File
@@ -76,18 +76,8 @@ await client.add(messages, { userId: "alice" })
```json Output
{
"results": [
{
"memory": "Name is Alice",
"event": "ADD",
"id": "7ae113a3-3cb5-46e9-b6f7-486c36391847"
},
{
"memory": "Likes large pizza with toppings including cherry tomatoes, black olives, green spinach, yellow bell peppers, diced ham, and sliced mushrooms",
"event": "ADD",
"id": "56545065-7dee-4acf-8bf2-a5b2535aabb3"
}
]
"event_id": "evt-uuid",
"status": "PENDING"
}
```
</CodeGroup>
+4 -9
View File
@@ -82,11 +82,11 @@ client.add(messages, { userId: "user1", timestamp: unixTimestamp })
```
```bash cURL
curl -X POST "https://api.mem0.ai/v1/memories/" \
curl -X POST "https://api.mem0.ai/v3/memories/add/" \
-H "Authorization: Token your-api-key" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "I'm travelling to SF"}],
"messages": [{"role": "user", "content": "Travelling to SF"}],
"user_id": "user1",
"timestamp": 1721577600
}'
@@ -94,13 +94,8 @@ curl -X POST "https://api.mem0.ai/v1/memories/" \
```json Output
{
"results": [
{
"id": "a1b2c3d4-e5f6-4g7h-8i9j-k0l1m2n3o4p5",
"data": {"memory": "Travelling to SF"},
"event": "ADD"
}
]
"event_id": "evt-uuid",
"status": "PENDING"
}
```