Skip to content
Fans 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.

[API ENDPOINTS & WEBHOOKS]

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.

background

Creator Auth

@onlyfansapi/auth opens a secure modal in your app

background

Account Connected

You get the account ID and profile data

background

Your CRM

Chats, fans, media, and revenue via API

background

Live Webhooks

Messages, subs, and payments in real time

[CRM CORE CAPABILITIES]

Complete OnlyFans API Suite for Modern Agency CRMs

From seamless creator authentication to real-time chat sync, media pipelines, and financial tracking — every layer of your CRM backend is covered.

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 authentication.

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 pricing.

Media Upload & Download

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

WEBHOOKmessages.ppv.unlocked
Fires when a fan unlocks paid content to track PPV revenue.
POST/api/{account}/media/upload
Upload files or URLs to the OnlyFans CDN for messages and posts.

Fan Management & Lists

Fetch subscriber lists, segment fans with custom labels, view spending history, and build smart lists for targeted outreach.

WEBHOOKsubscriptions.new
Fires when a new fan subscribes to track growth and trigger onboarding.
GET/api/{account}/fans
List fans with spending tier, subscription status, and metadata.

Revenue & Earnings Analytics

Track transaction feeds, earnings breakdowns, payout histories, and chargebacks. Build financial dashboards with real-time accuracy.

WEBHOOKtransactions.created
Fires on every tip, post purchase, and subscription renewal.
GET/api/{account}/earnings
Real-time revenue metrics broken down by stream and date.

Feed & Post Publishing

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

WEBHOOKposts.liked
Fires when a fan likes a post so you can measure engagement.
POST/api/{account}/posts
Create and schedule posts with media, captions, and publishing options.
[DEVELOPER QUICKSTART]

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.fansapi.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);
  }
});
[ENDPOINTS & WEBHOOKS]

Essential Endpoints & Webhooks for CRM Architecture

Every endpoint and webhook needed to sync accounts, stream live messages, and manage content in your custom CRM.

API

Endpoints

  • 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

View all 200+ endpoints in the docs
WEBHOOK

Webhook 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-authentication.

  • 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 — automatically create a fan profile in your CRM.

  • EVENT
    subscriptions.renewed

    Subscription renewed — update lifecycle status.

  • EVENT
    transactions.new

    Payment received — update fan spending and revenue analytics.

  • EVENT
    tips.received

    Fan sent a tip — update fan profile and trigger notifications.

View all 25 webhook events in the docs
[faq]

Building an OnlyFans CRM — Frequently Asked Questions

Common questions about using OnlyFans API as your CRM backend.

Do you have more questions?Contact Us

[build your crm faster]

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

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

dashboard
effect