Updated deleteUsers to use V2 API Endpoints (#2624)

This commit is contained in:
Saket Aryan
2025-05-05 23:23:13 +05:30
committed by GitHub
parent d41f19b9ce
commit 725a1aa114
4 changed files with 86 additions and 28 deletions

View File

@@ -209,6 +209,12 @@ mode: "wide"
<Tab title="TypeScript">
<Update label="2025-05-05" description="v2.1.23">
**New Features:**
- **Client:** Updated `deleteUsers` to use `v2` API.
- **Client:** Deprecated `deleteUser` and added deprecation warning.
</Update>
<Update label="2025-05-02" description="v2.1.22">
**New Features:**
- **Client:** Updated `deleteUser` to use `entity_id` and `entity_type`

View File

@@ -1513,7 +1513,7 @@ client.delete_users({ user_id: "alex" })
```
```bash cURL
curl -X DELETE "https://api.mem0.ai/v1/entities/?user_id=alex" \
curl -X DELETE "https://api.mem0.ai/v2/entities/user/alex" \
-H "Authorization: Token your-api-key"
```
@@ -1531,12 +1531,6 @@ curl -X DELETE "https://api.mem0.ai/v1/entities/?user_id=alex" \
client.reset()
```
```javascript JavaScript
client.reset()
.then(result => console.log(result))
.catch(error => console.error(error));
```
```json Output
{'message': 'Client reset successful. All users and memories deleted.'}
```