If you’ve ever spent a day on perma-hold with your health insurance company, you’re likely to find some catharsis in Steven Soderbergh’s “Unsane,” in which Claire Foy ditches her crown to play a young woman held in an institution against her will. Perhaps only the uber-versatile Soderbergh (“Logan Lucky”) could marry a storyline about nefarious bureaucracy with a gritty stalking nightmare — shooting the majority of it on an iPhone, no less.

Foy is Sawyer Valentini (one of the more lyrical heroine names I’ve heard), who’s had to uproot her life to escape the lunatic infatuation of a man (Joshua Leonard) she briefly befriended. When she visits a therapist (Myra Lucretia Taylor) to discuss the lingering psychological fallout, she finds she’s actually been tricked into signing involuntary-commitment paperwork instead.

Before long, the already-traumatized Sawyer is seeing her placid-faced stalker, David, everywhere. (Leonard, who got his start in “The Blair Witch Project,” is just as unsettling as that seminal horror-indie was.) He’s handing out tranquilizers to her fellow patients (Juno Temple and Jay Pharoah among them), and he’s doing room checks. Or is he? Both Soderbergh’s beautifully fuzzed-out camera work and Sawyer’s erratic behavior before being locked up suggest that she might really be grappling with demons of the inner variety — though the ones behind the desks, maintaining the efficacy of their hospital’s program, seem pretty real.

Pharoah, who hasn’t done a ton of movie work in his post-“SNL” career, gives a solid performance as Nate, who’s kind to Sawyer when the other patients are rolling their eyes or, in Temple’s character’s case, lobbing used tampons at her. Eighties queen Amy Irving plays Sawyer’s mom, armed with the certainty that a mother’s indignation is enough to cut through any red tape. And a certain Soderbergh regular, whose cameo I won’t spoil, pops up as a security-systems representative.

But Foy owns this intimate, claustrophobic film, which at its heart is about the universal fear (especially for women, doubly so for ones seeking protection from manipulative men) of telling your story and not being believed. Her self-possessed Sawyer is quick to speak up for herself, but just wobbly enough in the eyes to keep you guessing. For a bit, anyway. If there’s a flaw in “Unsane,” it’s that the screenplay by Jonathan Bernstein and James Greer doesn’t play its hand closer to the vest. The pleasure here is in watching and wondering what’s real and what isn’t, but all too soon it’s spelled out for us. Nevertheless, it’s great fun to watch it all come together — or, more accurately, fall apart.