Can they search my phone?
Updated 4:07 PM ET, Thu February 16, 2017
(CNN)If you're entering or returning to the US soon -- even if you're a US citizen -- you may be confused about your legal rights in the wake of President Trump's contested travel ban.
Can officers detain you at airports or other border checkpoints? Can they scroll through your phone? What happens if you say no?
To learn the answers to these and other questions, we spoke to three experts in immigration and privacy law: Danielle Rizzo and Leslie Holman of the American Immigration Lawyers Association, and Nathan Freed Wessler, a staff attorney with the ACLU.
Can I be stopped or searched at the border?
Yes. It doesn't matter if you're an American citizen, a green card holder or a visa holder, Customs and Border Protection (CBP) officers can stop you or take you to secondary inspection. This might happen because officers need more information about you or your immigration status to decide whether you should be allowed into the country. It could also be a random search.
According to Holman, even if you have a visa to enter the United States, CBP agents are ultimately deciding your "admissibility" into the United States.
Do I have the same legal rights at the border that I would elsewhere?
No. The Fourth Amendment, which protects people from searches and seizures without probable cause of a crime being committed, doesn't apply in the same way at the border, Rizzo said.
According to Holman, probable cause and reasonable suspicion are not needed to search people -- Americans or foreign visitors -- at the border.
Am I allowed to speak with a lawyer?
If you're a US citizen:
According to the ACLU, US citizens are allowed to request a lawyer be present for any questioning.
If you're a permanent resident or other foreign national with a visa:
If you're not American you generally don't have the right to an attorney unless you have been charged with a criminal offense or the questions relate to something other than your immigration status, Rizzo says.
Once the questioning goes past the basics -- like where you traveled or what you're bringing into the country with you -- to things like your political beliefs or the contents of your electronic devices, Wessler believes that all travelers, including non-citizens, have the right to counsel.
Can CBP officers take my green card away and not allow me back in the country?
No. Officers at the border cannot make you sign a form that would abandon your permanent resident status.
According to Rizzo, in most cases (unless you've committed a serious crime and are being deported), legal permanent residents have a right to a hearing before an immigration judge. So you would be allowed back into the country to wait until that hearing.
Can my things be searched?
Yes, all people and their luggage and belongings entering the country are subject to search.
What if I bring prohibited or restricted items with me?
You will be asked to declare what items you're bringing into the country. If you have prohibited items, such as fruit that could carry pests or diseases, they will be confiscated and destroyed.
Could my laptop, phone or other electronic devices be searched?
Yes, even if you're a green card holder or an American citizen.
On January 31, Sidd Bikkannavar, a US citizen and NASA engineer, was stopped by customs officers at Houston airport when he was returning from a vacation in Chile. He wasn't from any of the seven countries listed in Trump's executive order. But CBP officers asked for his phone and his PIN to access the phone.
According to CBP, your devices could be searched for many reasons, including incomplete travel documents or because your name matches a person of interest. It also could be a random search.
Could I be asked for access to my social media profiles or email?
Yes, even if you're American. But whether you're legally required to share this information is unclear.
"It's a really tricky area to determine," Rizzo says. Wessler agrees: "The state of the law is so unsettled because the government claims such broad power at the border."
In December, the US government started asking certain foreign visitors for access to their social media profiles. That request, while voluntary, is now included on a form which visitors from certain countries -- including the UK, France, and Spain -- need to fill out.
What about my data on my phone?
This is where it can get complicated.
Border agents are allowed to swipe through your phone or look through the documents on your laptop.
The government can also copy the data on your device.
But courts are still grappling with this issue, Wessler says. A federal appellate court ruled in 2013 that if border agents wanted to conduct a "forensic search" they have to suspect you of criminal wrongdoing.
What if I decline to hand over my passwords or PIN?
Rizzo and Wessler both say that this is where people have to start making practical judgments about what the implications could be for them:
If you're a foreign national:
If a foreign national is perceived as not being cooperative, Rizzo warns "there could be severe repercussions." If someone chooses not to hand over the information asked of them, she says CBP can deny them entry.
If you're a green card holder:
You have more rights, but not as many as a US citizen, according to Rizzo.
Officers at the border cannot make you sign a form that would relinquish your permanent resident status. According to Rizzo, in most cases, legal permanent residents have a right to a hearing before an immigration judge. So you would likely be allowed back into the country to wait until that hearing.
If you're a US citizen:
You cannot be denied entry into the United States, but you might be delayed.
"For citizens, and likely for many green card holders, border agents can inconvenience you, but eventually, they're going to have to let you back into the country," Wessler says.
"There's a risk you could be held, detained ... for hours in an unpleasant, windowless secondary inspection room," he says. There's also a chance that authorities will seize your phone or laptop, he says, adding that he's seen cases in which phones were held for months.