A copy of any mandate that justifies the detention of the petitioner must be attached to the affidavit and the original mandate produced at the hearing. The first is that you must file your petition within one year of exhausting your direct appeal.This article addresses a defendant's right to file a federal petition for a writ of habeas corpus from a conviction in a state court. A writ of habeas corpus may be served on any day. To post bail, you must present personal identification and provide the New York State Identification (NYSID) or Book and Case number of the person to be bailed. Any defendant who has been convicted of a New York state crime in a proceeding should be aware of their right to file a petition for a Writ of Habeas Corpus. Such petitions can be filed if a defendant has been convicted in a New York state court as well as for defendants convicted in a federal court. Based on a new law in your habeas petition. A person illegally imprisoned or otherwise restrained in his liberty within the state, or one acting on his behalf or a party in a child abuse proceeding. General in the Criminal Appeals and Federal Habeas Corpus Bureau.