CreatorAPI Integration Quickstart
Connect creator accounts, validate your access, read revenue, download exports and verify webhooks. Platform and dataset availability depend on your plan and the connected platform. Base URL: https://api.creator-api.com
Tracking links and revenue
List existing OnlyFans campaigns with GET /v1/{account}/native/campaigns. For each campaign ID, read /v1/{account}/tracking-links/{campaign_id}/transactions to add gross/net USD for explicit date_start/date_end timestamps. A cold report returns HTTP 202: wait for Retry-After and repeat the same GET until 200. A native fan-profile 404 yields attribution_complete=false: overall totals null, known and unresolved amounts separate. Never replace missing attribution with zero.
For CreatorAPI Smart Links, list GET /api/smart-links?account_ids={account}, then read each /api/smart-links/{id}/conversions for the period. Omit conversion_type for all revenue, including paid acquisitions. The list's revenue is all stored gross revenue, not a date-filtered figure.
Step-by-step guide, error handling and copyable Python revenue table
A readonly key suffices for reporting. To capture clicks and UTMs going forward, create a Smart Link with a full key and advertise its returned /go/{id} URL. Native historic links cannot reconstruct clicks/UTMs, and memberships may overlap.
1. Authenticate
Create your account at signup, confirm your email, then obtain your API key from the dashboard. Email confirmation, platform entitlement, account access, active creator slots and credit balance are separate checks.
Set your key on your backend or in your own terminal:
export CREATOR_API_KEY='YOUR_KEY'
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
https://api.creator-api.com/v1/whoami
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
https://api.creator-api.com/v1/billing
The header Authorization: Bearer YOUR_KEY also works. Inspect scope, accounts, email_verified and account_limits in whoami. An absent or invalid key returns 401; a valid key does not automatically include every account or platform.
| Scope | What it allows |
|---|
| readonly | Authorized data reads. Export creation, cancellation and retry are also supported because they read provider data; creation is billed. |
| full | Authorized reads plus provider writes, account connection and webhook management. Export deletion requires full scope. |
Staff/team sessions additionally require the corresponding permissions. Native writes affect the real connected creator: messages, subscriptions and deletions are live actions. Keep the key out of browser JavaScript and click URLs. Do not use a production write as an authentication check; the GET requests above are sufficient.
2. Connect a creator account
You call the API on behalf of a creator account you own or manage. There are two ways to connect one · pick whichever you prefer.
Option 1 · Session import (recommended, no password)
Session import uses your existing authenticated browser session. Session cookies and tokens grant account access: keep them private, submit them only to the connection endpoint, and never put them in support messages or public examples.
Grab four values from a browser where you are logged in to onlyfans.com:
| Value | Where to find it |
|---|
auth_id | DevTools (F12) → Application → Cookies → https://onlyfans.com → value of the auth_id cookie |
sess | same place → value of the sess cookie |
x_bc | DevTools → Network → click any request to onlyfans.com → Request Headers → value of x-bc (or Application → Local Storage → bcTokenSha) |
user_agent | DevTools → Console → type navigator.userAgent and copy the string |
Choose a unique creator_id for this connection, for example my_onlyfans_creator. Session import requires this field; the API does not generate it for you. Keep the returned ID for later calls. Connecting requires a full-scope key and valid account credentials.
Then connect:
curl -X POST https://api.creator-api.com/v1/connect/import \
-H "X-API-Key: $CREATOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"creator_id": "my_onlyfans_creator",
"platform": "onlyfans",
"proxy_mode": "managed",
"auth": {
"auth_id": "...",
"sess": "...",
"x_bc": "...",
"user_agent": "..."
}
}'
For Fansly set "platform": "fansly" and send auth with token (the authorization header on any apiv3.fansly.com request) and deviceId (the fansly-client-id header).
Already have a cookie export? Paste a raw browser cookie list instead · send auth as { "cookies": [ { "name": "auth_id", "value": "..." }, ... ], "user_agent": "..." } and we map it for you. Any cookie export browser extension produces this.
Proxy · your choice. Native OnlyFans and Fansly sessions run behind a residential proxy so the account stays consistent. Pick one with proxy_mode:
"proxy_mode": "managed" (recommended) · we route the account through a secured CreatorAPI residential proxy. Nothing to set up, no proxy to buy, matched to the creator's country."proxy_mode": "own" · bring your own · add "proxy": "http://user:pass@host:port" to pin a specific IP.
Leave proxy_mode out and we infer it: a proxy you supply means own, otherwise managed. Official platforms (Instagram, X, TikTok, ...) need no proxy · just an OAuth access_token in auth.
Option 2 · Login with OnlyFans (assisted)
Prefer to just log in? No DevTools, no cookie hunting. Click + Connect account in your dashboard for a guided browser window, or drive it yourself:
curl -X POST https://api.creator-api.com/v1/connect/session \
-H "X-API-Key: $CREATOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "platform": "onlyfans", "proxy_mode": "managed" }'
The response carries session_id and iframe_url · show iframe_url to the creator to log in, then poll:
curl -X POST https://api.creator-api.com/v1/connect/session/{session_id}/complete \
-H "X-API-Key: $CREATOR_API_KEY"
Repeat the completion request while status=pending, then wait for status=connected and verified=true. A start request alone does not mean the account is connected. Hosted-browser availability depends on server configuration; HTTP 503 means use session import instead. creator_id is optional for hosted-browser start: it is generated if omitted. The browser flow captures the authenticated session.
Check the completed connection:
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
https://api.creator-api.com/v1/accounts
export CREATOR_ACCOUNT='my_onlyfans_creator'
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/native/me"
The account list is a JSON array. Use its creator_id as {account}; inspect platform, active and session_status. An inactive account needs capacity or activation through the dashboard before data calls work. session_status=needs_reconnect means its captured session must be renewed. Never send a literal {account}, a username or a native numeric fan ID in place of the connected ID. For a rejected request, follow the account-access and inactive-slot checklist.
This quickstart demonstrates OnlyFans and Fansly session connection. Use the separate 4based reference and Fanvue reference for their connection and entitlement requirements. Do not assume that an OnlyFans session, dataset or analytics path works on every platform.
3. Make a call
Both platforms share one pattern. The {account} decides which platform is hit, so the same key and the same route serve OnlyFans and Fansly:
{METHOD} https://api.creator-api.com/v1/{account}/native/{path}
Example, list a creator's subscribers on OnlyFans:
curl -H "X-API-Key: $CREATOR_API_KEY" \
"https://api.creator-api.com/v1/{account}/native/subscriptions/subscribers?limit=50"
The following GET shorthands are rewritten for you, because the platform serves them under a longer path. For profile changes use the catalog's concrete OnlyFans path PATCH /native/users/me, rather than guessed /profile, /settings or a path with an /api2/v2 prefix:
| You call | OnlyFans serves |
|---|
native/me | /users/me |
native/transactions | /payouts/transactions |
native/earnings | /users/me/stats/overview |
native/users/me/posts | /users/{your id}/posts |
native/posts/archived | /users/{your id}/posts/archived |
The last two matter because OnlyFans keeps a creator's own posts under the numeric user id and answers every me spelling with 404. Note that plain native/posts is not a shorthand: it is the account's home feed, every creator it follows, exactly as the platform serves it.
The full path catalog per platform is in the reference files:
4. Billing (credits)
Calls draw credits from your balance. Unmetered keys (internal) are never charged.
| Action | Credits |
|---|
| Native read (GET), except Fanvue | 1 |
| Native write, except Fanvue | 2 |
| Available Fanvue account features | 0; included in the slot |
| Webhook write (other supported platforms) | 1 |
| Smart link write (other supported platforms) | 1 |
| Tag write | 0 |
| Data export job (other supported platforms) | 10 |
| Fan AI summary (other supported platforms) | 25 (cache hit free) |
Fanvue billing
All available features for a connected Fanvue account are included in its creator slot: 0 additional credits. This covers native reads and writes, supported media operations, native Fanvue webhooks, and available CreatorAPI-managed webhooks and account-scoped Smart Links. There is no separate Fanvue call or feature credit charge.
A positive credit balance is not required for these Fanvue operations, and they do not consume the daily credit cap. The slot or plan price still applies. Authentication, verified email, plan entitlement, active creator slots, permissions, OAuth scopes and request rate limits remain in effect.
Availability: Fan AI summaries and CreatorAPI export jobs currently do not support Fanvue. They are not included as working features by this pricing statement. Check platform and dataset support before integrating. Available Fanvue functions are covered by the slot; zero-credit pricing does not enable unsupported endpoints.
Other platforms keep their published credit prices. Workspace-wide short links at /v1/links are not account-scoped Fanvue features; use the documented account-scoped route for Fanvue Smart Links.
Buy credits through Stripe Checkout:
curl -X POST https://api.creator-api.com/v1/billing/checkout \
-H "X-API-Key: $CREATOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "plan_id": "pack_25k" }'
The response carries a Stripe URL. On payment the credits land automatically. See GET /v1/billing/plans for the packs and GET /v1/billing/orders for history.
Creator slots (add accounts through the API)
Your plan includes a number of creator accounts. Extra creators are slots, bought per platform. You can manage them with your normal API key (scope full), no dashboard needed.
Check capacity:
curl -H "X-API-Key: $CREATOR_API_KEY" https://api.creator-api.com/v1/billing/slots
The response carries limits (base, onlyfans, fansly, total) and, per platform, the current extra slot count and the monthly amount_usd per slot on your plan.
Set the number of extra slots for one platform:
curl -X POST https://api.creator-api.com/v1/billing/slots \
-H "X-API-Key: $CREATOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "platform": "onlyfans", "count": 3, "creator_id": "optional_creator_to_activate" }'
count is absolute, not an increment. To add one slot, read the current count and send count plus 1.- An increase is charged to the card on file right away, prorated for the rest of the billing period. Your billing date does not move. If the payment fails you get
402 and nothing changes. - A decrease is credited on your next invoice. Slots that active creators still occupy cannot be removed, you get
409 with error code slots_in_use. Disconnect the creator first with DELETE /v1/accounts/{creator_id}. - The new limit applies immediately. Connected but inactive creators that now fit go live in the same call and are listed under
activated.
Move one slot to another platform with POST /v1/billing/slots/switch and body { "from": "fansly", "to": "onlyfans" }. You are charged or credited only the price difference.
How this fits your connect flow: a valid, verified connection can be stored inactive when capacity is full. Invalid credentials, missing platform access or unavailable proxies can still reject a connection. When capacity is full, the successful connect response says "active": false, and calls to that creator return 403 with error code slot_inactive. Buy a slot with the creator_id and the creator goes live. GET /v1/accounts returns the same active flag per creator. A creator goes live when both the limit of its platform and limits.total have room, because the accounts included in your plan are one shared pool across platforms. Slots need an active paid plan that includes the platform.
6. Errors
Check the HTTP status before treating JSON as data. Handled /v1 errors use:
{"error":{"code":"unauthorized","message":"invalid or missing API key","status":401}}
Read error.code, error.message, optional error.hint and the HTTP status. Framework validation errors can instead return detail: [...], and metric-source errors can return a detail string; report endpoints under /api can use error with a string or object. OAuth/MCP errors keep their own protocols. Do not assume every successful response has a data envelope: account lists, analytics, export jobs and webhook resources use their own documented shapes.
| Status | Action |
|---|
| 400 / 422 | Correct missing body fields, parameters, dates or IDs before retrying |
| 401 | Check the key and authentication header |
| 402 | Check credits and the daily spending cap |
| 403 | For account-access and slot errors, follow the 403 diagnosis and recovery steps. Otherwise check email verification, write scope, platform entitlement and staff permissions. |
| 404 | Check the object/account ID; an object owned by another key can also appear absent |
| 409 | Resolve the reported state conflict; for exports, wait for the worker to stop |
| 429 | Wait for Retry-After, then retry the read |
| 502 / 503 | Keep data unavailable; inspect the error, connection health and Retry-After |
Retry transient GET failures with a bounded wait. Do not blindly retry an uncertain POST that creates a link, export, webhook, subscription, checkout or message: first reconcile the existing result. A timeout does not prove that the action failed.
Fix account access and inactive slots
Use this checklist for an HTTP 403 on a connected creator. Inspect both error.code and error.message: forbidden alone has several possible causes. These two account-access failures happen before the provider request. Repeating the same request without correcting access will keep failing.
Diagnose with the same key as your integration
Run these reads using the exact key configured in the failing application:
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
https://api.creator-api.com/v1/whoami
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
https://api.creator-api.com/v1/accounts
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
https://api.creator-api.com/v1/billing/slots
In whoami, check accounts and scope. In the account-list array, find the exact creator_id used in the failed URL and inspect platform, active and session_status. The slot response shows capacity under limits. Use the platform and shared total limits; whoami.account_limit alone is not proof of available capacity.
| Exact error | Meaning | Next action |
|---|
error.code=forbidden and message key not scoped for account '...' | This key does not include the requested connected account ID. | Correct the account ID or use the key for the workspace that owns the connection. |
error.code=slot_inactive | This key includes the connection, but it is inactive. | Activate the creator in the dashboard if capacity is available; otherwise choose which creator occupies a slot or explicitly add capacity. |
Key not scoped for account
An example response, with an illustrative connected account ID:
{"error":{"code":"forbidden","message":"key not scoped for account 'my_onlyfans_creator'","status":403}}
- Compare the account in the failed URL with
creator_id from GET /v1/accounts. Use that exact ID, not a handle, native numeric ID, platform name or undefined. - If it is missing, check that the application uses the key belonging to the workspace where the creator was connected. A different key can authenticate successfully while lacking this account.
- If the creator has not been connected to the intended workspace, its owner must complete the connection workflow. A connection owned by another key is not automatically transferred by importing it again; resolve the owning workspace first.
- Repeat the account-list read with the corrected key. Once the correct account is present and active, retry the original read once.
Changing a key from readonly to full does not grant another account. A slot purchase and a platform-session reconnect do not fix a wrong key or account ID. For employee access, also select the intended workspace and check the account/role assignment in the team workspace guide.
Connected but inactive: slot_inactive
The response uses error.code=slot_inactive; its error.account identifies the connection and error.hint points to slot management. The same creator appears with active=false in GET /v1/accounts.
- Sign in to the owning dashboard and locate the creator marked Inactive.
- If there is free capacity for its platform and the shared total, choose Activate.
- If capacity is full, either deactivate another creator you intentionally want to pause, or choose Buy slot / Upgrade. Deactivation keeps that creator connected but pauses its API calls. Buying capacity changes billing; review the cost before confirming.
- Read
GET /v1/accounts again with your application's key. Confirm active=true, then retry the original read once.
The dashboard activation/deactivation routes require a signed-in dashboard session. A normal API key, including a full key, cannot use those routes to rotate active creators. For integrations that intentionally purchase capacity, the public POST /v1/billing/slots workflow is documented under Creator slots: it needs full scope, an eligible paid plan, an absolute count and optionally the target creator_id. An increase can charge the card immediately. This is not a free activation request.
Do not automatically retry either 403, buy slots or reconnect sessions in a polling loop. Pause the affected account until its access state changes. If session_status=needs_reconnect remains after access is corrected, renew the platform session separately; account access, active capacity and session validity are independent.
Verification of these two errors
On 2026-10-14, a temporary restricted key and our own connected OnlyFans accounts returned both exact errors through the public API. The account list excluded the unscoped account, then showed active=false for the connected inactive account. After restoring that temporary key's access, a real provider profile read returned 200 with the expected native account ID. Both rejected reads consumed zero credits; the temporary key and unused credits were cleaned up. The first test changed only the temporary test key's allowlist/active state. A subsequent real Chrome test used the public password-login form and the dashboard's Deactivate and Activate buttons with a temporary own test user and one own OnlyFans creator. Login and both button actions returned 200; the native profile returned slot_inactive/403 while deactivated and 200 with the expected native account ID after reactivation. All 17 successful API responses were 200; the single 403 was the expected inactive-state check. The creator was restored, and the test user, session, saved credentials and browser profile were removed; the test key was revoked and unused credits cleared. Existing account/key activation states were unchanged.
The test user was provisioned internally and marked verified before the real login. Signup/email delivery, a paid slot purchase, paid-plan capacity changes and a customer-session reconnection were not exercised. The test used the default one-creator allowance; it does not establish every customer's integration.
7. Build with Claude or Codex
Don't want to write any code? Add https://api.creator-api.com/mcp as a connector in claude.ai or ChatGPT, sign in with your CreatorAPI account, and ask about your fans, messages or earnings in plain English. No key to paste, nothing to install.
To generate your own calls instead, paste llms-full.txt (the whole API in one file) into Claude or Codex and describe what you want to build. The model then writes working calls against every route below. Machine readable catalogs: capabilities-onlyfans.json, capabilities-fansly.json, and the OpenAPI spec at https://api.creator-api.com/openapi.json.
8. Revenue reports
For total OnlyFans account revenue, use the first-party analytics route rather than a raw native page or a profile's lifetime spending. A readonly key suffices.
curl --fail-with-body --get \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/analytics/earnings" \
-H "X-API-Key: $CREATOR_API_KEY" \
--data-urlencode 'start_date=2026-09-01' \
--data-urlencode 'end_date=2026-09-30'
The response is a top-level object, not data.summary. Read total_gross, total_net, total_fees, count, currency, start_date, end_date, end_exclusive and period_complete. Amounts are signed USD from the native financial ledger. Net is provider net, not profit after your own operating costs.
Related GET reports:
| Report | Path and filters | Response |
|---|
| Payment statuses | /v1/{account}/analytics/transactions/summary?start_date=2026-09-01&end_date=2026-09-30 | Object with totals and by_status |
| Revenue types | /v1/{account}/analytics/transactions/by-type?start_date=2026-09-01&end_date=2026-09-30 | Array of type/totals objects |
| Daily/monthly history | /v1/{account}/analytics/historical?start_date=2026-09-01&end_date=2026-09-30&interval=day | Array with period and gross/net/fees/count |
| Fans for the period | /v1/{account}/analytics/fans?start_date=2026-09-01&end_date=2026-09-30&limit=100&offset=0 | Object with fans, has_more and unattributed |
| Compare periods | /v1/{account}/analytics/comparison?period_a_start=2026-09-01&period_a_end=2026-09-30&period_b_start=2026-10-01&period_b_end=2026-10-10 | Object with period_a, period_b, change and change_percentage |
Use start_date/end_date for these analytics endpoints. Date-only end values include the full UTC day. Timestamp ends are exclusive: September can also be expressed as start 2026-09-01T00:00:00Z, end 2026-10-01T00:00:00Z. Most monetary reports default to 30 days, while historical defaults to 365 days; supply dates explicitly to avoid accidental default periods.
OnlyFans tracking-link reports instead use date_start/date_end and inclusive timestamp ends. Their campaign-member totals are different from account-wide analytics. See the tracking guide. These first-party analytics routes currently support OnlyFans; for Fansly monetary reporting use its native reference or the profitability guide. A Fansly account on an OnlyFans analytics route returns 422.
A malformed ledger or incomplete pagination fails the report, rather than becoming a partial total or zero. Today's period can have period_complete=false. Rows without a fan identity stay in the unattributed totals of the fan report. Do not multiply subscription counts by a current subscription price to infer revenue.
9. Export to a downloadable file
Discover datasets for the account's actual platform first:
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
"https://api.creator-api.com/v1/exports/datasets?platform=onlyfans"
This returns an array of dataset names. The job API supports OnlyFans, Fansly and 4based, with different datasets; Fanvue exports are unavailable in this release. Use platform=fansly or 4based when appropriate. A union catalog without a platform does not mean every dataset works on every account.
To export September's OnlyFans transactions:
curl --fail-with-body -X POST \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/exports" \
-H "X-API-Key: $CREATOR_API_KEY" -H 'Content-Type: application/json' \
-d '{"dataset":"transactions","fmt":"jsonl","params":{"start_date":"2026-09-01","end_date":"2026-09-30"}}'
The format field is fmt, not format. Values are csv (default), jsonl, xlsx and zip. Data ZIP contains records and a manifest, not original media. The job starts automatically. Its response is a top-level job object with id and status; creation does not mean the file is ready.
Poll GET /v1/exports/{job_id} until status=completed, failed or cancelled. Intermediate states are queued and running. On completion, inspect row_count and download using the returned download_url, or use GET /v1/exports/{job_id}/download with your key. The signed URL is a bearer secret that needs no API key and expires; obtain a fresh completed status if it expires. Downloading before completion returns 409. Failed jobs have no downloadable partial file.
Save the following as export_transactions.py, set your key/account as above, and run python3 export_transactions.py. It creates one real billed export job, waits up to ten minutes and downloads a completed file. It never repeats the creation POST. For another period, change START and END before running.
import json
import os
import time
from pathlib import Path
from urllib.error import HTTPError
from urllib.parse import quote
from urllib.request import Request, urlopen
BASE = "https://api.creator-api.com"
KEY = os.environ["CREATOR_API_KEY"]
ACCOUNT = quote(os.environ["CREATOR_ACCOUNT"], safe="")
START, END = "2026-09-01", "2026-09-30"
OUTPUT = Path(os.environ.get("EXPORT_OUTPUT", "transactions.jsonl"))
def api(method, path, payload=None):
body = json.dumps(payload).encode() if payload is not None else None
request = Request(BASE + path, data=body, method=method,
headers={"X-API-Key": KEY, "Content-Type": "application/json"})
try:
with urlopen(request, timeout=60) as response:
return json.load(response)
except HTTPError as error:
detail = error.read().decode("utf-8", errors="replace")
raise RuntimeError("HTTP " + str(error.code) + ": " + detail[:300]) from None
job = api("POST", "/v1/" + ACCOUNT + "/exports", {
"dataset": "transactions", "fmt": "jsonl",
"params": {"start_date": START, "end_date": END}})
job_id = quote(job["id"], safe="")
print("Export ID:", job["id"], flush=True)
deadline = time.monotonic() + 600
while job["status"] in ("queued", "running"):
if time.monotonic() >= deadline:
raise TimeoutError("Keep the export ID and check its status later; do not create again")
time.sleep(2)
job = api("GET", "/v1/exports/" + job_id)
if job["status"] != "completed":
raise RuntimeError("Export " + job["status"] + ": " + str(job.get("error", "")))
request = Request(BASE + "/v1/exports/" + job_id + "/download",
headers={"X-API-Key": KEY})
# 'xb' preserves an existing local file; choose another EXPORT_OUTPUT to download again.
with urlopen(request, timeout=60) as response, OUTPUT.open("xb") as output:
while True:
chunk = response.read(1024 * 1024)
if not chunk:
break
output.write(chunk)
print("Downloaded", job["row_count"], "rows to", str(OUTPUT))
Transaction-export date filters live inside params; do not send the tracking-report date_start/date_end fields. OnlyFans transaction date-only ends include the whole UTC day; timestamp ends are exclusive. Filters are dataset-specific, so check the reference before adapting them to Fansly or another dataset.
Optional max_rows is an integer from 1 to 1,000,000 and deliberately caps the output. Native retention, endpoint ceilings and account changes during collection can still limit coverage. OnlyFans expired_fans retains the native 5,000-row ceiling. A completed limited export does not mean you exported the entire account. For one conversation use dataset=chat_messages and params.chat_id, rather than expecting message history in the chats metadata dataset.
Creating a job costs 10 credits; status/list/download are free. Failed or empty jobs use the refund/reconciliation process. Cancellation is not a promise of a refund. A readonly key can create, cancel and retry its accessible exports; deletion requires full scope. Staff also need the corresponding export permissions. Jobs normally belong to the creating key: another key with the same account access does not automatically see or download them.
Use POST /v1/exports/{job_id}/cancel to stop a job, and wait for its worker to settle. Use POST /v1/exports/{job_id}/retry for a failed/cancelled job; a still-stopping worker can return 409. Retry uses the existing job/reservation policy rather than charging a new creation fee. Full-scope DELETE /v1/exports/{job_id} removes a terminal export and its output, never the source platform data.
10. Receive and verify webhooks
First deploy your own public HTTPS receiver, then create a subscription with a full key. A private/loopback URL is rejected. Creating a webhook can enable delivery of real account events to your receiver; use your own endpoint and handle duplicates before you subscribe.
Read GET /v1/webhooks/events for the event catalog. Events are not universally available on every platform; a listed event name does not prove that the connected platform exposes all required source data. Workspace export/summary events also have their own ownership rules described in the workspace guide.
export WEBHOOK_URL='https://YOUR_PUBLIC_HOST/creatorapi/webhook'
curl --fail-with-body -X POST \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/webhooks" \
-H "X-API-Key: $CREATOR_API_KEY" -H 'Content-Type: application/json' \
-d "{\"url\":\"$WEBHOOK_URL\",\"events\":[\"transactions.new\"]}"
The response is a top-level webhook object. Save its id and secret; the signing secret is different from your API key. The example uses normal JSON delivery: omit delivery_kind. Discord delivery uses a different body and does not implement the JSON signing contract shown below. Optional custom headers are an object at creation; later resource reads show header names rather than their stored values.
Normal JSON delivery has this envelope (illustrative values):
{"id":"evt_example","event":"transactions.new","account":"my_onlyfans_creator","created_at":1790812800,"data":{"amount":10}}
created_at is Unix seconds, not an ISO timestamp. The amount/data fields depend on the event and platform; do not infer net revenue or currency from this illustrative row. The stable event ID is also sent in X-CreatorAPI-Delivery. Other headers include X-CreatorAPI-Event, X-CreatorAPI-Timestamp and X-CreatorAPI-Signature.
Verify X-CreatorAPI-Signature as sha256= plus HMAC-SHA256 of the EXACT raw request body using the webhook's secret. Parse JSON after checking the signature; reserializing JSON changes the signed bytes.
import hashlib
import hmac
import json
def verify_webhook(raw_body: bytes, signature: str, secret: str) -> dict:
expected = "sha256=" + hmac.new(
secret.encode("utf-8"), raw_body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, signature or ""):
raise ValueError("Invalid CreatorAPI webhook signature")
envelope = json.loads(raw_body)
if not isinstance(envelope, dict) or not envelope.get("id"):
raise ValueError("Invalid CreatorAPI webhook envelope")
return envelope
Persist the event ID together with your processing checkpoint. If an ID was already accepted, return 2xx without applying the business action again. Durably enqueue a validated event, return 2xx quickly, and do slow work asynchronously. Delivery is at least once with bounded retries; it is not an unlimited complete account history.
transactions.new also fires alongside dedicated payment events such as tips.received or messages.purchased. If you only need a payment feed, subscribe to transactions.new alone. Do not add both event families as independent revenue without your own native-transaction deduplication. Periodic financial reconciliation remains necessary for source delays, missed events and late corrections.
After creation, test YOUR receiver:
export WEBHOOK_ID='wh_YOUR_WEBHOOK'
curl --fail-with-body -X POST \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/webhooks/$WEBHOOK_ID/test" \
-H "X-API-Key: $CREATOR_API_KEY" -H 'Content-Type: application/json' \
-d '{}'
curl --fail-with-body -H "X-API-Key: $CREATOR_API_KEY" \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/webhooks/$WEBHOOK_ID/deliveries?limit=20"
The test sends a real HTTP request to the configured receiver. It defaults to webhook.test with test=true, regardless of the normal event filter. A 200 API response alone does not mean delivery succeeded: check ok, receiver status and attempts, then inspect the delivery log. This test verifies transport and signing; it does not simulate a real upstream subscription or payment.
Failed test deliveries are logged but are not retained for replay. After fixing a test failure, send a new test. For failed real event deliveries, fix the receiver before replaying, then first count replayable events without sending them:
curl --fail-with-body -X POST \
"https://api.creator-api.com/v1/$CREATOR_ACCOUNT/webhooks/$WEBHOOK_ID/replay" \
-H "X-API-Key: $CREATOR_API_KEY" -H 'Content-Type: application/json' \
-d '{"dry_run":true,"limit":100}'
Inspect that result, then explicitly use dry_run=false to resend selected failures. Replay preserves original event IDs and skips successful events. It requires an active hook and full scope; paused hooks return 409. Manage pause/resume using PATCH with {"active":false} or {"active":true}. DELETE removes the webhook subscription.
Webhook management/test writes cost one credit; reads and replay are free. A receiver failure reported as ok=false is still a completed test API operation. A realtime webhook is not a financial aggregation or a historical backfill.
11. What has been verified
| Workflow | Verification in this documentation revision | Coverage limit |
|---|
| API-key headers and account access | Actual extracted HTTP handlers with isolated credentials; header/Bearer, invalid key, scope, verification and inactive-account errors | No new customer signup/email or key rotation |
| Session import and hosted-browser completion | Actual HTTP route validation and state transitions with synthetic session/provider services | No fresh live platform login; hosted-browser configuration and valid sessions are still required |
| OnlyFans monetary reports | Actual analytics aggregation and HTTP handlers over paginated synthetic ledger evidence, including reversals and date boundaries | Not a fresh reconciliation of every customer's complete live ledger |
| Export creation, status and download | Actual job service, isolated database/files and HTTP routes; public Python client downloads a real generated fixture file | Provider rows are synthetic; no live billed customer export |
| Webhook creation, signing, tests and replay | Actual subscription/delivery service with isolated storage and an intercepted test receiver; public verification function accepts the signed bytes | No external receiver was contacted and no upstream event was created |
| Tracking link reporting | Separate maintained example and contract checks in the tracking guide | Attribution depends on available source evidence; no new ad-click-to-purchase journey |
The remaining native catalog entries are request templates with historical verification notes. They have not all been re-executed against live creators in this revision. For an operation without a concrete body example, supply its required JSON fields; a route listing or a successful empty response does not prove the business action works.
Messages, posts, media and native tracking-link creation
Complete OnlyFans write workflows: required fields, direct-message and PPV bodies, upload-to-post/media PPV clients, a targeted scheduled queue and native campaign creation. Fresh upload descriptors are single-use. Campaign creation can return a list; the guide selects by unique campaign name. These are real account actions and require full scope.
Integration errors seen in practice
Always take the connected account ID and platform from GET /v1/accounts. undefined, a platform label such as 4based, a username and the native user ID are not connected CreatorAPI account IDs. Never copy an OnlyFans native path into a 4based account request: use the platform reference.
| Symptom | Use/check |
|---|
| OnlyFans profile update 404 | PATCH /v1/{account}/native/users/me; no native version prefix. The catalog's request body fields must match the chosen update. |
| OnlyFans message stats "Date parameter is not set." | Send startDate and endDate as UTC YYYY-MM-DD HH:MM:SS; limit alone is insufficient. See the direct/mass statistics examples in the OnlyFans reference. |
| 4based subscriber read 404 | GET /v1/{account}/native/subscribers; CreatorAPI resolves 4based's own ID. subscriptions/subscribers is an OnlyFans path. |
| Native 401/403 with a valid API key | Check session_status=needs_reconnect and reconnect the platform session; also check account scope/active slot and platform entitlement. An API key cannot renew a platform login. |
| Fan summary using a name/handle | Supply the native fan identifier from the fan/conversation record; a display name is not an ID. 4based uses platform user/chat identifiers; OnlyFans uses numeric fan IDs. |
| Media upload 400 | Read the returned error.message; send multipart file, not an invented JSON upload body. Empty file, wrong format/type and provider conversion failures are separate causes. |
| OnlyFans rejects a paid post | Check the account's native paid-post eligibility; uploading a descriptor does not change it. Media PPV messages use a different action. |
A historical 30-day success rate includes old integration attempts after the cause is corrected. Check recent failures and current session state before treating that percentage as a continuing service outage.