Permanent residency for mother of a child with Brazilian father

I would like to know if in order to apply for permanent residency for me (future mother) I have to give birth to the baby in Brazil or is it also possible if I give birth to the child in my home country. The father has Brazilian nationality.
What documents will be required?

Congratulations!
Your child can be born in your home country, but the Brazilian parent must apply for the Brazilian birth certificate IN PERSON with the child at the Brazilian Consulate.   Check the website of the Brazilian Embassy, or the Brazilian Consulate nearest your home, for details.
Your partner should be able to apply for your permanent residency as soon as you have the baby's Brazilian birth certificate.