From the introduction to Can the President Close the Border? Relevant Laws and Considerations (LSB10283, Apr. 12, 2019):
Little federal case law addresses these questions. Although recent media articles discuss at least four occasions when past presidents have restricted operations at ports of entry on the southern border, those executive measures apparently did not
prompt legal challenges that required federal courts to assess the Executive’s authority for the measures.