A bill introduced in Congress Tuesday puts strict limitations on the right of U.S. border agents to search the electronic devices of American citizens when they cross the border or reenter the U.S at an airport.

The "Protecting Data At the Border Act" would make it illegal for border officers to search or seize cellphones without probable cause.

"Americans’ Constitutional rights shouldn’t disappear at the border," said Sen. Ron Wyden, D.-Oregon, who is cosponsoring the bill in the Senate with Sen. Rand Paul, R.-Kentucky. "By requiring a warrant to search Americans’ devices and prohibiting unreasonable delay, this bill makes sure that border agents are focused on criminals and terrorists instead of wasting their time thumbing through innocent Americans’ personal photos and other data."

The proposed law comes after an exclusive NBC News report on 25 different Americans who say they were forced to give up and unlock their phones at airports and border crossings.

Related: U.S. Citizens: American Border Agents Can Search Your Cellphone

For now, U.S. border agents have the right to ask for your phone at the border, and data provided by the DHS says the number of travelers who’ve been asked for their phones has risen sharply since 2015.

But still, only a small percentage of travelers are asked for their smartphones. What happens if you are one of those travelers?

Will I be searched?

You probably won’t be. According to the DHS, of the nearly 400 million people who cross borders in or out of the U.S. every year, fewer than 0.01 percent of travelers have their phone or computer searched, and only some of them are American citizens.

"Your chances are almost zero," said Jaime Ruiz, a spokesperson for Customs and Border Protection. "Our main goal is to facilitate legitimate travel ensuring the highest level of security."

What if I consent to a search?

If you allow access to your phone, you may be delayed for a half hour while it is searched, according to people who have undergone the process. You will be taken out of line, either at the airport or the car border crossing, during the search. Once it is over, you will be allowed to go on your way, provided the agents don’t find something constitutes evidence of a crime, according to a DHS spokesperson.

What do they do with my personal info?

If you hand over an unlocked device, and get it back in 30 minutes, and are then waved on, you may be leaving a copy of your data behind you — at least temporarily.

CBP policy allows agents to clone your device and everything on it, making what they call a "gold copy". The agents can share that with other federal law enforcement agencies like the DEA or the Counterterrorism Center if they decide they need help with translation, decryption, or to "determine...the meaning, context or value of information." Without probable cause, however, they’re supposed to not only delete but also forensically wipe all your data from their system.

Related: Border Agent Searches of Americans' Cellphones Spark Lawsuit

Some travelers who were searched and spoke to NBC News said they found their banking apps adjusted and their device serial number logged. One person noticed from the browser history that someone had used his Android to search cinema listings. All travelers who spoke to NBC News said they had their photos, videos, contacts and call logs searched.

Can they keep my phone?

Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

Temporarily. If you leave the airport or the border crossing without your device, CBP call that "detention," which means the agents are holding on to the device to search it thoroughly. When that happens, they should give you a piece of paper that explains their legal right to what they’re doing, and a numbered receipt detailing every item they’re taking away.

The agents can keep your phone for five days without citing a reason, and hold onto it for several more weeks if they can justify why to a supervisor. Without probable cause, they eventually have to return the phone. If you never get your phone back, that’s a "seizure." To do that, CBP has to prove it found evidence of a crime on your device.

American citizens Akram Shibly (left) and Kelly McCormick had their phones searched as they reentered the U.S. at Niagara Falls, New York, on two separate trips in Jan. 2017. They say Shibly was put in a choke-hold when he refused to hand over his phone on the second crossing. Akram Shibly

So is this all legal?

DHS has the right to search any object brought across the border within 100 miles, which means that Customs and Border Protection agents can search you when you are entering or leaving the U.S. at the border or at an airport, or that Border Patrol agents can search you if you are close enough to the border.

Anywhere else in the country, law enforcement would need a warrant or at least reasonable suspicion. The Fourth Amendment does not apply the same way at the border.

But that’s not carte blanche for border officers to search all travelers at any time.

In February, CBP officers at New York’s JFK airport blocked the exit on a domestic flight, and told travelers they needed to show identification. Those people did not necessarily have to comply, former DHS lawyers told NBC News. If you don’t cross a border, CBP can only search if you agree to it, or if they have reasonable suspicion against you.

What if I don’t want to be searched?

If you are not crossing a border – if you are on a domestic flight, for example -- legal experts say you can say "No" and ask "Am I free to leave?" If the agents don’t have a specific suspicion, the agents have to let you go.

If you are at the border and don’t want your phone searched, former DHS lawyers suggest you can ask for a supervisor, and sometimes that’s enough for the officers to back down and let you go. If the agents insist, however, DHS policy says that you have to hand it over. That goes for anyone, including U.S. citizens.

What if I refuse?

"Asserting your rights at the border is risky," said Margo Schlanger, who used to run Homeland Security’s Civil Rights and Civil Liberties Division.

If you’re not a citizen, CBP can block you from coming into the country for years. And that won’t necessarily stop agents from searching the phone.

If you are American, refusing the search can lead to a legal gray area.

CBP agents have the right to search your phone, but their code of conduct says they may not physically force you to hand over your phone. If you refuse a search, they can keep you at the border for hours, but eventually they have to let you in.

Sidd Bikkannavar poses for a portrait in 2014. Takashi Akaishi

"U.S. citizens have a near-absolute right to enter the United States, to come back home," said Hugh Handeyside, a staff attorney with the ACLU's National Security Project.

Despite CBP policy against using physical force, NBC News spoke to people traveling on U.S. passports who said that when they refused to hand over their phones they were subjected to physical force by CBP officers and put in handcuffs. The DHS Inspector General is investigating one of the recent incidents.

Do I have up to provide them with my password?

Travelers told NBC News they were asked to unlock their phones or to provide passwords. No law or policy says citizens have to hand over their passwords to CBP agents. In fact, several lawyers who spent years working for DHS said they believe the practice could be challenged on Fifth Amendment grounds. However, it hasn’t been tested in court.

If you're a U.S. citizen and refuse to hand over your PIN, the agents can keep you at the border for a few hours but they can’t compel you to provide the information. Even though some officers have threatened arrest, they can't follow through on it, at least not legally.

When asked if CBP would arrest U.S. citizens at the border for refusing passwords, DHS spokesperson Gillian Christensen told NBC News, "We don’t do it."

Besides, DHS can probably get your data anyway, without a password. DHS has the technical capability to forensically extract data from most Apple and Android phones, except for the newest models. More than two dozen reports document the agency’s proven ability to access deleted call logs, videos, photos, and emails to name a few, in addition to the Twitter, Facebook, and Instagram apps.

There is an exception in the Ninth Circuit, however, which covers Alaska, Arizona, California, Hawaii, Idaho, Nevada, Oregon, and Washington. A 2013 court judgment there ruled that border officers must have at least reasonable suspicion to do a "forensic search."

Do I have to disclose my social media accounts?

If you’re a U.S. citizen, no. Legal experts told NBC News that American travelers are only required to answer questions related to admissibility. That means verifying whether you have all legal or immigration documents allowing you to enter the country and that you’re not actively committing any crimes like drug or human trafficking.

For Americans, questions about social media do not count. The same goes for your political and religious beliefs. But, if you’re a foreign national, border officers could block you from the country if you don’t answer.

The Department of Homeland Security recently said they were considering asking visa applicants to voluntarily provide their social media handles and passwords, insisting this would only apply to foreign nationals.

"These are the things we’re going to think about," DHS Secretary John Kelly told Congress on February 7. "No one should take this as this is what we’re going to do right now."