docs: fix OSS REST API endpoint discrepancies (#4555)

Co-authored-by: utkarsh240799 <utkarsh240799@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Utkarsh
2026-03-26 20:05:23 +05:30
committed by GitHub
co-authored by utkarsh240799 Claude Opus 4.6
parent 5edc0cc99f
commit 515f87b6bd
+31 -3
View File
@@ -13,6 +13,10 @@ The Mem0 REST API server exposes every OSS memory operation over HTTP. Run it al
- You plan to explore or debug endpoints through the built-in OpenAPI page at `/docs`. - You plan to explore or debug endpoints through the built-in OpenAPI page at `/docs`.
</Info> </Info>
<Warning>
**OSS vs Platform API paths:** The self-hosted OSS server does **not** use the `/v1/` prefix. For example, the endpoint is `POST /memories`, not `POST /v1/memories/`. The [API Reference](/api-reference) documents the hosted platform at `api.mem0.ai` which uses `/v1/` paths — those do not apply to the OSS server.
</Warning>
<Warning> <Warning>
Enable API key authentication (see below) and HTTPS before exposing the server to anything beyond your internal network. Enable API key authentication (see below) and HTTPS before exposing the server to anything beyond your internal network.
</Warning> </Warning>
@@ -147,13 +151,18 @@ curl -X POST http://localhost:8000/memories \
</Info> </Info>
```bash ```bash
curl "http://localhost:8000/memories/search?user_id=alice&query=vegetable" curl -X POST http://localhost:8000/search \
-H "Content-Type: application/json" \
-d '{
"query": "vegetable",
"user_id": "alice"
}'
``` ```
### Explore with OpenAPI docs ### Explore with OpenAPI docs
1. Navigate to `http://localhost:8000/docs`. 1. Navigate to `http://localhost:8000/docs`.
2. Pick an endpoint (e.g., `POST /memories/search`). 2. Pick an endpoint (e.g., `POST /search`).
3. Fill in parameters and click **Execute** to try requests in-browser. 3. Fill in parameters and click **Execute** to try requests in-browser.
<Tip> <Tip>
@@ -162,6 +171,25 @@ curl "http://localhost:8000/memories/search?user_id=alice&query=vegetable"
--- ---
## Endpoint reference
The OSS REST server exposes the following endpoints. None use the `/v1/` prefix.
| Method | Path | Description |
|--------|------|-------------|
| `POST` | `/configure` | Set memory configuration |
| `POST` | `/memories` | Create memories |
| `GET` | `/memories` | Get all memories (filter by `user_id`, `agent_id`, or `run_id`) |
| `GET` | `/memories/{memory_id}` | Get a specific memory |
| `PUT` | `/memories/{memory_id}` | Update a memory |
| `DELETE` | `/memories/{memory_id}` | Delete a specific memory |
| `DELETE` | `/memories` | Delete all memories for an identifier |
| `GET` | `/memories/{memory_id}/history` | Get memory history |
| `POST` | `/search` | Search memories |
| `POST` | `/reset` | Reset all memories |
---
## Verify the feature is working ## Verify the feature is working
- Hit the root route and `/docs` to confirm the server is reachable. - Hit the root route and `/docs` to confirm the server is reachable.