Wood, Chief Judge.
Robert Kowalski is dissatisfied with his treatment by judges and sheriffs personnel during his divorce proceedings. He especially accuses an Illinois judge, Shauna Boliker, of engaging in extrajudicial efforts designed to prejudice the state court against him and in favor of her best friend, Kowalskis wife. While Kowalskis allegations are troubling, in the end we conclude that the district court was correct to dismiss his case.
I
Kowalski and his former spouse have been waging a divorce and child-custody battle in the Circuit Court of Cook County, Illinois. Believing that several state judges and officials have deprived him of a fair proceeding, Kowalski filed this suit under 42 U.S.C. §§ 1983 and 1985. The defendants include Judges Shauna Boliker and Grace Dickler, both of the Circuit Court, as well as the Sheriff of Cook County and two members of his staff. (We refer collectively to the sheriff and his deputies as the sheriff, since no distinctions between them are pertinent to this case.)
Judge Boliker, whom Kowalski describes as his wifes BFF (i.e. , her best friend forever), allegedly engaged in a series of improper communications with Judge David Haracz, who was originally assigned to Kowalskis domestic-relations case. The first incident occurred during a show-cause hearing held after Judge Boliker refused to comply with a subpoena for her deposition by Kowalski. At the hearing, Judge Bolikers counsel slipped Judge Haracz a Secret Letter from Judge Boliker to the sheriff. The letter, which Kowalski later obtained, described Kowalski as a security threat. Kowalski believes that Judge Boliker had several pernicious motives for writing the letter: to deprive Kowalski of his attorney identification card; to produce evidence harmful to Kowalski in his domestic-relations case; and to justify her own improper interference in Kowalskis divorce.
At the hearing, Judge Bolikers attorney denigrated Kowalski by describing him as dangerous, accusing him of habitually staring at the judge in her courtroom, and noting that the judge had posted Kowalskis picture as a warning notice. Kowalski also accuses Judge Boliker of submitting a courtesy letter with these warnings to Judge Haracz. (This may be the same as the Secret Letter.) Finally, when Kowalski moved for a substitution of judges based on these ex parte communications, Judge Bolikers counsel submitted an affidavit to the court, presumably on Judge Bolikers behalf, opposing the substitution. The affidavit reiterated Judge Bolikers contentions that Kowalski posed a security risk, had sent her threatening emails, had stared at her while on the bench, and had stalked her. It also confirmed that Judge Boliker circulated Kowalskis photo and displayed it in her courtroom as a warning.
Judge William S. Boyd ultimately replaced Judge Haracz in the underlying case. Kowalski accuses Judge Dickler, the Presiding Judge of the courts Domestic Relations Division, of prejudicing Judge Boyd. Kowalskis attorney had written to Judge Dickler, asking her to send him a courtesy copy of Kowalskis citation to remove his childrens guardian ad litem . The letter requested that Judge Dickler refer the citation to the body responsible for the appointment list for the guardian ad litem. After Kowalski received no response, his attorney complained to Timothy Evans, Chief Judge of the Circuit Court, who referred the matter back to Judge Dickler. Judge Dickler responded to Kowalski, copying Judge Boyd and all interested parties on the response. Judge Dickler described Kowalskis letter as an ex parte communication, essentially seeking that [Judge Dickler] exercise [her] administrative authority to rule upon a pending motion instead of ... the ... assigned judge ... without notice to concerned parties. Judge Dickler also wrote that the letter to Chief Judge Evans had made baseless and false allegations impugning [Judge Dicklers] integrity which [she] w[ould] not dignify with a response.
Kowalskis complaint also raises claims against the sheriff. He focuses on the sheriffs refusal to renew his attorney identification card-which provides security-free access to the courthouse-and the sheriffs failure to comply with a subpoena duces tecum in Kowalskis divorce case to produce documents related to Judge Bolikers alleged machinations against Kowalski. Kowalskis briefs frame these actions as part of a broader effort to deprive him of his federal constitutional right to an impartial judge. He is apparently asserting that the sheriff was working to bolster Judge Bolikers claims that Kowalski posed a danger out of malice toward Kowalski and a desire to cover up Judge Bolikers alleged misconduct.
The district court dismissed Kowalskis complaint. Unfortunately, it did so before the date on which Kowalskis response to the sheriffs motion to dismiss was due and before having received that response. The court held that absolute judicial immunity barred Kowalskis claims against the judges. It also ruled that Judge Boliker could not be held liable for her communications with the court because she was a witness, Kowalski having subpoenaed her (unsuccessfully) to testify. As for the sheriff, the court concluded that he had not violated Kowalskis due process rights by denying the identification card, because Kowalski had neither a liberty nor property interest in the card. The court also opined that the Rooker - Feldman doctrine barred Kowalskis claim that the sheriff had violated his rights by failing to respond to his subpoena because the state court had quashed it. Finally, the court suggested in the alternative that it lacked jurisdiction to hear the entire case because of the domestic-relations exception to federal jurisdiction.
II
We assess de novo a suits dismissal for failure to state a claim or for want of subject-matter jurisdiction. Gogos v. AMS Mech. Sys., Inc. , 737 F.3d 1170, 1172 (7th Cir. 2013) ; Joyce v. Joyce, 975 F.2d 379, 382 (7th Cir. 1992). When doing so, we may affirm a dismissal on any ground supported by the record. Sykes v. Cook Cnty. Circuit Court Probate Div. , 837 F.3d 736, 740 (7th Cir. 2016) ; Giffin v. Summerlin , 78 F.3d 1227, 1230 (7th Cir. 1995). Three questions are before us with respect to jurisdiction: whether we lack appellate jurisdiction because the district courts dismissal was without prejudice; whether the district court lacked subject-matter jurisdiction under the Rooker - Feldman doctrine, see Rooker v. Fidelity Tr. Co. , 263 U.S. 413, 44 S.Ct. 149, 68 L.Ed. 362 (1923) ; D.C. Court of Appeals v. Feldman , 460 U.S. 462, 103 S.Ct. 1303, 75 L.Ed.2d 206 (1983) ; and whether it lacked subject-matter jurisdiction because of the so-called domestic-relations exception to federal competence.
A
We first consider whether lack of finality precludes appellate jurisdiction. A plaintiff generally may not appeal unless the district court has dismissed his case with prejudice. Taylor-Holmes v. Office of Cook Cnty. Pub. Guardian , 503 F.3d 607, 609-10 (7th Cir. 2007) ; Kaplan v. Shure Bros., Inc. , 153 F.3d 413, 417 (7th Cir.1998) ; see also 28 U.S.C. § 1291. That did not happen here. The district court stated that Kowalskis complaint was dismissed without prejudice and invited Kowalski to refile in the future if he obtained facts that support any of the claims he had made. At first glance, that statement appears fatal to Kowalskis appeal. Moreover, while we permit appellants to avoid this jurisdictional bar by stipulating that they will not refile their case, see Arrow Gear Co. v. Downers Grove Sanitary Dist. , 629 F.3d 633, 637 (7th Cir. 2010), Kowalski declined to do so during oral argument.
Nonetheless, the absence of a dismissal with prejudice does not always impede appellate review. Our fundamental concern is that the district courts order ends the suit so far as the district court is concerned. Taylor-Holmes , 503 F.3d at 610. Thus, if there is no amendment [a plaintiff] could reasonably be expected to offer to save the complaint following its dismissal, we may treat the dismissal as final and permit an appeal. Glaus v. Anderson , 408 F.3d 382, 386 (7th Cir. 2005). Here, the district court entered judgment in favor of the defendants, signaling that it had finished with Kowalskis case. While it invited Kowalski to file a new suit in the future if he obtained new evidence that supported his claims, it dismissed his complaint on legal grounds that make it difficult to imagine what kind of evidence it had in mind. Kowalski could not tweak his complaint and refile it. Cf . Arrow Gear Co. , 629 F.3d at 637. In reality, the invitation to refile was illusory. The district court was finished with this case, and so our appellate jurisdiction is secure.
Moreover, a dismissal for want of subject-matter jurisdiction is necessarily without prejudice because it does not preclude pursuit of the action in a different forum. T.W. by Enk v. Brophy, 124 F.3d 893, 898 (7th Cir. 1997). Such a dismissal is, however, appealable. S. Austin Coal. Cmty. Council v. SBC Commcns Inc., 191 F.3d 842, 844 (7th Cir. 1999). Therefore, to the extent that the district courts reasons for dismissing Kowalskis suit implicated its own subject-matter jurisdiction, we are free to entertain his appeal.
B
The first theory relating to subject-matter jurisdiction that the district court invoked was the Rooker - Feldman doctrine. Rooker - Feldman is confined, however, to cases brought by state-court losers complaining of injuries caused by state-court judgments rendered before the district court proceedings commenced and inviting district court review and rejection of those judgments. Exxon Mobil Corp. v. Saudi Basic Indus. Corp. , 544 U.S. 280, 284, 125 S.Ct. 1517, 161 L.Ed.2d 454 (2005). It does not apply independently to interlocutory orders. TruServ Corp. v. Flegles, Inc. , 419 F.3d 584, 591 (7th Cir. 2005). But see Harold v. Steel , 773 F.3d 884, 886 (7th Cir. 2014) (describing the issue as undecided in this circuit). In the present case, the state court had not rendered a judgment before the district court proceedings began. Therefore, Rooker - Feldman does not bar this case.
Moreover, even if Rooker - Feldman applied to interlocutory orders, the doctrine still would have no bearing on Kowalskis appeal because he has not asked us to reject any such order. Kowalski has disclaimed any attempt to challenge or circumvent the state courts decision to quash Kowalskis subpoena of the sheriff. He seeks not information from those defendants but rather damages for interference with his state proceeding.
C
That leaves the domestic-relations exception to federal jurisdiction. Although the present dispute arises out of a divorce and custody proceeding, that alone is not enough to trigger that exception. The exception covers a narrow range of domestic relations issues involving the granting of divorce, decrees of alimony, and child custody orders. Ankenbrandt v. Richards , 504 U.S. 689, 701-02, 112 S.Ct. 2206, 119 L.Ed.2d 468 (1992). It is materially identical to the probate exception. Struck v. Cook Cnty. Pub. Guardian , 508 F.3d 858, 859 (7th Cir. 2007). These exceptions apply to both federal-question and diversity suits. Jones v. Brennan , 465 F.3d 304, 306-07 (7th Cir. 2006) (probate exception); Allen v. Allen , 48 F.3d 259, 262 n.3 (7th Cir. 1995) (domestic relations exception). Both are construed narrowly, with a focus on the need to prevent federal courts from disturb[ing] or affect[ing] the possession of property in the custody of a state court. Marshall v. Marshall , 547 U.S. 293, 311, 126 S.Ct. 1735, 164 L.Ed.2d 480 (2006) (quoting Markham v. Allen , 326 U.S. 490, 494, 66 S.Ct. 296, 90 L.Ed. 256 (1946) ). They do[ ] not bar federal courts from adjudicating matters outside those confines. Id. at 312, 126 S.Ct. 1735.
The Supreme Court held in Marshall that a claim of tortious interference with expectancy did not trigger the probate exception. Id . at 314, 126 S.Ct. 1735. It stressed that the litigation s[ought] an in personam judgment ... not the probate or annulment of a will and, therefore, would not reach a res in the custody of a state court or determine a matter about which probate courts have particular expertise. Id . at 312, 126 S.Ct. 1735. Likewise, in Lloyd v. Loeffler , we concluded that a suit for tortious interference with child custody and conspiracy was not barred by the domestic-relations exception.
694 F.2d 489, 490 (7th Cir. 1982). Marshall and Lloyd point the way for our case. Kowalski seeks an in personam judgment against persons who allegedly interfered with his rights in a tortious manner. He does not seek to alter an in rem custody award or to undo a divorce decree. The fact that the alleged interference with Kowalskis rights occurred during a family-law proceeding does not require a different result. Kowalski complains of alleged attempts to curtail his procedural rights in family court, but he does not attack any application of Illinois family law.
Finally, Kowalskis suit differs fundamentally from the superficially similar case of Jones v. Brennan , 465 F.3d 304 (7th Cir. 2006). In Jones , the plaintiff alleged a conspiracy among probate judges and guardians to deprive her of property without due process of law in the course of probate proceedings, which were held first to manage her fathers estate during his senility and then to distribute it following his death. Id. at 305. The guardians allegedly had ex parte communications with the judges, mismanaged the estate, engaged in self-dealing, illegally searched the plaintiffs belongings, interfered with her relationship with her father, and hastened the fathers death through neglect. Id . The judge had denied the plaintiff notice and a hearing before appointing the problematic guardians. Id . Although we permitted some tort claims against the guardians for breach of their fiduciary duty to go forward, the probate exception applied to the extent that maladministration of her fathers estate by the ... probate court undergirded the plaintiffs claims. Id . at 307 (emphasis added). Thus, the plaintiff could not sue the guardians for depriving her of property without due process if the relevant acts were undertaken in the course of administering the estate. Id. Nor could the plaintiff complain that the guardians deprived her of a liberty interest in her relationship with her father if that deprivation was caused by a court order designed to prevent her from interfering with the probate proceedings. Id. at 308. Finally, she could not challenge their illegal search if it was conducted pursuant to a warrant issued by the probate court to facilitate administration of the estate. Id .
In contrast to the situation in Jones , Kowalski does not challenge any action taken by the court and its officers in the course of adjudicating his marriage or custody action. He complains only about outside actors who allegedly interfered in his case. We need not pass on the state courts application of family law in order to adjudicate Kowalskis case. The district court had jurisdiction over the case, and so we may turn to the merits.
III
The district court dismissed Kowalskis complaint before the date it had set for him to respond to the sheriffs motion to dismiss the claims against them. It should not have done so.
When a court dismisses a complaint sua sponte , it [i]s required to give [the plaintiff] notice of its intent to do so and an opportunity to respond. Stewart Title Guar. Co. v. Cadle Co. , 74 F.3d 835, 836 (7th Cir. 1996). A failure to follow these steps deprives the litigant of his day in court, denies the judge the benefit of the litigants analysis, and tend[s] to transform the district court into a proponent rather than an independent entity. Id . (quoting Horn v. City of Chicago , 860 F.2d 700, 703 n.6 (7th Cir. 1988) ). Although we have recognized a narrow exception for dismissals of certain patently frivolous attempts to invoke federal jurisdiction, English v. Cowell , 10 F.3d 434, 437 (7th Cir. 1993), Kowalskis case did not fall within that narrow class of suits. The fact that the district court did not act sua sponte , but instead acted upon defendants motions to dismiss and with the benefit of defendants arguments, is even more troubling. The dismissal of a complaint before the deadline set for a plaintiffs response is normally, and was here, an error, Uni*Quality, Inc. v. Infotronx, Inc. , 974 F.2d 918, 924 (7th Cir. 1992).
A premature dismissal often will require a remand to provide the plaintiff with an opportunity to develop and present a defense of his complaint to the district court. See Stewart Title Guar. Co. , 74 F.3d at 836-37. Nonetheless, the normal rules of harmless error apply. See FED. R. CIV. P. 61 ; English , 10 F.3d at 438 ; Stewart Title Guar. Co. , 74 F.3d at 837 ; Uni*Quality, Inc. , 974 F.2d at 924. A premature ruling may be harmless when the district court is found to have entertained the non-movants arguments on a prior or subsequent motion. English , 10 F.3d at 438. Likewise, the district court may neutralize its error if it has carefully considered a plaintiffs detailed motion to amend the judgment and for leave to amend its complaint and the plaintiff had enjoyed ample opportunity to make its arguments both in the district court and on appeal. Uni*Quality, Inc. 974 F.2d at 924.
Although Kowalski did not have another opportunity to present his position to the district court, we do know precisely what Kowalski intended to argue because he timely filed his brief after the district court had ruled. That brief is part of the record, and its arguments match those that Kowalski has presented on appeal. No one has argued that Kowalski has waived any of these arguments nor would we accept such an argument given the course of events. Thus, we can consider all of Kowalskis arguments as part of our de novo assessment of the legal sufficiency of his complaint. The district courts premature ruling was, therefore, harmless.
IV
Turning to the merits of Kowalskis underlying complaint, we begin by addressing whether absolute immunity precludes Kowalskis suit against either Judge Boliker or Judge Dickler. We conclude that Judge Boliker cannot claim the protection of judicial immunity but that Judge Dicklers alleged actions fall within its scope. We reject Judge Bolikers assertion of witness immunity.
A
Judge Boliker opens with the assertion that she is entitled to judicial immunity because she was acting to ensure the security and integrity of the court. That strikes us as a step too far. Although judicial immunity is broad, it is not limitless. A judge does not enjoy immunity if he or she is acting in the clear absence of all jurisdiction, Stump v. Sparkman , 435 U.S. 349, 357, 98 S.Ct. 1099, 55 L.Ed.2d 331 (1978) (quoting Bradley v. Fisher , 80 U.S. 335, 351, 13 Wall. 335, 20 L.Ed. 646 (1871) ), rather than simply in excess of [the judges] authority, id . at 356, 98 S.Ct. 1099. A judge is also amenable to suit for non-judicial acts. Id . at 360-62, 98 S.Ct. 1099. Both exceptions to immunity apply here.
First, Judge Boliker acted in the clear absence of jurisdiction. We assume that she may have immunity in cases arising out of security measures she took in her own court or in connection with one of her own cases. Judge Boliker, however, gratuitously inserted herself into a case proceeding before another judge. She had no authority to control that colleagues case. That is a real problem for her: we have looked for at least a modicum of authority over matters arising from a case as a prerequisite for judicial immunity.
For example, in Dellenbach v. Letsinger , a judge accused of ex parte attempts to block an appeal pending the purchase of duplicate trial transcripts had already entered final judgment and therefore had technically lost jurisdiction to the appellate court. 889 F.2d 755, 757, 760 (7th Cir. 1989). In nonetheless affording the judge immunity, we emphasized that he had at most acted in excess of his jurisdiction by blocking the appeal in a criminal matter tried in his court. Id . at 760. He had at least had jurisdiction and could reasonably believe that he retained some control over the case. Id . The case of Bradley v. Fisher , 80 U.S. 335, 13 Wall. 335, 20 L.Ed. 646 (1871), also helps to illustrate where the lines are drawn. In Bradley , the attorney for a criminal defendant accosted his clients judge after trial recessed one day, complaining about comments the judge had made from the bench. After the jury was discharged, the judge disbarred the offending attorney, who then sued the judge. The Supreme Court held that the judges action had been undertaken in the lawful exercise and performance of his authority and duty as [the] presiding justice. Id. at 346-47. The judge thus enjoyed immunity for his actions. In contrast to Dellenbach and Bradley , Kowalskis complaint against Judge Boliker centers on her interference in a case to which she was never assigned and over which she had no responsibility. Judge Boliker cannot assert judicial immunity over matters so far removed from matters under her jurisdiction.
Judge Bolikers intervention in Kowalskis trial was likewise an unprotected non-judicial act. Judicial acts are distinct from the administrative, legislative, or executive functions that judges may on occasion be assigned by law to perform. Forrester v. White , 484 U.S. 219, 226, 108 S.Ct. 538, 98 L.Ed.2d 555 (1988). Selection of jurors, promulgating rules of professional conduct, enforcement of those rules, and personnel decisions all fall on the non-judicial side of this divide. Id . at 228-29, 108 S.Ct. 538. In assessing the judicial nature of an action, we consider whether it is a function normally performed by a judge and the expectations of the parties, i.e. , whether they dealt with the judge in his judicial capacity. Stump , 435 U.S. at 362, 98 S.Ct. 1099. We have also asked whether the act involves the exercise of discretion or judgment, or is rather a ministerial act which might as well have been committed to a private person as to a judge. Dawson v. Newman , 419 F.3d 656, 661 (7th Cir. 2005) (quoting Lowe v. Letsinger , 772 F.2d 308, 312 (7th Cir. 1985) ). Finally, we have cautioned against liberally categorizing acts as judicial, requiring that they involve the judicial process so that a fear exists that freedom of judicial decisionmaking may be stifled. McMillan v. Svetanoff , 793 F.2d 149, 154 (7th Cir. 1986). Judge Bolikers interference in Kowalskis trial does not qualify as judicial from any of these perspectives.
Lopez v. Vanderwater , 620 F.2d 1229 (7th Cir. 1980), provides a helpful analogy to Kowalskis case. Lopez held that a judge acted judicially despite having maliciously, corruptly, and illegally arraigned, convicted, and sentenced his former tenant in an irregular court consisting only of himself. Id . at 1234. But the judge was not entirely off the hook. To the extent that he had acted as a prosecutor-by selecting the charge, preparing a Notice to Appear, securing the preparation of a complaint form, forging a guilty plea and jury-trial waiver, and then presenting them to himself as judge-he could not claim judicial immunity. Id . at 1235. Judge Bolikers intervention in Kowalskis case looks more like that of a party or investigator than a judge. She was a potential witness in the case, and her lawyer actively tried to thwart Kowalskis motion for substitution. These actions had nothing to do with Judge Bolikers judicial decision-making function. She was allegedly acting as an advocate for her close friend.
Judge Boliker cites only one case, Barrett v. Harrington , 130 F.3d 246 (6th Cir. 1997), to support her argument to the contrary. In Barrett , a judge received immunity for writing a letter to prosecutors that triggered the criminal investigation of a litigant. 130 F.3d at 259. There the similarities end. The Sixth Circuit admitted that the instigation of a criminal investigation by the filing of a complaint [was] not itself a paradigmatic judicial act. Id . at 257. Nonetheless, the judges letter qualified for immunity because it responded to harassment from a litigant who aimed to force the judge to recuse herself, undoubtedly an act that concerns judicial decision-making. Id . at 258. A direct relational nexus linked the judges judicial decisions, the litigants harassment of the judge, and the judges ultimate response in contacting the prosecuting attorneys. Id . at 259. Thus, the court held that when a judge reasonably perceives a threat to himself or herself arising out of the judges adjudicatory conduct, the judges response, be it a letter to a prosecutor or a call to the Marshalls office for security, is a judicial act within the scope of judicial immunity. Id . In contrast to Barrett , Judge Boliker had never adjudicated a case involving Kowalski nor did she expect to. Even according to Judge Boliker, the conflict between them arose out of personal matters: Kowalski accused her of ruining his marriage as the BFF of Kowalskis wife. Her involvement in the case-and the alleged threats against her-had nothing to do with her judicial role.
B
Unlike Judge Boliker, Judge Dickler acted neither in the clear absence of jurisdiction nor in a non-judicial capacity. This court has rejected the argument that a chief judge acts without jurisdiction when overseeing or directing the business of the court. See Dellenbach , 889 F.2d at 760-61. For example, the chief judge in Dellenbach did not act in the absence of jurisdiction when he blocked an appeal assigned to other judges until the appellant paid transcript fees to the trial court because control of a docket is a key function to the proper workings of a court. Id . at 760. Similarly, Judge Dickler directed a motion to her colleague for resolution, keeping him apprised of relevant information that came to her attention as president of the family division. Her communiqué also served as an official notice from the court, akin to an order or docket entry, to all parties interested in the case. She acted within the bounds of her judicial role as presiding judge.
Likewise, forwarding the letter to Kowalskis assigned judge and the parties to his case qualified as a judicial act. A judge can be expected to circulate an ex parte communication to all relevant parties. In fact, the Cook County Circuit Court requires a judge to disclose such communications if received in connection with any matter pending before the judge. COOK COUNTY CIRCUIT COURT, COURT RULES , R. 17.2. Although the rule did not oblige Judge Dickler as president of the family division to disclose the communications, her disclosure could hardly be described as non-judicial when it mirrored that which was required of judges in other contexts. Judge Dickler is thus immune from suit.
C
We also conclude that Judge Boliker cannot take advantage of witness immunity.
Our primary reason is waiver: she failed to present this defense to the district court, and we will not affirm a judgment based on an affirmative defense raised for the first time on appeal. McDonald v. Adamson , 840 F.3d 343, 347 (7th Cir. 2016).
Even if she had raised it below, the defense would fail. Witnesses enjoy absolute immunity to ensure that they testify truthfully without fear of reprisal. Canen v. Chapman , 847 F.3d 407, 415 (7th Cir. 2017). The scope of their immunity is broadly construed to include preparation of testimony, id ., testimony at pretrial proceedings, Curtis v. Bembenek , 48 F.3d 281, 285 (7th Cir. 1995), depositions, and affidavits, Giffin v. Summerlin , 78 F.3d 1227, 1230 (7th Cir. 1995). Witness immunity even covers out-of-court conspiracies to present false testimony-at least with respect to the individual who will present the testimony. House v. Belford , 956 F.2d 711, 720-21 (7th Cir. 1992).
Had Judge Boliker appeared at her deposition or testified at the show-cause hearing and there impugned Kowalskis character, he could not have sued her over those statements. Yet that did not happen: she was never deposed, and she never testified. Kowalskis entire complaint centers on her submitting information to the court in an ad hoc and irregular fashion, rather than as a witness. For example, rather than testify or submit evidence at her show-cause hearing, Judge Boliker had her counsel submit the Secret Letter as a so-called courtesy copy and represent-in an unsworn conversation-that Kowalski was a security threat. Later, she again relied on the courtesy copy procedure to submit materials to the court. That will not do: she cannot simultaneously evade offering proper testimony and claim the protections afforded to those who testify.
V
Although we have ruled in part for Kowalski on the immunity questions, this is of no avail if his complaint fails to state a claim. In order to survive a motion to dismiss, the complaints well-pleaded factual allegations [must] plausibly give rise to an entitlement of relief. Silha v. ACT, Inc. , 807 F.3d 169, 174 (7th Cir. 2015) (quoting Ashcroft v. Iqbal, 556 U.S. 662, 679, 129 S.Ct. 1937, 173 L.Ed.2d 868 (2009) ). A threshold requirement under section 1983 is the existence of a right secured by the Constitution and laws. Baker v. McCollan 443 U.S. 137, 140, 99 S.Ct. 2689, 61 L.Ed.2d 433 (1979) (quotation marks omitted). In order to state a claim under the Due Process Clause, Kowalski must allege a deprivation of protected liberty or property interests. Bd. of Regents of State Colls. v. Roth , 408 U.S. 564, 571, 92 S.Ct. 2701, 33 L.Ed.2d 548 (1972) ; LaBella Winnetka, Inc. v. Vill. of Winnetka , 628 F.3d 937, 943-44 (7th Cir. 2010).
That is where Kowalskis section 1983 claim stumbles. Admittedly, the Supreme Court has treated a parents interest in child custody as a form of liberty interest for purposes of Mathews v. Eldridge , 424 U.S. 319, 96 S.Ct. 893, 47 L.Ed.2d 18 (1976), and has described the termination of custody as a unique kind of deprivation in which the parent has a commanding interest. Lassiter v. Dept of Soc. Servs. of Durham Cnty. , 452 U.S. 18, 27, 101 S.Ct. 2153, 68 L.Ed.2d 640 (1981). Kowalski therefore has a right to due process before an adverse decision in his custody case, which presumably includes a right to an impartial judge. See Goldberg v. Kelly , 397 U.S. 254, 271, 90 S.Ct. 1011, 25 L.Ed.2d 287 (1970). Yet as things stand, Kowalski has not alleged that he suffered any adverse consequences to his parental (or other) rights as a result of his allegedly prejudiced judge. Therefore, Kowalskis section 1983 claim cannot proceed.
Nor does section 1985 cover Kowalskis situation. In relevant part, section 1985(2) bars conspir[acies] for the purpose of impeding, hindering, obstructing, or defeating, in any manner, the due course of justice in any State or Territory, with intent to deny to any citizen the equal protection of the laws. 42 U.S.C. § 1985(2). A plaintiff must allege class-based animus to state a claim for denial of access to state courts under section 1985(2). Wright v. Ill. Dept of Children & Family Servs. , 40 F.3d 1492, 1508 (7th Cir. 1994). Kowalski never asserted that any of the defendants targeted him because of his membership in a class-protected or otherwise. The district court thus correctly dismissed his section 1985 claim.
Kowalski faces a similar roadblock under section 1985(3), which requires the complaint to assert four elements:
[T]he defendants did (1) conspire or go in disguise on the highway or on the premises of another (2) for the purpose of depriving, either directly or indirectly, any person or class of persons of the equal protection of the laws, or of equal privileges and immunities under the laws. ... [O]ne or more of the conspirators (3) did, or caused to be done, any act in furtherance of the object of [the] conspiracy, whereby another was (4a) injured in his person or property or (4b) deprived of having and exercising any right or privilege of a citizen of the United States.
Griffin v. Breckenridge , 403 U.S. 88, 102-03, 91 S.Ct. 1790, 29 L.Ed.2d 338 (1971) (quoting 42 U.S.C. § 1985(3) ) (alteration in original). To satisfy the second element, the complaint must allege some racial, or perhaps otherwise class-based, invidiously discriminatory animus behind the conspirators action. Id . at 102, 91 S.Ct. 1790. Kowalskis complaint has not done so. Therefore, to the extent that he attempts to invoke section 1985(3), he has not stated a valid claim.
We AFFIRM the district courts dismissal of Kowalskis suit, which we modify to be a dismissal with prejudice.