Quickstart
Get an API key, authenticate with it, and make your first call, a nonprofit search.
You need a Daffodil Account with the Platform API turned on. Daffodil turns it on for Platform partners; contact us if your Account does not have it yet.
Get an API key
An Admin on your Account creates keys in Mission Control, under Settings → API Keys.
- Select Create key and give the key a name you will recognize later, such as
Nightly reconciliation. - Choose its access:
- Read only: search nonprofits and read records. It cannot make changes.
- Full access: everything the API offers, including creating records.
- Copy the key. It is shown only once. Daffodil stores only a hash of it, so a lost key cannot be recovered; revoke it and create a new one.
The prefix tells you which environment a key belongs to:
dfl_live_…works only in production, against real money.dfl_test_…works only in the Sandbox, atsandbox.api.getdaffodil.com. Create test keys from Mission Control in the Sandbox.
Keep keys on your server. Never put one in a browser, a mobile app, or source control. The API Keys page shows when each key was last used, and you can revoke any key there.
Authenticate
Send the key as a Bearer token in the Authorization header of every request:
Authorization: Bearer dfl_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXA request without a valid key gets a 401 with a problem response. The code tells you why: api_key_missing, api_key_invalid, api_key_revoked, or api_key_environment_mismatch when a dfl_live_ key reaches the Sandbox or a dfl_test_ key reaches production.
Search nonprofits
Search the Nonprofit database by name or EIN. Store your key in an environment variable first:
export DAFFODIL_API_KEY=dfl_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXcurl --get https://sandbox.api.getdaffodil.com/v1/nonprofits \
--header "Authorization: Bearer $DAFFODIL_API_KEY" \
--data-urlencode "q=food bank" \
--data-urlencode "limit=5"const url = new URL('https://sandbox.api.getdaffodil.com/v1/nonprofits');
url.search = new URLSearchParams({ q: 'food bank', limit: '5' }).toString();
const res = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.DAFFODIL_API_KEY}` },
});
const page = await res.json();import os
import requests
res = requests.get(
"https://sandbox.api.getdaffodil.com/v1/nonprofits",
params={"q": "food bank", "limit": 5},
headers={"Authorization": f"Bearer {os.environ['DAFFODIL_API_KEY']}"},
)
page = res.json()The response is a list, best match first:
{
"data": [
{
"id": "np_1Q6xV4Jd0d2b8vW3kq1t9Z",
"ein": "12-3456789",
"name": "Example Community Food Bank",
"city": "Springfield",
"state": "IL",
"grantable": true
}
],
"has_more": true,
"next_cursor": "eyJxIjoiZm9vZCBiYW5rIiwib2Zmc2V0Ijo1fQ"
}Check grantable before you offer a nonprofit to a Donor. It is false only for nonprofits Daffodil records with no US tax exemption, which cannot receive a Grant. To get the next page, repeat the same search with cursor set to next_cursor.
Next steps
- Read the conventions every route follows: amounts, IDs, pagination, idempotency, and rate limits.
- Learn the error format so your code can branch on
code. - Browse the reference, or Download openapi.json to generate a client.