I need help

Alright my daughter's mother went to jail for stealing jewelry from her husband's mom, and we weren't sure if I could bond her out because money was tight, so I had to hurry up and figure out how to get my daughter in school and everything because I felt my daughter needed to be with me if she wasn't there with her, but she cried and begged me to get her out and told me if I did she was coming home and my family would be back together, well I had to come off her bond and send her back so in the meantime I got her into school where I live and now everything in her name is is tat my adress, my kids mother is our now trying to take take my daughter away from me, tellingme that I won't be able to see her until I get her lagitamized, my question is can she just rip her from me because she was born out of wedlock?