If it is administrative detention, because it is an administrative act, according to the Administrative Review Law, you can apply for review to the higher authority that made the decision. According to the Administrative Procedure Law, you can file a lawsuit with the People's Court. According to the Letters and Calls Regulations, you can also Petition.
For criminal detention, you can file a complaint with the court or the procuratorate, because according to the provisions of the Criminal Procedure Law, if the compulsory measures taken by the people's court and the people's procuratorate against criminal suspects or defendants are found to be inappropriate, , should be canceled or changed in a timely manner. When reviewing and approving arrests, if the People's Procuratorate discovers that the public security organs have violated the law during investigation activities, it shall notify the public security organs to make corrections, and the public security organs shall notify the People's Procuratorate of the corrections.
Of course, no matter which one it is, you can complain to the agency that made the decision, you can also complain to the National People's Congress, which has broad supervisory powers, or you can complain to the Party's Discipline Inspection Committee about the party's violations of discipline and law. Behavior.
Of course, those who violate disciplines and laws will be subject to intra-party disciplinary sanctions and organizational administrative sanctions, and those who seriously neglect their duties will be punished by criminal law.