> ## 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/crm/accounts — List your connected accounts

> Your integration dashboard’s Accounts tab: every account your app has generated links for, with its all-time sales through your links and the commission booked on them.

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

Your integration dashboard’s Accounts tab: every account your app has generated links for, with its all-time sales through your links and the commission booked on them.

Accounts that sold through your links without you generating them are listed too.

An account is `connected` while your app is the one that generated its links most recently. When another CRM generated them after you, `movedAway.at` says when; which CRM is never disclosed. Agencies are the sum of their `children` (their creators and their own sales as a creator); pass `flat=true` to get only those rows, each with `agencyId`, so that a column sums without double counting.

Amounts are integer US cents, excluding tax, before our platform fee; refunded and charged-back sales are left out.

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

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `flat` | boolean |  | `true`: no nesting — plain accounts plus every agency’s rows, each with `agencyId`; agency sum rows left out. |

## Responses

### 200

Every account, connected first, then by sales through your links.

| Field | Type | Required | Description |
|---|---|---|---|
| `currency` | `USD` | yes | Currency of every *Cents field. |
| `accounts` | CrmConnectedAccount[] | yes | Connected first, then by viaLinksCents. |
| `totals` | CrmAccountsTotals | yes | Sums over every account. |

```json
{
  "currency": "USD",
  "accounts": [
    {
      "id": "clxac0001acct",
      "username": "valeria",
      "name": "Valeria",
      "kind": "account",
      "connected": true,
      "connectedAt": "2026-10-17T16:05:00.000Z",
      "movedAway": null,
      "links": 4,
      "allTimeGrossCents": 250000,
      "viaLinksCents": 64000,
      "crmEarnedCents": 3200
    },
    {
      "id": "clxac0002acct",
      "username": "nora",
      "name": "Nora",
      "kind": "account",
      "connected": false,
      "connectedAt": "2026-09-02T10:00:00.000Z",
      "movedAway": {
        "at": "2026-10-20T08:30:00.000Z"
      },
      "links": 2,
      "allTimeGrossCents": 90000,
      "viaLinksCents": 12000,
      "crmEarnedCents": 600
    }
  ],
  "totals": {
    "links": 6,
    "allTimeGrossCents": 340000,
    "viaLinksCents": 76000,
    "crmEarnedCents": 3800
  }
}
```

## Errors

| Status | Body | When |
|---|---|---|
| 400 | `{"error":"flat must be true or false.","code":"invalid_input","field":"flat"}` | Anything else. |
| 401 | `{"error":"Unauthorized","code":"unauthorized"}` | Missing or invalid API key. |
| 403 | `{"error":"This endpoint needs a key bound to an approved app.","code":"app_key_required"}` | A Personal key was used. |
| 403 | `{"error":"Use the app owner's key for this endpoint.","code":"owner_key_required"}` | The key was minted by a creator for themselves. App-level calls need a key held by your app owner: their own, or one their agency minted for its personas or managed creators. |
| 400 | `{"error":"This endpoint only acts as the key’s own account — send it without X-Dropfans-Account.","code":"account_header_not_allowed"}` | `X-Dropfans-Account` was sent. These endpoints always answer for the key’s app. |

## 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/crm/accounts" \
  -H "Authorization: Bearer $DROPFANS_API_KEY"
