The Ministry of Health accidently sent the private information of more than 24,000 dead people to hundreds of health professionals.
The data was about individuals who had died in the six months from January this year and included National Health Index numbers, date of birth, date of death, gender and a location code, but not names.
The ministry says the information on the 24,092 individuals was meant to be sent internally but was sent to 950 health professionals.
Graeme Osborne, the ministry's director information group, said as soon as the error occurred a second email was sent asking the recipients to delete the message.
The ministry has apologised for the error.
Labour Party health spokesperson Annette King said while the information was obviously sent in error, the ministry should contact families of people who could be identified and assure them the data had been returned.