ofapisv1
solution

OnlyFans Automation API

If it's repetitive, it's automatable. ofapis turns the manual parts of running an OnlyFans presence — replying, broadcasting, scheduling, segmenting — into REST calls you orchestrate from your own code, on a schedule, across many creators. No browser automation, no session babysitting: accounts are linked once and ofapis keeps the session alive behind an encrypted, per-account proxy.

The building blocks

Workflow Endpoint Trigger
Reactive replies POST /accounts/{id}/chats/{chatId}/messages message.received webhook
Broadcasts POST /accounts/{id}/mailings/preview/trigger Schedule or campaign
Scheduled posts POST /accounts/{id}/scheduled/posts Content calendar
Scheduled messages POST /accounts/{id}/scheduled/messages Drip / follow-ups
Segments POST /accounts/{id}/lists + /users Nightly scoring job
Media POST /accounts/{id}/vault/media Upload then attach

All paths sit under https://api.ofapis.com/api/public/v1.

A campaign is one wrapped operation

The point of an automation API is that hard things become idempotent objects, not fragile fan-outs you have to make reliable yourself. A broadcast is a three-step mailing — preview to see the exact reach and cost, then trigger:

# 1. Create the mailing (message + target segment)
curl -X POST https://api.ofapis.com/api/public/v1/accounts/42/mailings \
  -H "Authorization: Bearer ofapis_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"new-drop","text":"New drop is live 🎬","listId":"9"}'

# 2. Preview recipient count + credit cost BEFORE committing
curl -X POST https://api.ofapis.com/api/public/v1/accounts/42/mailings/9d4c1e77-3b2a-4f68-a5c9-7e10b2f8d341/preview \
  -H "Authorization: Bearer ofapis_sk_..."

# 3. Dispatch
curl -X POST https://api.ofapis.com/api/public/v1/accounts/42/mailings/9d4c1e77-3b2a-4f68-a5c9-7e10b2f8d341/trigger \
  -H "Authorization: Bearer ofapis_sk_..."

The preview step means an automation never surprises your balance — you can gate the trigger on the estimated cost.

A realistic automation loop

  1. message.received webhook fires → your worker drafts and sends a reply.
  2. A nightly job pulls /subscribers and /notifications, scores fans, and rebuilds segments with the lists endpoints.
  3. A scheduled campaign previews and triggers a mass DM to the freshly-built segment.
  4. POST /scheduled/posts queues the week's content so nothing depends on someone being awake.

Why per-call billing suits automation

One successful call is one credit; failed calls (expired session, upstream error) are free. Cost tracks work done, not a seat count — so a retrying worker or a nightly batch stays predictable. A single Bearer token covers your whole roster; scope any workflow to a creator with accountId.

FAQ

Do I need a headless browser or Selenium?

No. ofapis holds the OnlyFans session server-side and exposes plain HTTPS endpoints, so your automation is ordinary REST — no browser, no login refresh cron, no captcha handling.

How do I avoid charging myself for retries?

Only successful calls cost a credit; failures from an expired session or an upstream error are not billed. That makes an at-least-once worker safe — retry freely without watching the meter.

Can one integration automate many creators?

Yes. Every resource has an account-scoped form (/accounts/{accountId}/...), so the same code runs across a whole roster under one token. See agency automation.

What's the difference between mailings and scheduled messages?

A mailing is a one-shot broadcast to many fans with a cost preview; scheduled messages are timed one-to-one or drip sends. Use mass DMs for campaigns and scheduling for follow-ups.

Start free · Python quickstart · Browse the full spec

Related: OnlyFans automation guide

Related guides

All guides
Start free — 250 credits, no card
Generate a token and make your first call in minutes.
Get started