Where detention orders come from
The phrase most often refers to federal criminal cases, where the government can ask a judge to hold a person without release conditions until trial. That request is decided at a detention hearing, held at the first appearance or soon after, where the court considers whether any conditions could reasonably assure that the person will return to court and that the community will be safe. For some serious charges, including certain drug and firearm offenses, the law starts from a presumption in favor of detention, which the defense can try to rebut. New York state courts handle pretrial custody differently, through a securing order at arraignment under the state's own bail rules. Immigration detention is a separate system again, and its rules on custody and bond have been changing and are being litigated.
Preparing for or revisiting the hearing
What tends to matter at a detention hearing is concrete information: where the person lives and with whom, their work, family ties, health, and their history of appearing in court. Family members who could serve as sureties or third-party custodians, and a stable residence where the person could live, can affect what conditions a court is willing to consider. Gather proof of address, employment letters, medical records, and contact information for people willing to support release. If the hearing has already happened, those materials may still be useful, because a magistrate judge's detention order can be reviewed by a district judge, and in some circumstances a hearing can be reopened when new information comes to light.
What we look at first
We start by finding out which court issued the order, on what charge, and on what grounds, whether risk of flight, danger to the community, or both. We obtain the transcript or recording of the hearing and any pretrial services report that was prepared. From there we decide whether to seek review, to gather new information for a renewed request, or to focus on the case itself while preparing for a later bail application. We also explain to families how to communicate with a detained person, and why the case should not be discussed on recorded jail calls.