Lincoln did this and much more. Imprisoned an entire state legislature, even threatened to arrest a USSC justice.
It was a time of insurrection so habeas corpus was suspended with an act of Congress.
Truth is the President with the complicity of Congress can do whatever he wants.
FDR threw people in jail for committing no other crime than being a certain ethnicity, last century.