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 success

See

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