BetterFans Link: the OnlyFans APIBetterFans Link

OnlyFans and Fansly API reference

OnlyFans and Fansly API reference for BetterFans Link: the base URL, API key authentication, the response envelope, pagination and every route.

Product page: OnlyFans and Fansly API coverage

Every route, grouped the way the sidebar groups them. This page covers what all routes share.

Base URL

https://betterfans.link/v1

Authentication

Send your key as a bearer token in the Authorization header. The x-api-key header works too. Keys that start with bfl_live_ read linked accounts; keys that start with bfl_test_ read the sandbox creators. See keys and scopes.

curl https://betterfans.link/v1/me \
  -H "Authorization: Bearer $BFL_KEY"

Responses

A single object comes back in data, with meta next to it:

{
  "data": {
    "id": "412345678",
    "username": "jessrivers"
  },
  "meta": {
    "source": "synced",
    "asOf": "2026-09-28T13:58:40Z",
    "requestId": "req_7Hq2LmX9pRt4VbN8cKe3WzYa",
    "platform": "onlyfans"
  }
}

A list adds hasMore and nextCursor:

{
  "data": [
    {
      "id": "38291045"
    },
    {
      "id": "51820377"
    }
  ],
  "hasMore": true,
  "nextCursor": "q8ZtR2vN5xWcL7mK4pBd",
  "meta": {
    "source": "synced",
    "asOf": "2026-09-28T13:58:40Z",
    "requestId": "req_7Hq2LmX9pRt4VbN8cKe3WzYa"
  }
}

Meta

FieldTypeDescription
sourceenumsynced for synced data, live for a read straight from the platform, sandbox in test mode.
asOftimestamp or nullWhen the data was last synced from the platform; null for live reads.
requestIdstringThe request id, also sent in the x-request-id response header.
platformenumOptional. The account's platform, on every route that takes an accountId. One of onlyfans or fansly.
sideEffectsarray of enumsOptional. Present only when a live read changed something on the platform. thread_marked_read means a fresh=true chat read on OnlyFans could not restore the unread state. Each one of thread_marked_read.

Lists

FieldTypeDescription
dataarrayThe items on this page.
hasMorebooleanWhether another page follows.
nextCursorstring or nullPass it as cursor to get the next page. null on the last page.

Pagination

Routes that take cursor and limit return one page at a time. limit is 25 by default. A limit above 100 is treated as 100; a limit below 1, or one that is not a whole number, is invalid_parameter. Pass nextCursor back as cursor until hasMore is false. A cursor belongs to one list with one set of filters: keep the other parameters the same while you page.

async function allFans(accountId: string) {
  const fans = [];
  let cursor: string | null = null;
  do {
    const url = new URL(`https://betterfans.link/v1/accounts/${accountId}/fans`);
    url.searchParams.set("limit", "100");
    if (cursor) url.searchParams.set("cursor", cursor);
    const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.BFL_KEY}` } });
    const body = await res.json();
    if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message}`);
    fans.push(...body.data);
    cursor = body.hasMore ? body.nextCursor : null;
  } while (cursor);
  return fans;
}

Conventions

  • Every account lives on one platform, OnlyFans or Fansly. The same routes serve both. Each route lists the platforms it works for; an account on any other platform gets not_supported_on_platform. Routes that take an accountId say the account's platform in meta.platform.
  • Ids are strings, even when they look like numbers. An account id is the creator's user id on its platform; a fan id is the fan's user id on that platform and also the chat id. Fansly ids are too large for a JavaScript number to hold exactly, so never parse an id into a number.
  • Timestamps are ISO 8601 strings in UTC. from and to take a date (2026-09-01) or a timestamp.
  • Money is an object with integer cents and a currency. See money.
  • Unknown query parameters are ignored. A known parameter with a bad value is invalid_parameter.
  • Every response has an x-request-id header. Errors repeat it as requestId.

Errors

Errors come back with an HTTP status and a JSON body with a stable error.code. Every route can also return the authentication errors, rate_limited and internal_error. Each route lists its own errors. The errors page explains every code.

Routes

Workspace

RouteMethod and pathScopePlatforms
Who am IGET /v1/mereadOnlyFans and Fansly

Accounts

RouteMethod and pathScopePlatforms
List accountsGET /v1/accountsreadOnlyFans and Fansly
Create linkPOST /v1/linksreadOnlyFans and Fansly
Get linkGET /v1/links/{linkId}readOnlyFans and Fansly
Get accountGET /v1/accounts/{accountId}readOnlyFans and Fansly

Fans

RouteMethod and pathScopePlatforms
List fansGET /v1/accounts/{accountId}/fansreadOnlyFans and Fansly
Get fanGET /v1/accounts/{accountId}/fans/{fanId}readOnlyFans and Fansly
Fan listsGET /v1/accounts/{accountId}/listsreadOnlyFans and Fansly
Online fansGET /v1/accounts/{accountId}/online-fansreadOnlyFans and Fansly

Chats

RouteMethod and pathScopePlatforms
List chatsGET /v1/accounts/{accountId}/chatsreadOnlyFans and Fansly
List messagesGET /v1/accounts/{accountId}/chats/{fanId}/messagesreadOnlyFans and Fansly
Search messagesGET /v1/accounts/{accountId}/messages/searchreadOnlyFans and Fansly

Money

RouteMethod and pathScopePlatforms
Revenue summaryGET /v1/accounts/{accountId}/revenuereadOnlyFans and Fansly
List transactionsGET /v1/accounts/{accountId}/transactionsreadOnlyFans and Fansly

Content

RouteMethod and pathScopePlatforms
Mass messagesGET /v1/accounts/{accountId}/mass-messagesreadOnlyFans
Top contentGET /v1/accounts/{accountId}/postsreadOnlyFans and Fansly
Tracking linksGET /v1/accounts/{accountId}/linksreadOnlyFans and Fansly
VaultGET /v1/accounts/{accountId}/vaultreadOnlyFans and Fansly

Call OnlyFans

RouteMethod and pathScopePlatforms
Call OnlyFansGET /v1/accounts/{accountId}/onlyfans/{path}readOnlyFans

Call Fansly

RouteMethod and pathScopePlatforms
Call FanslyGET /v1/accounts/{accountId}/fansly/{path}readFansly

Actions

RouteMethod and pathScopePlatforms
Create actionPOST /v1/accounts/{accountId}/actionswriteOnlyFans and Fansly
Get actionGET /v1/actions/{actionId}readOnlyFans and Fansly
List actionsGET /v1/actionsreadOnlyFans and Fansly

On this page