> ## 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/agency/earnings — Daily earnings per creator

> One row per managed creator per day with revenue, across every account you may see stats for (`canViewStats`), in integer cents. Paged with a cursor.

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

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

One row per managed creator per day with revenue, across every account you may see stats for (`canViewStats`), in integer cents. Paged with a cursor.

Rows come ordered by `date`, then `creatorId`; days without revenue have no row. The figures match [GET /api/external/v1/earnings/summary](https://www.dropfans.io/developers/reference/get-earnings-summary.md) for that creator: refunds and chargebacks are left out, and days are whole local days in `timezone`. The agency’s own sales are not included — read those with the summary, without `X-Dropfans-Account`.

Keep `startDate`, `endDate` and `timezone` the same while you follow `nextCursor`.

## 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"}`.

Needs a verified agency's own key, sent without `X-Dropfans-Account` — these endpoints act as the agency itself.

## 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`. |
| `timezone` | string |  | IANA timezone for the days. `tz` is accepted too; an unknown zone is a 400. |
| `limit` | integer |  | Rows per page. |
| `cursor` | string |  | `nextCursor` from the previous page. |

## Responses

### 200

A page of rows. 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. |
| `currency` | string | yes | Always USD. |
| `data` | object[] | yes | Rows, by date then creatorId. |
| `nextCursor` | string \\| null |  | Pass as `cursor` for the next page; null on the last page. |

```json
{
  "startDate": "2026-10-01",
  "endDate": "2026-10-31",
  "timezone": "Europe/Stockholm",
  "currency": "USD",
  "data": [
    {
      "creatorId": "cmh4v2q8k0003xy9z7w6v5u4t",
      "date": "2026-10-01",
      "grossCents": 8200,
      "netCents": 6560,
      "count": 3
    },
    {
      "creatorId": "cmh3k9p2a0002cd5e6f7g8h9j",
      "date": "2026-10-01",
      "grossCents": 4050,
      "netCents": 3240,
      "count": 2
    }
  ],
  "nextCursor": "MjAyNi0xMC0wMXxjbWg0djJxOGswMDAzeHk5ejd3NnY1dTR0"
}
```

## Errors

| Status | Body | When |
|---|---|---|
| 400 | `{"error":"Agency endpoints act as the agency itself — send them without X-Dropfans-Account.","code":"account_header_not_allowed"}` | The request carried `X-Dropfans-Account`. Agency endpoints always act as the agency. |
| 401 | `{"error":"Unauthorized","code":"unauthorized"}` | Missing or invalid API key. |
| 403 | `{"error":"This endpoint needs a verified agency's own API key.","code":"agency_key_required"}` | The key is not a verified agency’s own key — a creator’s key, or a key an agency minted for one of its creators. |
| 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. |
| 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":"limit must be an integer from 1 to 500","code":"invalid_limit"}` | Bad `limit`. |
| 400 | `{"error":"Invalid cursor","code":"invalid_cursor"}` | The cursor was not one we returned. |
| 400 | `{"error":"This endpoint acts as the key’s own account or app — call it without /creators/{creatorId}.","code":"creator_scope_not_allowed"}` | Called under /api/external/v1/creators/{creatorId}/ — this endpoint always acts as the key’s own account, agency or app. |
| 403 | `{"error":"This app does not have the agency API category enabled. Contact support to enable it.","code":"api_category_disabled","category":"agency"}` | Your app has the Agency roster [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/agency/earnings?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/agency/earnings?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/agency/earnings",
    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/agency/earnings",
  "operationId": "listAgencyEarnings",
  "tags": [
    "agency"
  ],
  "summary": "Daily earnings per creator",
  "description": "One row per managed creator per day with revenue, across every account you may see stats for (`canViewStats`), in integer cents. Paged with a cursor.\n\nRows come ordered by `date`, then `creatorId`; days without revenue have no row. The figures match [GET /api/external/v1/earnings/summary](https://www.dropfans.io/developers/reference/get-earnings-summary.md) for that creator: refunds and chargebacks are left out, and days are whole local days in `timezone`. The agency’s own sales are not included — read those with the summary, without `X-Dropfans-Account`.\n\nKeep `startDate`, `endDate` and `timezone` the same while you follow `nextCursor`.",
  "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": "timezone",
      "in": "query",
      "required": false,
      "description": "IANA timezone for the days. `tz` is accepted too; an unknown zone is a 400.",
      "schema": {
        "type": "string",
        "default": "UTC",
        "format": "iana-timezone"
      },
      "example": "Europe/Stockholm"
    },
    {
      "name": "limit",
      "in": "query",
      "required": false,
      "description": "Rows per page.",
      "schema": {
        "type": "integer",
        "default": 100,
        "minimum": 1,
        "maximum": 500
      }
    },
    {
      "name": "cursor",
      "in": "query",
      "required": false,
      "description": "`nextCursor` from the previous page.",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "A page of rows. 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."
              },
              "currency": {
                "type": "string",
                "description": "Always USD."
              },
              "data": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "creatorId": {
                      "type": "string",
                      "description": "The account id (as in GET /api/external/v1/agency/creators)."
                    },
                    "date": {
                      "type": "string",
                      "description": "The local day.",
                      "format": "date"
                    },
                    "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 that day."
                    }
                  },
                  "required": [
                    "creatorId",
                    "date",
                    "grossCents",
                    "netCents",
                    "count"
                  ],
                  "description": "One creator’s revenue on one day."
                },
                "description": "Rows, by date then creatorId."
              },
              "nextCursor": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Pass as `cursor` for the next page; null on the last page."
              }
            },
            "required": [
              "startDate",
              "endDate",
              "timezone",
              "currency",
              "data"
            ]
          },
          "example": {
            "startDate": "2026-10-01",
            "endDate": "2026-10-31",
            "timezone": "Europe/Stockholm",
            "currency": "USD",
            "data": [
              {
                "creatorId": "cmh4v2q8k0003xy9z7w6v5u4t",
                "date": "2026-10-01",
                "grossCents": 8200,
                "netCents": 6560,
                "count": 3
              },
              {
                "creatorId": "cmh3k9p2a0002cd5e6f7g8h9j",
                "date": "2026-10-01",
                "grossCents": 4050,
                "netCents": 3240,
                "count": 2
              }
            ],
            "nextCursor": "MjAyNi0xMC0wMXxjbWg0djJxOGswMDAzeHk5ejd3NnY1dTR0"
          }
        }
      }
    },
    "400": {
      "description": "The request carried `X-Dropfans-Account`. Agency endpoints always act as the agency. Also: Unknown `timezone`. Also: Malformed or impossible date. Also: `startDate` is after `endDate`. Also: The window is longer than 366 days. Also: Bad `limit`. Also: The cursor was not one we returned. Also: Called under /api/external/v1/creators/{creatorId}/ — this endpoint always acts as the key’s own account, agency or app.",
      "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": "Agency endpoints act as the agency itself — send them without X-Dropfans-Account.",
            "code": "account_header_not_allowed"
          }
        }
      }
    },
    "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 key is not a verified agency’s own key — a creator’s key, or a key an agency minted for one of its creators. Also: Your app has the Agency roster [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 endpoint needs a verified agency's own API key.",
            "code": "agency_key_required"
          }
        }
      }
    },
    "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"
          }
        }
      }
    }
  },
  "x-codeSamples": [
    {
      "lang": "cURL",
      "label": "curl",
      "source": "curl \"https://www.dropfans.io/api/external/v1/agency/earnings?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/agency/earnings?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/agency/earnings\",\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/list-agency-earnings",
  "x-dropfans-category": "agency"
}
```

---

Previous: [Revenue across your roster](https://www.dropfans.io/developers/reference/get-agency-stats.md) · Next: [List the creators you can act for](https://www.dropfans.io/developers/reference/list-creators.md) · All pages: [llms.txt](https://www.dropfans.io/developers/llms.txt)
