Skip to main content
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.

Create a config

POST /developer/configs Creates a new config with charity beneficiaries. At least one beneficiary is required.
curl -X POST https://www.donate.gg/api/v1/developer/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
charityBeneficiariesarrayOne or more charity beneficiaries with weights
charityBeneficiaries[].charityIdstringID of a verified charity
charityBeneficiaries[].weightintegerRelative weight, must be greater than 0
Response 201
{
  "id": "0x1234...abcd",
  "charities": [
    { "id": "charity_abc", "name": "American Red Cross", "weight": "60", "wallets": [...] },
    { "id": "charity_def", "name": "UNICEF", "weight": "40", "wallets": [...] }
  ],
  "users": []
}
The returned id is a bytes32 hex string. Use this as the config ID in your on-chain transactions. 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 /developer/configs Returns a paginated list of all configs created by your developer account.
curl https://www.donate.gg/api/v1/developer/configs \
  -H "donate-api-key: YOUR_API_KEY"
Query parameters
ParameterTypeDefaultDescription
limitinteger50Results per page, max 200
cursorstring-Cursor from previous pageKey for next page
includeTotal"true" | "false""false"Include total count in response
Response
{
  "pageKey": "next_cursor_string",
  "total": 3,
  "response": [
    {
      "id": "0x1234...abcd",
      "charities": [
        { "id": "charity_abc", "slug": "red-cross", "name": "American Red Cross", "logo": "https://...", "website": "https://redcross.org", "weight": "60" },
        { "id": "charity_def", "slug": "unicef", "name": "UNICEF", "logo": "https://...", "website": "https://unicef.org", "weight": "40" }
      ],
      "users": []
    }
  ]
}

Get a config by ID

GET /developer/configs/{configId} Returns a single config with its beneficiaries and charity wallet addresses.
curl https://www.donate.gg/api/v1/developer/configs/0x1234...abcd \
  -H "donate-api-key: YOUR_API_KEY"
Path parameters
ParameterDescription
configIdThe config ID (bytes32 hex)
Error responses
StatusCodeDescription
404NOT_FOUNDNo config found with the given ID