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

# Scopes

> API scopes control which endpoints your organization can access

Every Developer API endpoint requires a specific **scope**. Scopes are enabled at the **organization** level. All projects and API keys under an organization inherit its enabled scopes.

## Available scopes

| Scope         | Description                                                                                  |
| ------------- | -------------------------------------------------------------------------------------------- |
| **`core`**    | Access to charities, chains, token data, and config read/delete                              |
| **`partner`** | Create/list donation configs, config stats & donor leaderboards, and source leaderboard data |

Scopes are **modular, not hierarchical**. Having `partner` does not automatically grant `core`, and vice versa. Your organization needs each scope explicitly enabled for the endpoints it needs.

## Default scopes

New organizations are provisioned with the **`core`** scope by default. To enable additional scopes, contact us at [support@donate.gg](mailto:support@donate.gg).

## Endpoints by scope

### `core`

> Core endpoints fetch public data and let you inspect or delete configs by ID.

| Method | Endpoint                            | Description              |
| ------ | ----------------------------------- | ------------------------ |
| GET    | `/charities`                        | List charities           |
| GET    | `/charities/search`                 | Search charities         |
| GET    | `/charities/{charityId}`            | Get a charity by ID      |
| GET    | `/chains`                           | List supported chains    |
| GET    | `/{chainId}/tokens/{address}`       | Get a token by address   |
| GET    | `/{chainId}/tokens/{address}/stats` | Get token donation stats |
| GET    | `/{chainId}/tokens/leaderboard`     | Token leaderboard        |
| GET    | `/configs/{configId}`               | Get a config by ID       |
| DELETE | `/configs/{configId}`               | Delete a config          |

### `partner`

> Partner endpoints cover config creation and listing, config analytics, and source leaderboard access.

| Method | Endpoint                                                    | Description                |
| ------ | ----------------------------------------------------------- | -------------------------- |
| GET    | `/configs`                                                  | List configs               |
| POST   | `/configs`                                                  | Create a config            |
| GET    | `/configs/{configId}/stats`                                 | Config donation stats      |
| GET    | `/configs/{configId}/leaderboard`                           | Config donor leaderboard   |
| GET    | `/{chainId}/donationSources/{address}/subjects/leaderboard` | Source subject leaderboard |

## Error response

If you call an endpoint that requires a scope your organization doesn't have, the API returns a `403`:

```json theme={null}
{
  "error": "API scope 'partner' is not enabled for this organization",
  "code": "SCOPE_DENIED"
}
```

| Status | Code           | Description                                             |
| ------ | -------------- | ------------------------------------------------------- |
| `403`  | `SCOPE_DENIED` | The required scope is not enabled for your organization |

<Note>
  Rate limiting runs before scope checks. A `SCOPE_DENIED` response still counts against your [rate
  limit](/developer/rate-limits).
</Note>
