Many here, including myself, have "been there, experienced that".
Likely that initial court order is
ex parte and based solely on her claims. There should soon be a hearing where both parties appear and you with your lawyer can present your side. Your lawyer will instruct you to let him do most of the talking. He knows not to let you admit to any wrongdoing. (We are inexperienced in legal controversies.)
If she made child abuse allegations that include endangerment or neglect, then children's agencies would become involved. I recall in my first hearing that the CPS investigator stood up in court and stated that they had "No concerns" about me. The magistrate then removed our preschooler from the order blocking contact and set up a parenting schedule for child exchanges. (My ex still had her "protection" for a a few more months but frankly as long as I saw my child I was content to be apart from her and her nasty behavior.
... domestic or family court seems to be a place where serious mental health issues are studiously ignored. It assumes or hopes the discord and conflict is the result of the separation and the heightened emotions will later settle down once the handles things. However, as William Eddy (lawyer, mediator, and author*) noted, 10-15% of divorce cases involved acting out PDs such as NPD or BPD.
* William A. Eddy is author of "
Splitting: Protecting Yourself While Divorcing Someone with Borderline or Narcissistic Personality Disorder"
It appears your ex is not afraid to blatantly lie and he will not hesitate to make you appear worse than him. Ponder that reality. It may take time, but you need to accumulate facts and documentation to counter his claims and accusations.
Family courts don't try to "fix" people with issues. (We do well to follow that example, especially since relationship partners seldom succeed when BPD or NPD is in the mix, even after years of trying.) Court issues
orders which are synonymous to what we with lesser Authority call
Boundaries. Likely you tried to set proper boundaries on your ex, but he ignored them. That's typical with acting-out PDs. Instead
boundaries are for us. That is, our boundaries are our
response to poor behaviors. See the boundary articles on our
Tools & Skills workshops board.
Courts and children's agencies will view as more actionable any incidents of serious (1) endangerment or (2) neglect.