```

### Node

```javascript
const res = await fetch(`https://www.dropfans.io/api/external/crm/accounts`, {
  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/crm/accounts",
    headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
)
print(res.json())
```

## OpenAPI

```json
{
  "method": "GET",
  "path": "/api/external/crm/accounts",
  "operationId": "listCrmAccounts",
  "tags": [
    "crm"
  ],
  "summary": "List your connected accounts",
  "description": "Your integration dashboard’s Accounts tab: every account your app has generated links for, with its all-time sales through your links and the commission booked on them.\n\nAccounts that sold through your links without you generating them are listed too.\n\nAn account is `connected` while your app is the one that generated its links most recently. When another CRM generated them after you, `movedAway.at` says when; which CRM is never disclosed. Agencies are the sum of their `children` (their creators and their own sales as a creator); pass `flat=true` to get only those rows, each with `agencyId`, so that a column sums without double counting.\n\nAmounts are integer US cents, excluding tax, before our platform fee; refunded and charged-back sales are left out.",
  "parameters": [
    {
      "name": "flat",
      "in": "query",
      "required": false,
      "description": "`true`: no nesting — plain accounts plus every agency’s rows, each with `agencyId`; agency sum rows left out.",
      "schema": {
        "type": "boolean",
        "default": false
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Every account, connected first, then by sales through your links.",
      "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": {
              "currency": {
                "type": "string",
                "description": "Currency of every *Cents field.",
                "enum": [
                  "USD"
                ]
              },
              "accounts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Account id.",
                      "example": "clxac0001acct"
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "@handle without the @.",
                      "example": "valeria"
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Display name."
                    },
                    "kind": {
                      "type": "string",
                      "description": "`account`: a creator on its own. `agency`: an agency, the sum of its `children`. `creator`: a creator whose links an agency asked for. `own`: an agency’s own sales as a creator.",
                      "enum": [
                        "account",
                        "agency",
                        "creator",
                        "own"
                      ]
                    },
                    "connected": {
                      "type": "boolean",
                      "description": "True when your app generated the account’s links most recently (an agency: any of its rows)."
                    },
                    "connectedAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "When your app first issued links for it.",
                      "format": "date-time"
                    },
                    "movedAway": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "at": {
                          "type": "string",
                          "description": "When the other CRM last generated its links.",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "at"
                      ],
                      "description": "Set when another CRM generated the account’s links after you did. Which CRM is never disclosed."
                    },
                    "links": {
                      "type": "integer",
                      "description": "Link ids your app created for it.",
                      "example": 4
                    },
                    "allTimeGrossCents": {
                      "type": "integer",
                      "description": "Everything the account ever sold, through any CRM or none, US cents, excl. tax, reversals left out.",
                      "example": 250000
                    },
                    "viaLinksCents": {
                      "type": "integer",
                      "description": "Its sales through your app’s links, all-time, US cents, excl. tax, reversals left out.",
                      "example": 64000
                    },
                    "crmEarnedCents": {
                      "type": "integer",
                      "description": "Commission booked for your app owner on those sales, US cents.",
                      "example": 3200
                    },
                    "agencyId": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Only with `flat=true`: the agency the row belongs to, or null."
                    },
                    "children": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Account id.",
                            "example": "clxac0001acct"
                          },
                          "username": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "@handle without the @.",
                            "example": "valeria"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Display name."
                          },
                          "kind": {
                            "type": "string",
                            "description": "`account`: a creator on its own. `agency`: an agency, the sum of its `children`. `creator`: a creator whose links an agency asked for. `own`: an agency’s own sales as a creator.",
                            "enum": [
                              "account",
                              "agency",
                              "creator",
                              "own"
                            ]
                          },
                          "connected": {
                            "type": "boolean",
                            "description": "True when your app generated the account’s links most recently (an agency: any of its rows)."
                          },
                          "connectedAt": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "When your app first issued links for it.",
                            "format": "date-time"
                          },
                          "movedAway": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "properties": {
                              "at": {
                                "type": "string",
                                "description": "When the other CRM last generated its links.",
                                "format": "date-time"
                              }
                            },
                            "required": [
                              "at"
                            ],
                            "description": "Set when another CRM generated the account’s links after you did. Which CRM is never disclosed."
                          },
                          "links": {
                            "type": "integer",
                            "description": "Link ids your app created for it.",
                            "example": 4
                          },
                          "allTimeGrossCents": {
                            "type": "integer",
                            "description": "Everything the account ever sold, through any CRM or none, US cents, excl. tax, reversals left out.",
                            "example": 250000
                          },
                          "viaLinksCents": {
                            "type": "integer",
                            "description": "Its sales through your app’s links, all-time, US cents, excl. tax, reversals left out.",
                            "example": 64000
                          },
                          "crmEarnedCents": {
                            "type": "integer",
                            "description": "Commission booked for your app owner on those sales, US cents.",
                            "example": 3200
                          },
                          "agencyId": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Only with `flat=true`: the agency the row belongs to, or null."
                          },
                          "children": {
                            "type": "array",
                            "items": {
                              "$ref": "#/components/schemas/CrmConnectedAccount"
                            },
                            "description": "Only on `agency` rows without `flat=true`: its creators and its `own` row."
                          }
                        },
                        "required": [
                          "id",
                          "kind",
                          "connected",
                          "links",
                          "allTimeGrossCents",
                          "viaLinksCents",
                          "crmEarnedCents"
                        ]
                      },
                      "description": "Only on `agency` rows without `flat=true`: its creators and its `own` row."
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "connected",
                    "links",
                    "allTimeGrossCents",
                    "viaLinksCents",
                    "crmEarnedCents"
                  ]
                },
                "description": "Connected first, then by viaLinksCents."
              },
              "totals": {
                "type": "object",
                "properties": {
                  "links": {
                    "type": "integer",
                    "description": "Link ids your app created, all accounts."
                  },
                  "allTimeGrossCents": {
                    "type": "integer",
                    "description": "Sum of allTimeGrossCents, US cents."
                  },
                  "viaLinksCents": {
                    "type": "integer",
                    "description": "Sum of viaLinksCents, US cents: everything ever sold through your app’s links."
                  },
                  "crmEarnedCents": {
                    "type": "integer",
                    "description": "Sum of crmEarnedCents, US cents."
                  }
                },
                "required": [
                  "links",
                  "allTimeGrossCents",
                  "viaLinksCents",
                  "crmEarnedCents"
                ]
              }
            },
            "required": [
              "currency",
              "accounts",
              "totals"
            ]
          },
          "example": {
            "currency": "USD",
            "accounts": [
              {
                "id": "clxac0001acct",
                "username": "valeria",
                "name": "Valeria",
                "kind": "account",
                "connected": true,
                "connectedAt": "2026-10-17T16:05:00.000Z",
                "movedAway": null,
                "links": 4,
                "allTimeGrossCents": 250000,
                "viaLinksCents": 64000,
                "crmEarnedCents": 3200
              },
              {
                "id": "clxac0002acct",
                "username": "nora",
                "name": "Nora",
                "kind": "account",
                "connected": false,
                "connectedAt": "2026-09-02T10:00:00.000Z",
                "movedAway": {
                  "at": "2026-10-20T08:30:00.000Z"
                },
                "links": 2,
                "allTimeGrossCents": 90000,
                "viaLinksCents": 12000,
                "crmEarnedCents": 600
              }
            ],
            "totals": {
              "links": 6,
              "allTimeGrossCents": 340000,
              "viaLinksCents": 76000,
              "crmEarnedCents": 3800
            }
          }
        }
      }
    },
    "400": {
      "description": "Anything else. Also: `X-Dropfans-Account` was sent. These endpoints always answer for the key’s 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 naming the offending field and word.",
                "example": "Field \"name\" contains a prohibited word: \"…\""
              },
              "field": {
                "type": "string",
                "description": "Which request field tripped the filter (\"name\" or \"description\")."
              },
              "matchedWord": {
                "type": "string",
                "description": "The prohibited word."
              }
            },
            "required": [
              "error",
              "field",
              "matchedWord"
            ]
          },
          "example": {
            "error": "flat must be true or false.",
            "code": "invalid_input",
            "field": "flat"
          }
        }
      }
    },
    "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, 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": "A Personal key was used. Also: The key was minted by a creator for themselves. App-level calls need a key held by your app owner: their own, or one their agency minted for its personas or managed creators.",
      "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, 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 key bound to an approved app.",
            "code": "app_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, 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/crm/accounts\" \\\n  -H \"Authorization: Bearer $DROPFANS_API_KEY\""
    },
    {
      "lang": "JavaScript",
      "label": "Node",
      "source": "const res = await fetch(`https://www.dropfans.io/api/external/crm/accounts`, {\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/crm/accounts\",\n    headers={\"Authorization\": f\"Bearer {os.environ['DROPFANS_API_KEY']}\"},\n)\nprint(res.json())"
    }
  ],
  "x-dropfans-docs": "https://www.dropfans.io/developers/reference/list-crm-accounts"
}
```

---

Previous: [List sales through your app](https://www.dropfans.io/developers/reference/list-crm-transactions.md) · Next: [Changelog](https://www.dropfans.io/developers/changelog.md) · All pages: [llms.txt](https://www.dropfans.io/developers/llms.txt)
