THE ONLYFANS API
The OnlyFans API for agencies and developers
OnlyFans has no public developer API. The Only API is the third-party OnlyFans API that closes that gap — 200+ documented REST endpoints for messaging, mass DMs, fans, subscribers, earnings, payouts, posts, the vault, and campaigns. Unlimited API calls, no credit system, sub-50ms typical responses, and a free plan for one account so you can build before you pay.
Does OnlyFans have an API?
Not officially. OnlyFans does not publish a developer API, issue API keys, or run a developer portal. So when agencies and developers search for an "OnlyFans API," what they actually need is a reliable third-party layer that turns the platform into clean, authenticated REST endpoints — without scraping the web app or maintaining brittle browser automation.
That is exactly what The Only API provides. We handle login (including 2FA and face-verification), session management, request signing, and human-realistic pacing, then expose 200+ endpoints under a single API key. You write normal HTTP requests; we keep the connection to OnlyFans alive and safe.
What the OnlyFans API covers
Every group below is live on all plans — there is no feature gating between tiers. Pricing depends only on connected accounts.
| Feature | The Only API | Official OnlyFans API |
|---|---|---|
| Messaging & mass DMs | Send direct messages, mass DMs with token substitution, PPV pricing, and media attachments. Read conversations, mark read, and queue welcome flows. | — |
| Posts & vault | Create feed posts and stories, schedule them per timezone, set paywall pricing, and manage vault media for reuse across accounts. | — |
| Fans & subscribers | List and segment fans, read spend and engagement, tag fans, and pull active/expired subscriber lists per account. | — |
| Earnings & payouts | Read earnings by period and category, transaction-level history (tips, PPV, subscriptions, refunds), and request/track payouts. | — |
| Campaigns & automations | Create campaigns and claimers, build rules (trigger → conditions → action), and run win-back and tip-auto-reply flows. | — |
| Events & webhooks | Subscribe to HMAC-SHA256-signed webhooks for every event, with [5s, 30s, 5m, 30m, 2h] retries and auto-deactivation, plus an SSE stream. | — |
“Official OnlyFans API” column is “—” because OnlyFans publishes no equivalent public developer API as of 2026.
A real OnlyFans API request
Send a welcome DM with a vault attachment. Authentication is a single X-API-Key header; the {name} token is substituted per fan.
curl https://theonlyapi.com/api/crm/messages \
-H "X-API-Key: $YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"of_user_id": "123456",
"text": "Hey {name}, thanks for subscribing — here is your welcome gift 🎀",
"media_ids": [987654],
"price": 0
}'Why developers pick The Only API
Unlimited calls, no credits
We do not meter requests. Poll subscriber lists every minute, run analytics at 3 a.m., blast a campaign — your bill is per connected account, never per call.
200+ endpoints, one key
Messaging, mass DMs, posts, vault, fans, subscribers, earnings, payouts, and campaigns — all behind a single API key with multi-account support.
Sub-50ms, signed webhooks
Cached endpoints respond in under 50ms. Every event streams to your URL via HMAC-SHA256-signed webhooks with exponential retries.
Zero bans in 5+ years
Isolated sessions, optional dedicated proxies, and human-realistic pacing. Account safety is a hard constraint, not a marketing line.
New
Multi-platform support & data portability
The same API now powers Fansly alongside OnlyFans, and lets you export a full copy of any account's data. Two guides to get you started:
Fansly API support
Manage Fansly and OnlyFans accounts — messages, earnings, tips, and fans — through one normalized API and dashboard.
Read the guide →Export your OnlyFans & Fansly data
Download a full copy of your data — messages, tips, subscribers, and earnings — by date range, in clean CSV and JSON.
Read the guide →OnlyFans API — FAQ
The questions agencies and developers ask before building.
Build on the OnlyFans API today
One account, all 200+ endpoints, unlimited calls, no credit card.