26 USC 7428 - Declaratory judgments relating to status and classification of organizations under section 501(c)(3), etc.

(a) Creation of remedy 
In a case of actual controversy involving
(1) a determination by the Secretary
(A) with respect to the initial qualification or continuing qualification of an organization as an organization described in section 501 (c)(3) which is exempt from tax under section 501 (a) or as an organization described in section 170 (c)(2),
(B) with respect to the initial classification or continuing classification of an organization as a private foundation (as defined in section 509 (a)),
(C) with respect to the initial classification or continuing classification of an organization as a private operating foundation (as defined in section 4942 (j)(3)), or
(D) with respect to the initial classification or continuing classification of a cooperative as an organization described in section 521 (b) which is exempt from tax under section 521 (a), or
(2) a failure by the Secretary to make a determination with respect to an issue referred to in paragraph (1),

upon the filing of an appropriate pleading, the United States Tax Court, the United States Court of Federal Claims, or the district court of the United States for the District of Columbia may make a declaration with respect to such initial qualification or continuing qualification or with respect to such initial classification or continuing classification. Any such declaration shall have the force and effect of a decision of the Tax Court or a final judgment or decree of the district court or the Court of Federal Claims, as the case may be, and shall be reviewable as such. For purposes of this section, a determination with respect to a continuing qualification or continuing classification includes any revocation of or other change in a qualification or classification.

(b) Limitations 

(1) Petitioner 
A pleading may be filed under this section only by the organization the qualification or classification of which is at issue.
(2) Exhaustion of administrative remedies 
A declaratory judgment or decree under this section shall not be issued in any proceeding unless the Tax Court, the Court of Federal Claims, or the district court of the United States for the District of Columbia determines that the organization involved has exhausted administrative remedies available to it within the Internal Revenue Service. An organization requesting the determination of an issue referred to in subsection (a)(1) shall be deemed to have exhausted its administrative remedies with respect to a failure by the Secretary to make a determination with respect to such issue at the expiration of 270 days after the date on which the request for such determination was made if the organization has taken, in a timely manner, all reasonable steps to secure such determination.
(3) Time for bringing action 
If the Secretary sends by certified or registered mail notice of his determination with respect to an issue referred to in subsection (a)(1) to the organization referred to in paragraph (1), no proceeding may be initiated under this section by such organization unless the pleading is filed before the 91st day after the date of such mailing.
(4) Nonapplication for certain revocations 
No action may be brought under this section with respect to any revocation of status described in section 6033 (j)(1).
(c) Validation of certain contributions made during pendency of proceedings 

(1) In general 
If
(A) the issue referred to in subsection (a)(1) involves the revocation of a determination that the organization is described in section 170 (c)(2),
(B) a proceeding under this section is initiated within the time provided by subsection (b)(3), and
(C) either
(i) a decision of the Tax Court has become final (within the meaning of section 7481), or
(ii) a judgment of the district court of the United States for the District of Columbia has been entered, or
(iii) a judgment of the Court of Federal Claims, has been entered, and such decision or judgment, as the case may be, determines that the organization was not described in section 170 (c)(2),

then, notwithstanding such decision or judgment, such organization shall be treated as having been described in section 170 (c)(2) for purposes of section 170 for the period beginning on the date on which the notice of the revocation was published and ending on the date on which the court first determined in such proceeding that the organization was not described in section 170 (c)(2).

(2) Limitation 
Paragraph (1) shall apply only
(A) with respect to individuals, and only to the extent that the aggregate of the contributions made by any individual to or for the use of the organization during the period specified in paragraph (1) does not exceed $1,000 (for this purpose treating a husband and wife as one contributor), and
(B) with respect to organizations described in section 170 (c)(2) which are exempt from tax under section 501 (a) (for this purpose excluding any such organization with respect to which there is pending a proceeding to revoke the determination under section 170 (c)(2)).
(3) Exception 
This subsection shall not apply to any individual who was responsible, in whole or in part, for the activities (or failures to act) on the part of the organization which were the basis for the revocation.
(d) Subpoena power for district court for District of Columbia 
In any action brought under this section in the district court of the United States for the District of Columbia, a subpoena requiring the attendance of a witness at a trial or hearing may be served at any place in the United States.