Skip to content

For developers and agencies

The
OnlyFans
API

Read chats, fans, spend and revenue. Send messages. Get webhooks. One REST API for the OnlyFans and Fansly accounts you manage.

API consoletest key · @ava.sampleSample data
Request
GET /v1/accounts/412345678/fans?sort=spend&limit=2Authorization: Bearer bfl_test_...
Response200 OKsource: sandboxsample
{  "data": [    {      "id": "38291045",      "username": "mike.sample",      "subscription": { "status": "active", … },      "spend": { "total": { "amount": 184250, "currency": "USD" }, … },      "lastPurchaseAt": "2026-09-30T21:14:09Z"    // ISO 8601, UTC    },    { "id": "27760318", "username": "nina.sample", … }  ],  "hasMore": true,  "nextCursor": "eyJvIjoyfQ",    // pass it back for the next page  "meta": { "source": "sandbox", "requestId": "req_8sK2mQ7vX1bN…", … }}

Money is always an object in integer cents. 184250 is $1,842.50.

Recorded sample. Paths and field names are real. Values are made up. Nothing here calls the live API.

Test mode has sandbox creators with realistic sample data. No OnlyFans or Fansly account needed.

23
REST routes
11
webhook events
28
tools for AI agents
Base URLhttps://betterfans.link/v1

PLATFORMS

OnlyFans and Fansly.
One API for both.

Compare them route by route
  • OnlyFans

    Chats, fans, spend, revenue, posts, tracking links and the vault, plus mass messages, paid messages, online fans and webhooks for every new message, sale and subscriber.

    22
    REST routes
    11
    webhook events
    28
    MCP tools
    OnlyFans API features
  • Fansly

    Fans, chats, revenue, posts, tracking links and the vault on the same routes, with the same keys. Send free messages and take them back.

    21
    REST routes
    8
    webhook events
    25
    MCP tools
    The Fansly API

BUILT TO BUILD ON

Quick to read.
Honest about how fresh.

Everything your code needs to trust the data, try things safely and hear about changes.

Fast reads, with the time on them

Reads come from synced data. Every response says where the data came from and when it was last synced. Add ?fresh=true when you need it live.

"meta": {
  "source": "synced",
  "asOf": "2026-09-29T14:02:11Z",
  "requestId": "req_8sK2mQ7vX1bN4tR9wL3cY6pD"
}
Freshness

A sandbox before anyone links

Test keys see sandbox creators with fans, chats and revenue. Approvals work the same way and send nothing. Switch to a live key when your flow works.

bfl_test_...   sandbox creators
bfl_live_...   accounts linked to you

"meta": { "source": "sandbox" }
Test mode

Webhooks when something happens

11 event types, signed with Standard Webhooks and retried with backoff if your server is down.

message.received
transaction.created
subscriber.new
action.pending
action.executed
Webhook events

YOUR FIRST CALL

Plain HTTP and JSON.
Call it from any language.

Send your key in the Authorization header and read JSON back. A test key sees sandbox creators, so you can try the API before anyone links an account.

  • REST with no surprisesJSON in and out, cursors for lists, integer cents for money and a request id on every answer.
  • Test and live keysTest keys see sandbox creators. Live keys see the accounts linked to your workspace, and you can limit a key to some of them.
  • Any read the platform offersFor data the routes do not cover, call_api runs an OnlyFans or Fansly GET through the account's session. Reads only.
Read the API quickstart
Shell
terminal
# A bfl_test_ key sees the sandbox creators
curl https://betterfans.link/v1/accounts \
  -H "Authorization: Bearer $BFL_KEY"
Every account your key can reach, with its status.
Put your key in BFL_KEY first.Full setup

IT KNOWS ONLYFANS

OnlyFans has quirks.
We handle them for you.

The routes and tools follow what OnlyFans really does, and the docs and tool descriptions spell out each rule before you hit it.

  • Opening a chat marks it read

    OnlyFans tells the fan you saw their message. A live read here puts the unread state back, and meta.sideEffects says so if it ever could not.

  • Paid messages start at $3

    OnlyFans refuses a price under $3. We check the price when you ask to send, so nobody approves one OnlyFans would refuse.

  • Unsend takes back every copy

    Unsending a mass message removes it from every fan who got it. The approval card says how many fans that is.

  • Gross is not net

    Amounts are integer cents with gross and net kept apart. Net is about 80% of gross.

  • Unknown is not offline

    Presence is online, offline or unknown. A fan missing from the online list is never reported as offline.

  • Fan text is untrusted

    Anything a fan wrote comes marked as untrusted, so a message cannot pass itself off as instructions to an AI agent.

LINKING ACCOUNTS

Creators can link their own accounts.
From a link you send them.

How linking works
  • The password is encrypted before it is stored.
  • We use the session exactly as the platform issued it and never change it. We never touch the password, email or settings.
  • Nothing happens on OnlyFans or Fansly until the creator submits the form.
  • Removing an account ends your workspace's access. It does not sign the creator out.

APPROVALS

Writes wait by default.
Your team decides.

Each write to OnlyFans or Fansly, from your code or an AI agent, becomes an action with a one-line summary. By default it waits until someone on your team approves or rejects it in the dashboard.

  • Off until you turn it onWrites start off for every account. An owner or admin turns them on, and a key needs the write scope to ask.
  • Owners and admins decideDevelopers and read-only members can see what is waiting. Only owners and admins can approve it.
  • Nothing waits foreverAn action nobody decides on expires after 24 hours, and nothing is sent.
  • Safe to retryEvery request carries an Idempotency-Key. A retry returns the same action instead of making a second one.
How writes work

The life of a send

  1. Waiting for approval

    Your code or agent asked. action.pending fires and the send shows up in Approvals.

  2. Approved

    A person checked the recipient, price and media and said yes.

  3. Running

    We make the call to OnlyFans or Fansly through the account's session.

  4. Done

    It went out. action.executed carries the result.

Or it ends here

  • Rejected

    Nothing is sent. The note goes back with the action.

  • Expired

    Nobody decided within 24 hours.

  • Failed

    The platform refused it. The error says why.

In test mode, approving records a simulated result and never calls either platform. Drafts from draft_message never become actions at all.

AI AGENTS

Works in your AI client too.
Same data, same approvals.

The MCP server gives Claude, Cursor and other MCP clients the same reads your code gets. When an agent asks to send something, it waits for your team like any other write.

MCP server URLhttps://mcp.betterfans.link/mcp

Set up your client

claude mcp add --transport http betterfans-link https://mcp.betterfans.link/mcp --header "Authorization: Bearer $BFL_KEY"

Put a bfl_test_ key in BFL_KEY first. You make one under Developers after you sign up.

{"mcpServers":{"betterfans-link":{"url":"https://mcp.betterfans.link/mcp"}}}

Goes in ~/.cursor/mcp.json. Sign in when Cursor asks. The file holds no key.

{"servers":{"betterfans-link":{"type":"http","url":"https://mcp.betterfans.link/mcp"}}}

Goes in .vscode/mcp.json. Sign in when VS Code asks. The file holds no key.

Your AI clientSample

Which of Ava's big spenders went quiet this week? Offer the top one Sunday's set for $12.

find_fansstatus: active, sort: spend
  • @milo.sample$1,240 lifetime, last message 8 days ago
  • @theo.sample$910 lifetime, last message 9 days ago
  • @jun.sample$640 lifetime, last message 12 days ago
draft_messagesends nothing
send_messagepriceCents: 1200, 2 medianeeds approval
Waiting for approval
Waiting for approval

Send a $12 message to @milo.sample

Asked by Claude with send_message

Account
@ava.sample
To
@milo.sample 1 fan
Price
$12.00
Media
2 videos from the vault

@ava.sample · to @milo.sample · $12.00

The full set from Sunday, just for you. Two videos, 14 minutes.
Expires in 24 h

Sample inbox for @ava.sample, a made-up creator. Runs in your browser. Nothing is sent anywhere.

GETTING STARTED

Start in test mode.
Go live when it works.

Create your account
  1. 01

    Create a workspace

    Sign up with your email and name your workspace. Invite teammates with the role each one needs.

  2. 02

    Build in test mode

    Make a bfl_test_ key or connect your AI client, then work against sandbox creators until your flow is right.

  3. 03

    Link creators and go live

    Send each creator a link. Once they connect, switch to a live key and turn on writes where you want them.

QUESTIONS

Fair questions.
Straight answers.

The rest is in the docs and the help center.

Visit the help center Does OnlyFans have an API?

Does OnlyFans have an API?

No. OnlyFans publishes no public API for developers: no documentation, no API keys and no developer portal. Every OnlyFans API, BetterFans Link included, is an independent third party. BetterFans Link works only with creator accounts linked to your workspace, and gives you a REST API, signed webhooks and an MCP server. It is not affiliated with or endorsed by OnlyFans or Fenix International.

Yes. Fansly accounts link to your workspace the same way OnlyFans accounts do, and the same keys, routes, MCP tools and approvals work for them. A Fansly account reads fans, chats, revenue, posts, tracking links and the vault, and takes free messages and unsends. Mass messages, paid messages, online fans and list changes are OnlyFans only, and Fansly accounts send no message, sale or subscriber webhooks.

Can I build before linking a real account?

Yes. Every workspace has a test mode with sandbox creators on OnlyFans and Fansly, with sample fans, chats and revenue. Use a bfl_test_ key and build the whole flow, approvals included. Approved actions in test mode record a simulated result and never reach either platform.

How do creators connect their accounts?

You create a link in the dashboard, or with POST /v1/links, and send it to the creator. They open it, sign in to OnlyFans or Fansly on a page we host and answer any code or check the platform asks for. The link works for 24 hours.

How fresh is the data?

Reads come from data synced from each platform, and every response carries meta.asOf, the time of the last sync. A Fansly account syncs about every 30 minutes. For chat messages and a fan profile, and online fans on OnlyFans, you can add ?fresh=true to read live instead.

What does the MCP server do?

MCP is the Model Context Protocol, the way AI apps such as Claude and Cursor call outside tools. Add https://mcp.betterfans.link/mcp to your client and it can list accounts, find fans, read chats, check revenue and draft replies for the OnlyFans and Fansly accounts in your workspace. Its tools call the same API your code does, with the same keys, limits and approvals.

Can an AI agent send messages on its own?

Not over OAuth. An AI client that connects to the MCP server with OAuth always waits. Each write it asks for, such as a message, an unsend or a list change, becomes a pending action that a workspace owner or admin approves or rejects in the dashboard, and it expires after 24 hours if nobody decides. Writes from an API key wait the same way by default, unless an owner or admin turned on auto-approve for that key. Writes are also off for each account until you turn them on.

GET STARTED

Build it in test mode today.

Sign up, make a test key and work against sandbox creators. Link a real account when your flow is ready.

Questions first? Write to hello@betterfans.link.