Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.donate.gg/llms.txt

Use this file to discover all available pages before exploring further.

A config is the central concept in the Donate.gg Developer API. It defines a set of charity beneficiaries and how donations are split between them. When a donation is made on-chain, the config ID determines where funds go. Each charity in a config has a weight that determines its share. Weights are relative: a charity with weight 2 receives twice as much as one with weight 1. Config IDs are returned as { "hex": string, "base58": string }. The hex form is the on-chain bytes32; the base58 form is a Solana-friendly encoding of the same value.

Create a config

POST /configs Creates a new config with charity beneficiaries. At least one beneficiary is required, and at most 5 beneficiaries are allowed.
curl -X POST https://www.donate.gg/api/v1/configs \
  -H "donate-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "charityBeneficiaries": [
      { "charityId": "charity_abc", "weight": 60 },
      { "charityId": "charity_def", "weight": 40 }
    ]
  }'
Request body
FieldTypeDescription
charityBeneficiariesarray1–5 charity beneficiaries with weights
charityBeneficiaries[].charityIdstringID of a verified charity
charityBeneficiaries[].weightintegerRelative weight, must be greater than 0
Response 201
{
  "id": { "hex": "0x1234...abcd", "base58": "3xYz..." },
  "charities": [
    {
      "id": "charity_abc",
      "slug": "red-cross",
      "name": "American Red Cross",
      "logo": "https://...",
      "website": "https://redcross.org",
      "address": "431 18th St NW",
      "blog": "https://example.com",
      "twitter": "redcross",
      "facebook": "redcross",
      "instagram": "redcross",
      "linkedin": "redcross",
      "youtube": "redcross",
      "city": "Washington",
      "state": "DC",
      "country": "US",
      "zipCode": "20006",
      "taxId": "53-0196605",
      "isEnabled": true,
      "isVerified": true,
      "weight": "60"
    }
  ],
  "users": []
}
Weights in responses are strings to preserve full precision for values beyond Number.MAX_SAFE_INTEGER.
Error responses
StatusCodeDescription
400VALIDATION_ERRORMissing or invalid fields
400CHARITY_NOT_FOUNDOne or more charity IDs don’t exist
400DUPLICATE_CHARITY_IDSThe same charity appears more than once
400INVALID_JSONRequest body is not valid JSON

List configs

GET /configs Returns a paginated list of all configs created by your developer account.
curl https://www.donate.gg/api/v1/configs \
  -H "donate-api-key: YOUR_API_KEY"
Query parameters
ParameterTypeDefaultDescription
limitinteger50Results per page, max 200
cursorstring-Cursor from previous pageKey for next page
Response
{
  "pageKey": "next_cursor_string",
  "response": [
    {
      "id": { "hex": "0x1234...abcd", "base58": "3xYz..." },
      "charities": [
        {
          "id": "charity_abc",
          "slug": "red-cross",
          "name": "American Red Cross",
          "weight": "60",
          "...": "other charity fields"
        }
      ],
      "users": []
    }
  ]
}

Get a config by ID

GET /configs/{configId} Returns a single config with its beneficiaries and aggregate donation stats.
curl https://www.donate.gg/api/v1/configs/0x1234...abcd \
  -H "donate-api-key: YOUR_API_KEY"
Path parameters
ParameterDescription
configIdThe config ID (hex string)
Response
{
  "id": { "hex": "0x1234...abcd", "base58": "3xYz..." },
  "charities": [
    {
      "id": "charity_abc",
      "slug": "red-cross",
      "name": "American Red Cross",
      "weight": "60",
      "...": "other charity fields"
    }
  ],
  "users": [],
  "stats": {
    "channels": {
      "1": { "0xA0b8...": "1000000000000000000" },
      "900": { "So11...": "500000000" }
    },
    "usdDonatedE6": "150000000",
    "donationCount": "42",
    "firstDonationDate": "2025-01-15T12:00:00.000Z",
    "lastDonationDate": "2026-04-20T18:30:00.000Z"
  }
}
The stats object includes:
FieldTypeDescription
channelsobject{ [chainId]: { [tokenAddress]: totalGrossAtomicVolume } }
usdDonatedE6stringTotal USD donated × 10^6
donationCountstringTotal number of donations
firstDonationDatestring | nullISO 8601 timestamp of first donation, or null
lastDonationDatestring | nullISO 8601 timestamp of most recent donation, or null
Error responses
StatusCodeDescription
404NOT_FOUNDNo config found with the given ID

Delete a config

DELETE /configs/{configId} Deletes a config. Returns 204 No Content on success with an empty body.
curl -X DELETE https://www.donate.gg/api/v1/configs/0x1234...abcd \
  -H "donate-api-key: YOUR_API_KEY"
Path parameters
ParameterDescription
configIdThe config ID (hex string)
Configs that have existing donations or linked entities (e.g. partner contracts) cannot be deleted.
Error responses
StatusCodeDescription
404NOT_FOUNDConfig not found
403FORBIDDENYou do not own this config
409HAS_DONATIONSConfig has existing donations and cannot be deleted
409HAS_LINKED_ENTITIESConfig has linked entities and cannot be deleted