His butt-dial boasting that “I barely show up to work” cost a veteran state court spokesman a plum job.

David Bookstaver, the highly paid communications director for the Office of Court Administration, opted to hide in the woods Thursday after he got word that he no longer needed to fail to show up for work.

Bookstaver was canned by red-faced state court higher-ups confronted with The Post’s front-page story — and online audio — that revealed the fallen flak’s voicemail confession that “I’m not doing anything. I barely show up to work and I’ve been caught.”

Confronted by two Post staffers near his upstate Warwick vacation home, Bookstaver, 58, jumped down a four-foot embankment and disappeared into a thicket rather than discuss the humiliating end to his 21-year career with OCA.

“Go away, you’re on private property. I’ll have you locked up,” Bookstaver fumed when he later emerged.

Bookstaver — who was wearing cargo shorts and a blue Supreme Court Officers Association T-shirt — then hopped into a silver Ford Edge, whose driver whisked him home. Court officials acknowledged that Bookstaver — whose salary topped $166,000 a year — was canned first thing Thursday morning because of the exposé.

“While there are occasional abuses of office, we take those abuses extremely seriously and whenever we learn about them, we will always act to hold the offenders accountable,” said OCA spokesman Lucian Chalfen.

Preparation of The Post’s report included contacting Bookstaver on Sunday for comment on claims that he’d been showing up at his office as little as two days a week for 18-plus months.

The following day, he accidentally dialed the same reporter and left a four-minute, open-mic voicemail while discussing the matter with at least two pals, telling them he had lied to The Post and boasting about having shirked his duties while being paid handsomely.

“But, frankly, look, the bottom line: The story’s true. I’m not doing anything,” he admitted.

Thursday afternoon, Chief Judge Janet DiFiore sent out a system-wide email saying The Post report “raises issues of the utmost concern for all of us.”

“In everything we do, we must hold ourselves accountable to the public we serve. When that trust is compromised, it can diminish public confidence and in turn undermine our ability to administer justice,” she wrote.

In an ironic twist, the head of the union whose T-shirt Bookstaver was wearing in the woods demanded official investigations of him by both state Attorney General Eric Schneiderman and Comptroller Thomas DiNapoli.

“I will personally call the AG’s office to refer them to the facts of this case and the case of any employee who steals time,” Supreme Court Officers Association president Patrick Cullen said.

He said he would “call and petition” DiNapoli for “a full audit of all civilian employees of the Office of Court Administration.”

Court system sources said workers have to sign off on electronic time sheets to get paid, and a law enforcement source said Bookstaver could face criminal charges, including grand larceny, if he falsified hours.

Neither Schneideman nor DiNapoli would comment. But a DiNapoli spokeswoman said Bookstaver’s taxpayer-funded pension is safe from forfeiture because his hiring pre-dated a 2011 ethics law that lets the state strip crooked officials of their retirement benefits.

Assemblyman Steve McLaughlin (R-Troy) said he would be “calling for hearings on this, for sure.”

“The only way to get rid of this stuff is to expose it. Somebody over there knew about this and let it go. Whoever was supervising him should be fired,” he said.

Government watchdog John Kaehny of Reinvent Albany called the Bookstaver revelations proof that the court system was “a ripoff of the taxpayers” and “a resting ground for patronage and political favoritism.”

“It’s probably the most corrupt branch of government,” Kaehny said.

“That’s saying a lot in New York. The bar is high,” Kaehny said.

Warning: Graphic language

Additional reporting by Julia Marsh and Carl Campanile

