Add delete users method (#1683)

This commit is contained in:
Dev Khant
2024-08-13 22:35:04 +05:30
committed by GitHub
parent 31ef9135e7
commit f19dfe70d7
2 changed files with 33 additions and 0 deletions

View File

@@ -639,6 +639,28 @@ curl -X DELETE "https://api.mem0.ai/v1/memories/?user_id=alex" \
```
</CodeGroup>
Delete all users:
<CodeGroup>
```python Python
client.delete_users()
```
```javascript JavaScript
client.delete_users()
.then(users => console.log(users))
.catch(error => console.error(error));
```
```json Output
{'message': 'All users, agents, and sessions deleted.'}
```
</CodeGroup>
Fun fact: You can also delete the memory using the `add()` method by passing a natural language command:
<CodeGroup>