OnlyFans API
OnlyFans CRM API

Build Your Own OnlyFans CRM with a Complete API Backend

Everything you need to build a CRM like Infloww, CreatorHero, or OnlyMonster. Embeddable auth via our NPM package, full chat and messaging endpoints, media upload and download, fan management, and real-time webhooks — all production-ready.

How Your CRM Connects to OnlyFans

Creators authenticate inside your app via our NPM package. Their account data, chats, and media flow through your CRM in real time.

Creator Auth@onlyfansapi/auth opens a secure modal in your app
Account ConnectedYou get the account ID and profile data
Your CRMChats, fans, media, and revenue via API
Live WebhooksMessages, subs, and payments in real time

Everything You Need to Build an OnlyFans CRM

Auth, chat, media, fans, analytics, and content — each with the webhook events and API endpoints that power it.

🔐

Embeddable Creator Authentication

Let creators connect their OnlyFans account directly inside your CRM. Our @onlyfansapi/auth NPM package opens a secure modal with iframe-based auth, handles 2FA, and returns the account ID.

WEBHOOKaccounts.connected

Fires when a creator successfully connects their OnlyFans account

POSTnpm install @onlyfansapi/auth

Zero-dependency NPM package for embedded OnlyFans auth

💬

Full Chat & Messaging System

Build a complete inbox inside your CRM. List chats, read message history, send text and PPV messages, show typing indicators, and search conversations.

WEBHOOKmessages.received

Fires on every incoming fan message with full content and sender data

POST/api/{account}/chats/{chat_id}/messages

Send messages — text, media, or PPV with price

📸

Media Upload & Download

Upload photos and videos to the OnlyFans CDN, manage the vault with lists, and download media using CDN URLs. Full media pipeline for your CRM.

WEBHOOKmessages.ppv.unlocked

Fires when a fan unlocks paid content — track PPV revenue

POST/api/{account}/media/upload

Upload files or URLs to OnlyFans CDN for messages and posts

👥

Fan Management & Segmentation

List all fans with spending data, create custom user lists, set notes and custom names, track subscription history. Everything for a fan CRM view.

WEBHOOKsubscriptions.new

Fires when a fan subscribes — auto-create CRM contact

GET/api/{account}/fans/all

List all fans with full spending breakdown

📊

Revenue & Analytics Dashboard

Pull transaction history, earnings breakdowns, subscriber metrics, and financial forecasts. Build analytics dashboards that rival native OnlyFans.

WEBHOOKtransactions.new

Fires on every payment — subscriptions, tips, PPV, streams

POST/api/analytics/summary/earnings

Get earnings overview by category across accounts

📝

Content Publishing

Create and schedule posts, manage stories, handle labels and archives. Let creators publish content directly from your CRM.

WEBHOOKposts.liked

Fires when a fan likes a post — track engagement

POST/api/{account}/posts

Create a new post with media, captions, and scheduling

Ship Faster with Real Code Examples

Embed auth with our NPM package, build a chat inbox, and manage fan profiles — copy these into your project.

Use the @onlyfansapi/auth NPM package to let creators connect their OnlyFans account inside your CRM. Zero dependencies, framework-agnostic, full TypeScript support.

// npm install @onlyfansapi/auth
import { startOnlyFansAuthentication } from '@onlyfansapi/auth';

// Step 1: Create a client session on your backend
const sessionResponse = await fetch(
  'https://app.onlyfansapi.com/api/client-sessions',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer sk_your_api_key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      client_reference_id: 'user_123_in_your_db'
    })
  }
);
const { token } = await sessionResponse.json();

// Step 2: Open the auth modal in the browser
startOnlyFansAuthentication(token, {
  onSuccess: (data) => {
    // data.accountId = "acct_XXXX"
    // data.username = "creator_username"
    // data.onlyfansData = { id, username, email, avatar_url, name }
    console.log('Connected:', data.accountId);

    // Save to your database
    await db.creators.create({
      accountId: data.accountId,
      username: data.username,
      email: data.onlyfansData.email,
      avatarUrl: data.onlyfansData.avatar_url,
    });
  },
  onError: (error) => {
    console.error('Auth failed:', error.message);
  }
});

Auth, Chat, Media & Fan Endpoints

The core endpoints and webhooks for building a CRM. Full documentation at docs.onlyfansapi.com.

APIEndpoints

POST
/api/client-sessions

Create client session for embedded auth

POST
/api/authenticate

Start authentication flow

GET
/api/authenticate/{attempt_id}

Poll authentication status

PUT
/api/authenticate/{attempt_id}

Submit 2FA code

GET
/api/{account}/chats

List all chats

GET
/api/{account}/chats/{chat_id}/messages

List messages in a chat

POST
/api/{account}/chats/{chat_id}/messages

Send message (text/media/PPV)

GET
/api/{account}/chats/{chat_id}/messages/search

Search messages in a chat

POST
/api/{account}/chats/{chat_id}/typing

Show typing indicator

GET
/api/{account}/chats/{chat_id}/media

List media in a chat (gallery)

POST
/api/{account}/media/upload

Upload media to OnlyFans CDN

GET
/api/{account}/media/download/{cdnUrl}

Download media from CDN

GET
/api/{account}/media/vault

List vault media

POST
/api/{account}/media/vault

Upload media to vault

GET
/api/{account}/media/vault/lists

List vault categories

GET
/api/{account}/fans/all

List all fans with spending data

GET
/api/{account}/fans/active

List active subscribers

GET
/api/{account}/fans/expired

List expired subscribers

GET
/api/{account}/fans/top

List top fans by spend

PUT
/api/{account}/fans/{fan_id}/notes

Create or update fan notes

PUT
/api/{account}/fans/{fan_id}/custom-name

Set custom display name

GET
/api/{account}/fans/{user_id}/subscriptions-history

Subscription history

GET
/api/{account}/user-lists

List all user lists

POST
/api/{account}/user-lists

Create user list

POST
/api/{account}/user-lists/{id}/users

Add users to a list

WHWebhook Events

EVENT
accounts.connected

Creator connects their OnlyFans account via your embedded auth

EVENT
accounts.reconnected

Creator reconnects after session expiry

EVENT
accounts.authentication_failed

Session expired and auto-reconnect failed — prompt re-auth

EVENT
messages.received

New incoming fan message — update your CRM inbox in real time

EVENT
messages.sent

Outgoing message confirmed — sync sent status in your CRM

EVENT
messages.ppv.unlocked

Fan unlocked PPV content — track revenue per message

EVENT
subscriptions.new

New subscriber — auto-create fan profile in your CRM

EVENT
subscriptions.renewed

Subscription renewed — update lifecycle status

EVENT
transactions.new

Payment received — update fan spending data

EVENT
tips.received

Fan sent a tip — update fan profile and trigger alerts

Building an OnlyFans CRM — Frequently Asked Questions

Common questions about using OnlyFans API as your CRM backend.

Build the Next Great OnlyFans CRM. We Handle the Infrastructure.

Start free. Ship your first auth flow and inbox in a day.