do you have to be divorced to get custody
Yes, an action under 767 can be filed without a divorce. Or you can file legal separation. It is not typical to file an action without a divorce, so you may find it difficult to find assistance or forms for it. So you may need to hire an attorney.