A Texas repairman who became trapped inside an ATM slipped notes to customers via the receipt slot pleading for them to help him escape, police said.

The contractor became stuck on Wednesday when he was changing a lock to a Bank of America room that leads to the back of the ATM, Corpus Christi police Lieutenant Chris Hooper said.

He could not let himself out of the room because he did not have a key card and the bank branch had been closed so there were no bank employees on site.

"Apparently he left his cellphone and the swipe card he needed to get out of the room outside in his truck," Lt Hooper said.

The worker became trapped behind this Bank of America ATM in Corpus Christi, Texas, while changing a lock. ( APTN/KRIS 6 News )

When he realised customers were withdrawing cash from the ATM, he passed notes to them through the receipt slot.

One read, "Please help. I'm stuck in here and I don't have my phone. Please call my boss ..."

Some customers appeared to dismiss the notes as a gag, Lieutenant Hooper said, but one called police.

"Sure enough, we can hear a little voice coming from the machine," senior officer Richard Olden said.

"So we're all thinking this is a joke — this has got to be a joke."

After passing some shouts back and forth, an officer kicked in the door to the room and freed the man, whose name has not been released.

"Everyone is OK, but you will never see this in your life, that somebody was stuck in the ATM. It was just crazy," Mr Olden said.

Senior officer Richard Olden said police thought the notes were a joke, until they heard faint shouts coming from the ATM. ( APTN/KRIS 6 News )

ABC/APTN