Examples
- API Request
- TypeScript
- Python (Sync)
Overview
The Delete User Memory endpoint allows you to remove specific memories from a user’s memory profile. This is useful for maintaining data quality, removing outdated information, or giving users control over their stored personal data.Functionality
- Targeted Deletion: Removes a specific memory using its unique memory ID
- User Context Validation: Ensures the memory belongs to the authenticated user
- Immediate Removal: Permanently deletes the memory from the vector store
- Confirmation Response: Returns clear success/failure status for the deletion operation
- Tenant Isolation: Operates within the specified tenant/sub-tenant context
Use Cases
- Data Cleanup: Remove outdated or incorrect memories
- Privacy Compliance: Allow users to delete their personal data
- Memory Management: Maintain high-quality memory profiles by removing irrelevant information
- Error Correction: Delete memories that were added incorrectly
- User Control: Give users the ability to manage their own memory data
Finding Memory IDs
To delete a memory, you first need to find its ID using the List User Memories endpoint:Important Notes
Memory ID Source: Memory IDs (source_id) can be obtained from the List User Memories endpoint or from the response of Add User Memory and Generate User Memory endpoints.
Best Practices:
- Always verify the memory content before deletion using the List endpoint
- Consider implementing user confirmation for memory deletion
- Log deletion activities for audit purposes
- Provide users with a way to review their memories before deletion
Response Fields
| Field | Type | Description |
|---|---|---|
success | boolean | Indicates whether the operation was successful |
user_memory_deleted | boolean | Confirms whether the specific memory was successfully deleted |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tenant_id | string | Yes | Primary organizational identifier |
sub_tenant_id | string | Yes | Secondary organizational identifier |
memory_id | string | Yes | Unique identifier of the memory to delete |
Error Responses
All endpoints return consistent error responses following the standard format. For detailed error information, see our Error Responses documentation.Authorizations
Query Parameters
Example:
Example:
Example: