> ## Documentation Index
> Fetch the complete documentation index at: https://www.dropfans.io/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/external/v1/earnings/summary — Earnings summary: totals, sources and a day / week series

> Totals for all time, this month and your window, a breakdown by source (drop, tip, subscription) and a zero-filled day or week series, in integer cents.

- Source: https://www.dropfans.io/developers/reference/get-earnings-summary
- Section: API reference
- OpenAPI: https://www.dropfans.io/developers/openapi.json

Also served at `/api/external/earnings/summary` (the unversioned alias).

Totals for all time, this month and your window, a breakdown by source (drop, tip, subscription) and a zero-filled day or week series, in integer cents.

The same revenue as [GET /api/external/v1/earnings](https://www.dropfans.io/developers/reference/get-earnings.md): refunds and chargebacks are left out, so for the same window and timezone `totals.period` equals its `stats.totalEarningsCents` (net) and `stats.grossEarningsCents` (gross). Each transaction is rounded to cents once, so the `series` always adds up to `totals.period`.

Days are whole local days in `timezone` (DST-aware: a switch day is 23 or 25 hours long). Weeks start on Monday; the first and last week are clipped to your window, and `startsAt` is when each bucket starts inside it.

## Authentication

`Authorization: Bearer dpfn_...` — an API key generated in the dashboard (Vault → API Connect). By default the key acts for the one account it belongs to. Missing or invalid keys return 401 `{"error":"Unauthorized","code":"unauthorized"}`.

**For a creator you manage or onboarded:** `GET /api/external/v1/creators/{creatorId}/earnings/summary` — with a verified agency's own key for a creator or AI persona it manages, or your app owner's own key for an account your app onboarded (ids from GET /api/external/v1/creators); for a managed creator the agency needs `canViewStats`. The response echoes the account acted on in `X-Dropfans-Account`. Sending `X-Dropfans-Account: <account id>` on the plain path still works but is deprecated.

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `startDate` | string |  | First local day (YYYY-MM-DD). Defaults to 29 days before `endDate`. At most 366 days per window. |
| `endDate` | string |  | Last local day (YYYY-MM-DD), inclusive. Defaults to today in `timezone`. |
| `granularity` | `day` \\| `week` |  | Series bucket: a local day, or a Monday-start week. |
| `timezone` | string |  | IANA timezone for the days, weeks and "this month". `tz` is accepted too. Unlike GET /earnings, an unknown zone is a 400, not UTC. |

## Responses

### 200

Totals, breakdown and series. All money in cents.

| Field | Type | Required | Description |
|---|---|---|---|
| `startDate` | string | yes | The window’s first day. |
| `endDate` | string | yes | The window’s last day (inclusive). |
| `timezone` | string | yes | The timezone used. |
| `granularity` | `day` \\| `week` | yes | The series bucket. |
| `currency` | string | yes | Always USD. |
| `totals` | object | yes | `allTime`, `thisMonth` (the current month in `timezone`, up to today) and `period` (your window), each `{ grossCents, netCents, count }`. |
| `totals.allTime` | object | yes | Since the account’s first sale. |
| `totals.allTime.grossCents` | integer | yes | Buyer-paid minus VAT, before the platform fee. |
| `totals.allTime.netCents` | integer | yes | The creator’s earnings after the platform fee. |
| `totals.allTime.count` | integer | yes | Number of transactions. |
| `totals.thisMonth` | object | yes | The current calendar month in `timezone`. |
| `totals.thisMonth.grossCents` | integer | yes | Buyer-paid minus VAT, before the platform fee. |
| `totals.thisMonth.netCents` | integer | yes | The creator’s earnings after the platform fee. |
| `totals.thisMonth.count` | integer | yes | Number of transactions. |
| `totals.period` | object | yes | Your window — equals the sum of `series`. |
| `totals.period.grossCents` | integer | yes | Buyer-paid minus VAT, before the platform fee. |
| `totals.period.netCents` | integer | yes | The creator’s earnings after the platform fee. |
| `totals.period.count` | integer | yes | Number of transactions. |
| `breakdownBySource` | object | yes | `drop`, `tip` and `subscription` for your window, each `{ grossCents, netCents, count }`. |
| `breakdownBySource.drop` | object | yes | Drop sales. |
| `breakdownBySource.drop.grossCents` | integer | yes | Buyer-paid minus VAT, before the platform fee. |
| `breakdownBySource.drop.netCents` | integer | yes | The creator’s earnings after the platform fee. |
| `breakdownBySource.drop.count` | integer | yes | Number of transactions. |
| `breakdownBySource.tip` | object | yes | Tips. |
| `breakdownBySource.tip.grossCents` | integer | yes | Buyer-paid minus VAT, before the platform fee. |
| `breakdownBySource.tip.netCents` | integer | yes | The creator’s earnings after the platform fee. |
| `breakdownBySource.tip.count` | integer | yes | Number of transactions. |
| `breakdownBySource.subscription` | object | yes | Subscription payments (first charges and renewals). |
| `breakdownBySource.subscription.grossCents` | integer | yes | Buyer-paid minus VAT, before the platform fee. |
| `breakdownBySource.subscription.netCents` | integer | yes | The creator’s earnings after the platform fee. |
| `breakdownBySource.subscription.count` | integer | yes | Number of transactions. |
| `series` | object[] | yes | One point per day or week of the window, oldest first, zero-filled. |

```json
{
  "startDate": "2026-10-26",
  "endDate": "2026-10-27",
  "timezone": "Europe/Stockholm",
  "granularity": "day",
  "currency": "USD",
  "totals": {
    "allTime": {
      "grossCents": 2480000,
      "netCents": 1984000,
      "count": 912
    },
    "thisMonth": {
      "grossCents": 214180,
      "netCents": 182050,
      "count": 41
    },
    "period": {
      "grossCents": 22300,
      "netCents": 18950,
      "count": 7
    }
  },
  "breakdownBySource": {
    "drop": {
      "grossCents": 15000,
      "netCents": 12750,
      "count": 4
    },
    "tip": {
      "grossCents": 5300,
      "netCents": 4500,
      "count": 2
    },
    "subscription": {
      "grossCents": 2000,
      "netCents": 1700,
      "count": 1
    }
  },
  "series": [
    {
      "date": "2026-10-26",
      "startsAt": "2026-10-25T23:00:00.000Z",
      "grossCents": 12500,
      "netCents": 10620,
      "count": 4
    },
    {
      "date": "2026-10-27",
      "startsAt": "2026-10-26T23:00:00.000Z",
      "grossCents": 9800,
      "netCents": 8330,
      "count": 3
    }
  ]
}
```

## Errors

| Status | Body | When |
|---|---|---|
| 400 | `{"error":"timezone must be an IANA timezone name, e.g. Europe/Stockholm","code":"invalid_timezone"}` | Unknown `timezone`. |
| 400 | `{"error":"startDate and endDate must be YYYY-MM-DD dates","code":"invalid_date"}` | Malformed or impossible date (e.g. 2026-02-31). |
| 400 | `{"error":"endDate must be on or after startDate","code":"invalid_date_range"}` | `startDate` is after `endDate`. |
| 400 | `{"error":"Date range too large — at most 366 days.","code":"range_too_large"}` | The window is longer than 366 days. |
| 400 | `{"error":"granularity must be day or week","code":"invalid_granularity"}` | Any other `granularity`. |
| 401 | `{"error":"Unauthorized","code":"unauthorized"}` | Missing or invalid API key. |
| 500 | `{"error":"Failed to fetch the earnings summary"}` | Query failed — retry later. |
| 400 | `{"error":"X-Dropfans-Account must be an account id (from GET /api/external/agency/creators), not a username.","code":"invalid_account_header"}` | `X-Dropfans-Account` is not an account id. |
| 400 | `{"error":"X-Dropfans-Account names a different account than the path — send one or the other.","code":"account_mismatch"}` | Called under /v1/creators/{creatorId}/ with an `X-Dropfans-Account` naming another account. |
| 403 | `{"error":"This key cannot act for that account.","code":"account_not_managed"}` | The creator in the path (or `X-Dropfans-Account`) is one this key cannot act for: no ACCEPTED management by your agency and not an account your app onboarded (or it no longer holds a key bound to your app), a key minted for one creator, or someone is suspended, banned or deleted. An unknown id gets the same answer. |
| 403 | `{"error":"The agency does not have permission for this on that account.","code":"permission_denied","permission":"canViewStats"}` | For a managed creator: the agency lacks `canViewStats` on that account. |
| 403 | `{"error":"This app does not have the earnings API category enabled. Contact support to enable it.","code":"api_category_disabled","category":"earnings"}` | Your app has the Earnings & balance [API category](https://www.dropfans.io/developers/concepts/api-categories.md) switched off. |

## Rate limiting

Per-key fixed windows by tier (Personal 60/min · 5,000/day; approved apps 300/min · 50,000/day; Dropfans-operated integrations exempt). Read the live values from X-RateLimit-Tier, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and their -Day variants; a 429 carries Retry-After and `{"error":"Rate limit exceeded","code":"rate_limited"}`. See [Rate limits](https://www.dropfans.io/developers/concepts/rate-limits.md).

## Code samples

### curl

```bash
curl "https://www.dropfans.io/api/external/v1/earnings/summary?startDate=2026-10-01&endDate=2026-10-31&timezone=Europe%2FStockholm" \
  -H "Authorization: Bearer $DROPFANS_API_KEY"
```

### Node

```javascript
const res = await fetch(`https://www.dropfans.io/api/external/v1/earnings/summary?startDate=2026-10-01&endDate=2026-10-31&timezone=Europe%2FStockholm`, {
  headers: {
    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,
  },
});
console.log(await res.json());
```

### Python

```python
import os
import requests

res = requests.get(
    "https://www.dropfans.io/api/external/v1/earnings/summary",
    headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
    params={"startDate": "2026-10-01", "endDate": "2026-10-31", "timezone": "Europe/Stockholm"},
)
print(res.json())
```

## OpenAPI

```json
{
  "method": "GET",
  "path": "/api/external/v1/earnings/summary",
  "operationId": "getEarningsSummary",
  "tags": [
    "earnings"
  ],
  "summary": "Earnings summary: totals, sources and a day / week series",
  "description": "Totals for all time, this month and your window, a breakdown by source (drop, tip, subscription) and a zero-filled day or week series, in integer cents.\n\nThe same revenue as [GET /api/external/v1/earnings](https://www.dropfans.io/developers/reference/get-earnings.md): refunds and chargebacks are left out, so for the same window and timezone `totals.period` equals its `stats.totalEarningsCents` (net) and `stats.grossEarningsCents` (gross). Each transaction is rounded to cents once, so the `series` always adds up to `totals.period`.\n\nDays are whole local days in `timezone` (DST-aware: a switch day is 23 or 25 hours long). Weeks start on Monday; the first and last week are clipped to your window, and `startsAt` is when each bucket starts inside it.",
  "parameters": [
    {
      "name": "startDate",
      "in": "query",
      "required": false,
      "description": "First local day (YYYY-MM-DD). Defaults to 29 days before `endDate`. At most 366 days per window.",
      "schema": {
        "type": "string",
        "format": "date"
      },
      "example": "2026-10-01"
    },
    {
      "name": "endDate",
      "in": "query",
      "required": false,
      "description": "Last local day (YYYY-MM-DD), inclusive. Defaults to today in `timezone`.",
      "schema": {
        "type": "string",
        "format": "date"
      },
      "example": "2026-10-31"
    },
    {
      "name": "granularity",
      "in": "query",
      "required": false,
      "description": "Series bucket: a local day, or a Monday-start week.",
      "schema": {
        "type": "string",
        "enum": [
          "day",
          "week"
        ],
        "default": "day"
      }
    },
    {
      "name": "timezone",
      "in": "query",
      "required": false,
      "description": "IANA timezone for the days, weeks and \"this month\". `tz` is accepted too. Unlike GET /earnings, an unknown zone is a 400, not UTC.",
      "schema": {
        "type": "string",
        "default": "UTC",
        "format": "iana-timezone"
      },
      "example": "Europe/Stockholm"
    },
    {
      "name": "X-Dropfans-Account",
      "in": "header",
      "required": false,
      "deprecated": true,
      "description": "Deprecated: call the …ForCreator operation (/api/external/v1/creators/{creatorId}/…) instead; the header keeps working and such responses carry Deprecation and Link: rel=\"successor-version\". With a verified agency’s own key, the id of a creator or AI persona the agency manages (from GET /api/external/v1/agency/creators): the request then acts as that account, exactly as if it were sent with that account’s own key. Account ids only — usernames are refused (400 invalid_account_header). Checked on every request: the management must be ACCEPTED, nobody may be suspended, banned or deleted (else 403 account_not_managed), and the agency needs the endpoint’s permission on that account (else 403 permission_denied). Omit it to act as the key’s own account.",
      "schema": {
        "type": "string",
        "pattern": "^c[a-z0-9]{20,32}$"
      },
      "example": "cmh4v2q8k0003xy9z7w6v5u4t"
    }
  ],
  "responses": {
    "200": {
      "description": "Totals, breakdown and series. All money in cents.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-Dropfans-Account": {
          "description": "The id of the account this request acted on — the key’s own account, or the managed account named in the X-Dropfans-Account request header. Assert it when acting for several accounts.",
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "The window’s first day.",
                "format": "date"
              },
              "endDate": {
                "type": "string",
                "description": "The window’s last day (inclusive).",
                "format": "date"
              },
              "timezone": {
                "type": "string",
                "description": "The timezone used."
              },
              "granularity": {
                "type": "string",
                "description": "The series bucket.",
                "enum": [
                  "day",
                  "week"
                ]
              },
              "currency": {
                "type": "string",
                "description": "Always USD."
              },
              "totals": {
                "type": "object",
                "properties": {
                  "allTime": {
                    "type": "object",
                    "properties": {
                      "grossCents": {
                        "type": "integer",
                        "description": "Buyer-paid minus VAT, before the platform fee."
                      },
                      "netCents": {
                        "type": "integer",
                        "description": "The creator’s earnings after the platform fee."
                      },
                      "count": {
                        "type": "integer",
                        "description": "Number of transactions."
                      }
                    },
                    "required": [
                      "grossCents",
                      "netCents",
                      "count"
                    ],
                    "description": "Since the account’s first sale."
                  },
                  "thisMonth": {
                    "type": "object",
                    "properties": {
                      "grossCents": {
                        "type": "integer",
                        "description": "Buyer-paid minus VAT, before the platform fee."
                      },
                      "netCents": {
                        "type": "integer",
                        "description": "The creator’s earnings after the platform fee."
                      },
                      "count": {
                        "type": "integer",
                        "description": "Number of transactions."
                      }
                    },
                    "required": [
                      "grossCents",
                      "netCents",
                      "count"
                    ],
                    "description": "The current calendar month in `timezone`."
                  },
                  "period": {
                    "type": "object",
                    "properties": {
                      "grossCents": {
                        "type": "integer",
                        "description": "Buyer-paid minus VAT, before the platform fee."
                      },
                      "netCents": {
                        "type": "integer",
                        "description": "The creator’s earnings after the platform fee."
                      },
                      "count": {
                        "type": "integer",
                        "description": "Number of transactions."
                      }
                    },
                    "required": [
                      "grossCents",
                      "netCents",
                      "count"
                    ],
                    "description": "Your window — equals the sum of `series`."
                  }
                },
                "required": [
                  "allTime",
                  "thisMonth",
                  "period"
                ],
                "description": "`allTime`, `thisMonth` (the current month in `timezone`, up to today) and `period` (your window), each `{ grossCents, netCents, count }`."
              },
              "breakdownBySource": {
                "type": "object",
                "properties": {
                  "drop": {
                    "type": "object",
                    "properties": {
                      "grossCents": {
                        "type": "integer",
                        "description": "Buyer-paid minus VAT, before the platform fee."
                      },
                      "netCents": {
                        "type": "integer",
                        "description": "The creator’s earnings after the platform fee."
                      },
                      "count": {
                        "type": "integer",
                        "description": "Number of transactions."
                      }
                    },
                    "required": [
                      "grossCents",
                      "netCents",
                      "count"
                    ],
                    "description": "Drop sales."
                  },
                  "tip": {
                    "type": "object",
                    "properties": {
                      "grossCents": {
                        "type": "integer",
                        "description": "Buyer-paid minus VAT, before the platform fee."
                      },
                      "netCents": {
                        "type": "integer",
                        "description": "The creator’s earnings after the platform fee."
                      },
                      "count": {
                        "type": "integer",
                        "description": "Number of transactions."
                      }
                    },
                    "required": [
                      "grossCents",
                      "netCents",
                      "count"
                    ],
                    "description": "Tips."
                  },
                  "subscription": {
                    "type": "object",
                    "properties": {
                      "grossCents": {
                        "type": "integer",
                        "description": "Buyer-paid minus VAT, before the platform fee."
                      },
                      "netCents": {
                        "type": "integer",
                        "description": "The creator’s earnings after the platform fee."
                      },
                      "count": {
                        "type": "integer",
                        "description": "Number of transactions."
                      }
                    },
                    "required": [
                      "grossCents",
                      "netCents",
                      "count"
                    ],
                    "description": "Subscription payments (first charges and renewals)."
                  }
                },
                "required": [
                  "drop",
                  "tip",
                  "subscription"
                ],
                "description": "`drop`, `tip` and `subscription` for your window, each `{ grossCents, netCents, count }`."
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "description": "The local day, or the Monday the week starts on (can be before `startDate`).",
                      "format": "date"
                    },
                    "startsAt": {
                      "type": "string",
                      "description": "When the bucket starts, clipped to the window.",
                      "format": "date-time"
                    },
                    "grossCents": {
                      "type": "integer",
                      "description": "Buyer-paid minus VAT, before the platform fee."
                    },
                    "netCents": {
                      "type": "integer",
                      "description": "The creator’s earnings after the platform fee."
                    },
                    "count": {
                      "type": "integer",
                      "description": "Transactions in the bucket."
                    }
                  },
                  "required": [
                    "date",
                    "startsAt",
                    "grossCents",
                    "netCents",
                    "count"
                  ],
                  "description": "A bucket."
                },
                "description": "One point per day or week of the window, oldest first, zero-filled."
              }
            },
            "required": [
              "startDate",
              "endDate",
              "timezone",
              "granularity",
              "currency",
              "totals",
              "breakdownBySource",
              "series"
            ]
          },
          "example": {
            "startDate": "2026-10-26",
            "endDate": "2026-10-27",
            "timezone": "Europe/Stockholm",
            "granularity": "day",
            "currency": "USD",
            "totals": {
              "allTime": {
                "grossCents": 2480000,
                "netCents": 1984000,
                "count": 912
              },
              "thisMonth": {
                "grossCents": 214180,
                "netCents": 182050,
                "count": 41
              },
              "period": {
                "grossCents": 22300,
                "netCents": 18950,
                "count": 7
              }
            },
            "breakdownBySource": {
              "drop": {
                "grossCents": 15000,
                "netCents": 12750,
                "count": 4
              },
              "tip": {
                "grossCents": 5300,
                "netCents": 4500,
                "count": 2
              },
              "subscription": {
                "grossCents": 2000,
                "netCents": 1700,
                "count": 1
              }
            },
            "series": [
              {
                "date": "2026-10-26",
                "startsAt": "2026-10-25T23:00:00.000Z",
                "grossCents": 12500,
                "netCents": 10620,
                "count": 4
              },
              {
                "date": "2026-10-27",
                "startsAt": "2026-10-26T23:00:00.000Z",
                "grossCents": 9800,
                "netCents": 8330,
                "count": 3
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "Unknown `timezone`. Also: Malformed or impossible date (e.g. 2026-02-31). Also: `startDate` is after `endDate`. Also: The window is longer than 366 days. Also: Any other `granularity`. Also: `X-Dropfans-Account` is not an account id. Also: Called under /v1/creators/{creatorId}/ with an `X-Dropfans-Account` naming another account.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, api_category_disabled, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "timezone must be an IANA timezone name, e.g. Europe/Stockholm",
            "code": "invalid_timezone"
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid API key.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, api_category_disabled, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Unauthorized",
            "code": "unauthorized"
          }
        }
      }
    },
    "403": {
      "description": "The creator in the path (or `X-Dropfans-Account`) is one this key cannot act for: no ACCEPTED management by your agency and not an account your app onboarded (or it no longer holds a key bound to your app), a key minted for one creator, or someone is suspended, banned or deleted. An unknown id gets the same answer. Also: For a managed creator: the agency lacks `canViewStats` on that account. Also: Your app has the Earnings & balance [API category](https://www.dropfans.io/developers/concepts/api-categories.md) switched off.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, api_category_disabled, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "This key cannot act for that account.",
            "code": "account_not_managed"
          }
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded for the current minute or day window. Wait Retry-After seconds and retry.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "Retry-After": {
          "description": "Seconds to wait before retrying (sent with 429s).",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, api_category_disabled, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Rate limit exceeded",
            "code": "rate_limited"
          }
        }
      }
    },
    "500": {
      "description": "Query failed — retry later.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message describing what went wrong.",
                "example": "Vault item not found"
              }
            },
            "required": [
              "error"
            ]
          },
          "example": {
            "error": "Failed to fetch the earnings summary"
          }
        }
      }
    }
  },
  "x-codeSamples": [
    {
      "lang": "cURL",
      "label": "curl",
      "source": "curl \"https://www.dropfans.io/api/external/v1/earnings/summary?startDate=2026-10-01&endDate=2026-10-31&timezone=Europe%2FStockholm\" \\\n  -H \"Authorization: Bearer $DROPFANS_API_KEY\""
    },
    {
      "lang": "JavaScript",
      "label": "Node",
      "source": "const res = await fetch(`https://www.dropfans.io/api/external/v1/earnings/summary?startDate=2026-10-01&endDate=2026-10-31&timezone=Europe%2FStockholm`, {\n  headers: {\n    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,\n  },\n});\nconsole.log(await res.json());"
    },
    {
      "lang": "Python",
      "source": "import os\nimport requests\n\nres = requests.get(\n    \"https://www.dropfans.io/api/external/v1/earnings/summary\",\n    headers={\"Authorization\": f\"Bearer {os.environ['DROPFANS_API_KEY']}\"},\n    params={\"startDate\": \"2026-10-01\", \"endDate\": \"2026-10-31\", \"timezone\": \"Europe/Stockholm\"},\n)\nprint(res.json())"
    }
  ],
  "x-dropfans-docs": "https://www.dropfans.io/developers/reference/get-earnings-summary",
  "x-dropfans-category": "earnings",
  "x-dropfans-agency-permission": "canViewStats"
}
```

---

Previous: [Earnings stats, chart and recent transactions](https://www.dropfans.io/developers/reference/get-earnings.md) · Next: [Full transaction ledger (paginated, net per transaction)](https://www.dropfans.io/developers/reference/list-earnings-transactions.md) · All pages: [llms.txt](https://www.dropfans.io/developers/llms.txt)
