DaffodilAPI

Errors

One machine-readable error format, with a stable code for every failure.

Every error is an RFC 9457 problem details object, sent with content type application/problem+json and an HTTP status of 400 or above.

{
  "type": "https://getdaffodil.com/docs/api/errors#invalid_cursor",
  "title": "Invalid cursor",
  "status": 400,
  "detail": "This cursor belongs to a different search.",
  "code": "invalid_cursor",
  "param": "cursor",
  "request_id": "req_8fZ3kQ1xV4Jd0d2b8vW3kq"
}
FieldDescription
typeA link to this page, at the entry for the error's code.
titleA short summary of the error. The same for every error with this code.
statusThe HTTP status code.
detailWhat went wrong with this request, written for a developer. It may change; do not parse it.
codeA stable, machine-readable error code from the list below. Branch on this.
paramThe request parameter at fault, when there is one. For a body field this is its path, such as address.postal_code.
request_idThe same value as the Request-Id response header. Quote it when you contact Daffodil.

Codes are never renamed or reused. New failures get new codes, so handle codes you do not recognize by their HTTP status.

400 Bad Request

invalid_request

The request failed validation: a parameter, header, or body field is missing, has the wrong type, or is out of range. param names the first field at fault, and detail says what is wrong with it. A write without an Idempotency-Key gets this code with param set to idempotency-key. Fix the request before you retry.

invalid_cursor

The cursor was not issued for this list, or it was issued for the same list with different filters. Start again from the first page, without a cursor, or reuse the filters that produced it.

401 Unauthorized

api_key_missing

The request has no Authorization header, or the header is not Bearer dfl_…. See Authenticate.

api_key_invalid

No API key matches the one you sent. Check that you copied the whole key.

api_key_revoked

The key was revoked. An Admin can create a new one under Settings → API Keys in Mission Control.

api_key_environment_mismatch

The key belongs to the other environment. Use a dfl_live_ key with api.getdaffodil.com and a dfl_test_ key with sandbox.api.getdaffodil.com.

403 Forbidden

api_not_enabled

The Platform API is not turned on for your Account. Contact Daffodil.

insufficient_scope

The key is read-only, and the request would make a change. Use a full-access key for writes.

entitlement_limit

Your Account has used every Personal fund seat it has. Creating a Donor opens a Personal fund, so it needs a free seat. Contact Daffodil to add seats.

For a Campaign, your Account has as many live and paused Campaigns as its limit allows, or does not have Campaigns turned on. param is status when the limit is the reason. End a live or paused Campaign, or contact Daffodil to raise the limit. A Campaign on a Personal fund never counts toward the limit.

personal_fund_campaigns_not_enabled

The Campaign would raise into a Personal fund, and your Account does not have Personal fund campaigns turned on. param is fund_id. Raise into a Shared fund, or contact Daffodil to turn Personal fund campaigns on.

A Checkout Session with no donor_id gets this code when it would pay a Public contributor's Contribution into a Personal fund, and your Account does not have Personal fund campaigns turned on. param is fund_id, or campaign_id when the Campaign raises into a Personal fund.

404 Not Found

not_found

The route does not exist, or the object does not exist in your Account and environment. Check the path and the ID's prefix.

409 Conflict

The request is valid, but the current state of a record does not allow it. Retrying the same request will not help until that state changes.

external_id_taken

Another Donor or Fund in your Account already has this external_id. Look the record up by external_id instead of creating it again.

fund_not_empty

The Fund still has a balance, pending Grants, money on its way in, or a live Campaign or RFP, so it cannot be closed. Money in a Fund is granted out, never returned. The detail says what is left.

insufficient_funds

The amount is more than the Fund has available: its cash less any Holds for pending Grants.

fund_negative

The Fund's balance is below zero, after a Contribution was reversed. It cannot recommend a Grant or give to a Campaign until new Contributions bring it above zero.

donor_not_advisor

The Donor does not advise the Fund, so cannot recommend its Grants, pay into it through a Checkout Session, give from it to a Campaign, or have a Campaign raise into it for them. A Donor advises a Personal Fund they own, or a Shared Fund where they have the advise permission.

nonprofit_not_grantable

The nonprofit cannot receive a Grant. Its grantable is false in Search nonprofits.

grant_not_cancelable

The Grant can no longer be canceled. A Donor can cancel a Grant only until it is approved. A Grant your staff made in Mission Control (donor_id is null) can be canceled only by them, there.

campaign_own_fund

The Contribution would move money from a Fund into a Campaign that raises into that same Fund.

contribution_not_pending

Only a pending Contribution can be settled or failed with the Sandbox helpers. This one is already succeeded, failed, or reversed.

slug_taken

Another Campaign in your Account already uses this slug. Choose another.

422 Unprocessable Content

idempotency_key_reused

This Idempotency-Key was already used with a different request body. Each operation needs its own key. See Idempotency.

429 Too Many Requests

rate_limited

The key went over one of its rate limits. Wait the number of seconds in the Retry-After header, then retry.

500 Internal Server Error

internal_error

Something went wrong on Daffodil's side. Retry with backoff; for a write, send the same Idempotency-Key so it cannot happen twice. If it persists, contact Daffodil and quote the request_id.

501 Not Implemented

not_implemented

The route is part of the published v1 contract but is not live yet. Its request and response shapes are final, so you can build against them now. The changelog announces each route as it goes live.

503 Service Unavailable

service_unavailable

Daffodil could not confirm something with Stripe or its bank right now, such as when closing a Fund. Nothing changed. Retry after a minute with the same Idempotency-Key: a 503 is not stored, so the retry is a fresh attempt.