If I wasn't married when my child was born, who has custody rights?
An unmarried father does not have a right to custody or parenting time until paternity is established. An unmarried mother has sole legal and sole physical custody of the child until a court order says differently. Only a legal parent can ask the court for custody or parenting time. A legal parent is also responsible for supporting a child. Once a man is named the legal father of a child, he has certain rights, duties, and obligations to the child.
If the parents are not married when the child is born, there is no legal father until paternity is established. The parents may agree that a man is the biological father and sign a form called a Recognition of Parentage (ROP) or a court action may be started to name the father (adjudicate paternity). A birth certificate does not establish paternity.
Source: Rights and Responsibilities of Unmarried Parents | LawHelp Minnesota