Skip to main content
Authenticate with your project’s API key in the donate-api-key header.
API keys explains how to get one.

When you need a key

A key is required when an operation acts for your project or reads what belongs to it. Everything else is a public read. Send the key on a public read too: the call then counts against your organization’s rate limit instead of the 20 a minute an IP address gets. An integration that runs on your backend sends it on every call. The three reads about your own things answer for your project only. A config of another project answers 403 with FORBIDDEN on its stats and donors, and a donation source of another project answers 404.

Call from your server

The API accepts browser requests from Donate’s own sites only. A request from a page on your domain is blocked by CORS whether or not it carries a key. Make every call from your server, and never put the key in code that runs on someone else’s device.

When authentication fails

A missing key and a key that is not valid are the same answer: 401 with UNAUTHENTICATED.
Two details to know:
  • A key that is not valid fails a public read too. If you send a key, it must be valid.
  • A path that does not exist is 404, not 401. A mistyped path answers ROUTE_NOT_FOUND with or without a key, so a 401 always means the key.
Errors lists every code. v1 answers a missing key with 400 MISSING_API_KEY and a wrong one with 403 INVALID_API_KEY; see Errors on v1.

Runnable check