Include all of your grounds for relief and all of the facts that support each ground for relief in this petition. Habeas corpus is a kind of petition that you can file in federal court to claim that your imprisonment violates federal law.However, while a state writ does not have a deadline, a federal writ must be filed within one year of your conviction being final. An application for a writ of habeas corpus must be made to the appropriate district court. A petition for writ of habeas corpus must identify the applicant, and the person who is restraining the applicant- often the warden of the prison. They can file a petition called a habeas corpus petition in a federal court, asking for a review of their case. An application for a writ of habeas corpus must be made to the appropriate district court.