Quickstart
From zero to a working integration — create a panel, connect an account, make your first call.
You need two things before any call works: an API key and a connected creator account.
Get an API key
Sign up at theonlyapi.com and copy your key
from Dashboard → Settings → API Credentials (or Dashboard → API Keys).
The same screen shows your crm_id.
Keys look like a 43-character URL-safe string. Treat one like a password — it grants full access to the panel.
Signing up provisions the panel and its first key together, so there is nothing else to create. See Get an API key.
Set up your environment
export BASE="https://theonlyapi.com"
export CRM="crm_xxxxxxxxxxxxxxxx" # your panel id
export KEY="YOUR_API_KEY" # your API key
export OFUID="482687148" # an of_user_id from GET /accounts (step 4)Connect a creator account
The recommended way is to paste session cookies once. Grab sess and auth_id
from a browser logged into OnlyFans (DevTools → Application → Cookies → onlyfans.com) and send them with a proxy:
curl -X POST "$BASE/api/crm/$CRM/accounts/login/cookies" \
-H "X-API-Key: $KEY" \
-H "X-Proxy: http://user:pass@host:port" \
-H "Content-Type: application/json" \
-d '{
"platform": "onlyfans",
"sess": "<sess cookie value>",
"auth_id": "<the OF user id>"
}'We store the session server-side. You never send cookies again.
For Fansly, paste an auth token instead and the proxy is optional:
curl -X POST "$BASE/api/crm/$CRM/accounts/login/cookies" \
-H "X-API-Key: $KEY" \
-H "Content-Type: application/json" \
-d '{
"platform": "fansly",
"auth_token": "<Fansly bearer token>",
"fansly_session_id": "<Fansly session id>"
}'Full detail: Connect an account
This is the short version. Connect an account covers the rest:
- Credentials login — email/username + password, with Cloudflare and Turnstile handled for you
- Two-factor — what
requires_2falooks like and how to submit the code (the field isotp_code, notcode) - Proxies — why OnlyFans needs one and what happens if you omit it
- Connecting many accounts at once via bulk import
- Enabling write actions, which are off until you turn them on
- Disconnecting and freeing the slot
List your connected accounts
curl "$BASE/api/crm/$CRM/accounts" \
-H "X-API-Key: $KEY"Each entry carries an of_user_id. Despite the name it identifies an account on
either platform, and it is the {of_user_id} path parameter on every CRM route.
It is also the user-id header on the /api2/v2/* passthrough — the only route
in the API that reads that header — but that surface is OnlyFans-only: a user-id
belonging to a Fansly account returns 501 platform_not_supported.
Each row also reports its platform and a capabilities object — the
authoritative per-account answer to "does this work on Fansly?". See
OnlyFans & Fansly.
Make a real call
A normalized CRM read — works for OnlyFans and Fansly:
curl "$BASE/api/crm/$CRM/accounts/$OFUID/balances" \
-H "X-API-Key: $KEY"Or go straight through to OnlyFans, signed for you:
curl "$BASE/api/crm/$CRM/api2/v2/users/me" \
-H "X-API-Key: $KEY" \
-H "user-id: $OFUID"No cookie header, no signing, no proxy rotation — the saved session does the work.
OnlyFans' own body comes back under data, inside a
{ success, status_code, data } envelope.
Those two calls are the two halves of the API, and they behave differently — different response envelopes, different platform support. Read The two surfaces before you build on either.
Where to go next
The two surfaces
When to use the passthrough and when to use the CRM layer.
Cached reads
The /cached routes cost zero platform requests. Use them.
Webhooks
Get pushed new tips, subscribers and messages instead of polling.
Rate limits & quotas
What you can send, and the platform-side limits we do not enforce for you.