If neither parent has custody can you keep the child in NY?

With the court's permission, if the parents are not married. Single fathers have no assumed rights to a child. Married parents have equal rights to the child until otherwise ruled on.