There is no such thing as custody of an unborn child. This is for two reasons. First, children in utero have no independent legal existence prior to birth. Second, custody would be moot even if they did. Itu2019s not exactly practicable to establish a partial custody schedule for a foetus. Transportation would be an issue, letu2019s just say.So a custody case brought prior to birth would generally be dismissed for want of jurisdiction. (In California, apparently, there may be some sort of local exception to this, as a commenter observes.)After the baby is born, courts may exercise jurisdiction to determine custody arrangements as is provided by local law (in the U.S. both parents have equal legal rights, but paternity may need to be established and as a matter of biology, the baby would have to start out with the mother), but procedural provisions vary significantly. You would need to consult an attorney in the location where you are to determine what papers need to be presented.If there is a significant risk that the baby will be, if left in the motheru2019s care, immediately at risk, the child-protective-service agency should be involved. If it is just a garden-variety dispute over parenting time, though, this can wait for regular proceedings after birth.You might be able to work out an informal agreement (bearing in mind that any subsequent custody determination will be de novo) or try to arrange mediation by talking directly to the other party.