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.
A Customs and Border Protection officer checks IDs as people enter the US from Mexico in San Ysidro, California.

Do I have the same legal rights at the border that I would elsewhere?

No. The Fourth Amendment,