The mother now shares custody of the son with the father's parents, who also live in New Zealand.
Now the woman, whose identity is protected, faces the possibility of having her son taken away from her.
In an Immigration and Protection Tribunal decision released in August, the tribunal ruled that the son, who is a Tongan National, was not at risk of being subjected to severe mental or physical pain if he was deported to Tonga.
His application for refugee status was declined. He appealed which was also declined.
"The boy is a Tongan National and would be able to reside with his father there," the decision said.
He doesn't face a real chance of serious harm as a result of breaches of any human rights in Tonga.
However, his mother won her appeal to be recognised as a refugee after her first application was declined.
The decision said that she was entitled to be recognised as a refugee due to her well-founded fear of being persecuted in India for having children out of wedlock.
While fighting for her son's refugee status, she told the tribunal how she feared that if she attempted to take her son to India, the New Zealand grandparents would prevent his departure and she would be separated from him.
If the departure was allowed, she feared he would become the victim of discrimination and bullying in India because of his mixed race and being born out of wedlock.
She told the tribunal her family were unaware of her New Zealand life with children, and that she would be seen as having significantly offended against notions of "honour".
She also mentioned that her family would be able to notice the biological changes caused by the birth of her two children, if she went home without them.
"She faces a real chance of serious harm, arising from breaches of human rights in India," the decision said.
In June 2017 the woman's work visa expired, and she was issued a deportation order. She appealed to the Minister.
She reached out to her son's father for support to appeal against her deportation but he refused to help, telling her that he had moved on with his life and that he was not concerned about the son, who could remain in her care.
The Minister cancelled the mother's deportation liability and she and her son were granted student visas in 2019.
But now her student visa had run out, leaving them both vulnerable. The son is currently on a student visa.
"The son may be in a difficult predicament," Immigration and Protection Tribunal Judge Martin Treadwell said in the decision.
"There is no doubt the mother will be able to include the son as a secondary applicant in her residence application but such an application takes time.
"In the interim, he may need to seek the discretion of Immigration New Zealand to be exercised in his favour in order to maintain a student visa, to enable him to continue attending school."
The mother cannot be deported from New Zealand now due to being recognised as a refugee.
She will now need to file a secondary application to include her son and she will also need to include permission from the son's father.