It can be really frustrating to face off against your spouse in a divorce or custody hearing and watch as they put on a “nice-person mask” for the court. Your spouse may hurl curses at you over the slightest provocation and talk terribly about you in front of the kids but appear to be the model of propriety in front of the judge. (Even worse: You suspect the judge may be buying into the show.)

Should you attempt to record your spouse in their “natural state” so that you can prove to the judge that they’re putting on an act?

Not without an attorney’s advice. New York is considered a “one-party consent” state, meaning that you can electronically record conversations and events as long as one person present is aware that the recording is happening. However, that means that you have to be actually involved in the conversation. That means, for example, if you silently stand by and record your spouse telling the kids horrible things about your behavior or character, you could violate the law and end up charged with a crime. Similarly, if you’re tempted to put tracking software on your spouse’s phone or laptop to capture their conversations over Messenger or text, you need to hold up. You could easily be accused of cyberstalking.

Every divorce is filled with aggravations, not the least of which is dealing with a spouse who can put on (and take off) a charming persona at the drop of a hat. There may be things that you can do to expose the duplicity and make your point with the court. Find out what your legal options really are in consultation with an attorney.