Moriah, 18 months old, was born with abnormal brain function and has a range of complex medical issues.
She was in the emergency room for a whole month before she was allowed home, and suffers from disorders such as high aspiration risk, severe reduced muscle strength and a hole in her heart.
She requires round-the-clock care, has to be fed through her nose and needs three doses of medicine each day.
The family have always been in New Zealand legally, whether on work or visitor visas, but now Moriah's one-month visitor visa has expired.
The Immigration and Protection Tribunal has given the girl until March 2018 to stay in the country.
Her mother, Maggie Tu'inukuafe-Lupeitu'u, said Moriah had a seizure just hours before her interview.
"The occupation therapist came in just for a normal check-up and she [Moriah] had a seizure that actually went on and she kept rolling her eyes and shaking her head ... we were close to calling the ambulance," she said.
She said Moriah had been rushed to the emergency room every six weeks since her birth.
They have letters of support - from the Ministry of Health in Tonga, doctors from Auckland's Starship Hospital, and a social worker - asking the government to allow Moriah to stay in New Zealand permanently due to the high risk she could die if she goes back to Tonga.
In a letter to the tribunal, her pediatrician explains how serious her condition is and offering support.
"Moriah needs the care that can be provided by a tertiary children's hospital. It is essential for Moriah's care that she remain in New Zealand," the letter says.
In its decision, the tribunal acknowledged her health difficulties, but said Moriah's health had already cost taxpayers $250,000.
Ms Tu'inukuafe-Lupeitu'u said she arrived in New Zealand more than 10 years ago, her husband Filipe eight years ago and their two children were both been born in New Zealand.
She said they were not in New Zealand to abuse the immigration system.
"We're [not] actually entitiled to any kind of supplement for renting or anything from WINZ, those things we're not eligible for because we're not [permanent residents]," she said.
"I know we're responsible for our children ... but after we get paid, [it's] rent first ... food, and sometimes we have to live with $30 per week."
She said she got her a bachelor's degree in New Zealand and she and her husband had always tried to work and contribute to the country.
She worked in manager roles at supermarket chain Nosh and Filipe was now single-handedly supporting the family as a vehicle dismantler.
They have gathered supporting documents together and are getting their local community to sign a petition to back them to stay in New Zealand.
They will be appealing to the Minister of Immigration this week to grant all of them permanent residency.
A spokesperson for Associate Minister of Immigration Scott Simpson said it was not the minister's policy to comment on specific or individual immigration cases.