Delete Data
Permanently delete a record by its ID.
import fetch from "node-fetch";
const recordId = "66bd3762c23f9e3f152fb4d1";
const response = await fetch(
`https://api.bluenexus.ai/api/v1/data/memories/${recordId}`,
{
method: "DELETE",
headers: {
Authorization: `Bearer ${USER_ACCESS_TOKEN}`,
},
}
);
// Returns HTTP 204 No Content on successDeletion is permanent! There is no way to recover a deleted record. Consider implementing a soft delete pattern (e.g., setting a deleted flag) if you need the ability to restore data.
Best Practices
Confirm before deleting: Implement confirmation dialogs in your UI
Audit trail: Log deletion events for compliance and debugging
Soft deletes: Consider marking records as deleted instead of removing them
Cascading deletes: Handle related data appropriately (delete or update references)
Last updated

