Whether a tax-exempt organization may endorse candidates for public office without jeopardizing its tax-exempt status depends upon the type of tax-exempt organization it is. For example, § 501(c)(3) organizations may not engage in political activity, including endorsing candidates, but other organizations, such as § 501(c)(4) organizations, may engage in political activity so long as that is not their primary activity. However, § 501(c) organizations that make expenditures for political activity may be subject to tax under § 527(f).

See also…

Nonprofit Law and Fundraising