> ## 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.

# Donation Configs

> Inspect and delete donation configs by ID

<Badge icon="shield" color="blue" shape="pill">
  Requires <span style={{ color: '#1D4ED8', fontWeight: '800' }}>core</span> scope
</Badge>

A **config** defines a set of charity beneficiaries and how donations are split between them.

Use the Partner API to [create and list configs](/partner-api/donation-configs), and to fetch [config stats](/partner-api/config-stats) or the [config donor leaderboard](/partner-api/config-leaderboard). Use this Core API page to inspect or delete an existing config by ID.

Config IDs are returned as `{ "hex": string, "base58": string }`. `hex` is the on-chain `bytes32`. `base58` is the same value encoded for Solana. Either form works in path parameters.

***

## Get a config by ID

`GET /configs/{configId}`

Returns a single config with its user and charity beneficiaries. Aggregate donation stats are **not** included here. Use [`GET /configs/{configId}/stats`](/partner-api/config-stats) for that (Partner scope).

```bash theme={null}
curl https://www.donate.gg/api/v1/configs/0x1234...abcd \
  -H "donate-api-key: YOUR_API_KEY"
```

**Path parameters**

| Parameter  | Description                                   |
| ---------- | --------------------------------------------- |
| `configId` | The config ID (hex string or base58 encoding) |

**Response**

```json theme={null}
{
  "id": { "hex": "0x1234...abcd", "base58": "3xYz..." },
  "users": [],
  "charities": [
    {
      "id": "charity_abc",
      "slug": "red-cross",
      "name": "American Red Cross",
      "logo": "https://...",
      "website": "https://redcross.org",
      "mission": "To prevent and alleviate human suffering...",
      "address": "431 18th St NW",
      "city": "Washington",
      "state": "DC",
      "country": "US",
      "zipCode": "20006",
      "taxId": "53-0196605",
      "socials": {
        "blog": null,
        "twitter": "RedCross",
        "facebook": null,
        "instagram": null,
        "linkedin": null,
        "youtube": null,
        "blogUrl": null,
        "twitterUrl": "https://x.com/RedCross",
        "twitterHandle": "RedCross",
        "facebookUrl": null,
        "facebookHandle": null,
        "instagramUrl": null,
        "instagramHandle": null,
        "linkedinUrl": null,
        "linkedinHandle": null,
        "youtubeUrl": null,
        "youtubeHandle": null,
        "youtubeChannelId": null
      },
      "isEnabled": true,
      "weight": "60"
    }
  ]
}
```

<Note>
  Weights in responses are strings to preserve full precision for values beyond
  `Number.MAX_SAFE_INTEGER`. Charity objects match the [Charities](/core-api/charities) shape, plus
  `weight`.
</Note>

**Error responses**

| Status | Code               | Description                       |
| ------ | ------------------ | --------------------------------- |
| `400`  | `VALIDATION_ERROR` | Invalid config ID format          |
| `404`  | `NOT_FOUND`        | No config found with the given ID |

***

## Delete a config

`DELETE /configs/{configId}`

Deletes a config you own. Returns **204 No Content** on success with an empty body.

```bash theme={null}
curl -X DELETE https://www.donate.gg/api/v1/configs/0x1234...abcd \
  -H "donate-api-key: YOUR_API_KEY"
```

**Path parameters**

| Parameter  | Description                                   |
| ---------- | --------------------------------------------- |
| `configId` | The config ID (hex string or base58 encoding) |

<Warning>
  Configs that have existing donations or linked entities (like partner contracts) cannot be
  deleted. Only the project that created the config can delete it.
</Warning>

**Error responses**

| Status | Code                  | Description                                         |
| ------ | --------------------- | --------------------------------------------------- |
| `400`  | `VALIDATION_ERROR`    | Invalid config ID format                            |
| `403`  | `FORBIDDEN`           | You do not own this config                          |
| `404`  | `NOT_FOUND`           | Config not found                                    |
| `409`  | `HAS_DONATIONS`       | Config has existing donations and cannot be deleted |
| `409`  | `HAS_LINKED_ENTITIES` | Config has linked entities and cannot be deleted    |

***

## Partner API operations for configs

Config creation, listing, stats, and donor leaderboards are available in the Partner API:

* [Create a config](/partner-api/donation-configs#create-a-config)
* [List configs](/partner-api/donation-configs#list-configs)
* [Config stats](/partner-api/config-stats)
* [Config donor leaderboard](/partner-api/config-leaderboard)
