Messaging
An OnlyFans messaging API, with a person in the loop
Read every chat on the accounts you manage, search message history and ask to send direct messages, paid messages and mass messages. By default a send waits as a pending action with a plain summary, and an owner or admin approves or rejects it in the dashboard.
curl https://betterfans.link/v1/accounts/$ACCOUNT_ID/actions \
-H "Authorization: Bearer $BFL_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"type": "send_message",
"params": {
"fanId": "482913377",
"text": "The full set from Sunday, just for you.",
"priceCents": 1200,
"mediaIds": ["3318820145", "3318820146"]
}
}'
# 202 Accepted. Nothing is sent until someone approves it:
# "status": "pending",
# "summary": "Send a $12 message to @milo_k",
# "approvalUrl": "https://betterfans.link/approve/act_4fQ9rT2mX8bLk1Wz7cN3pD6e"Messaging API
What the OnlyFans messaging API does
Chats and messages
List chats with unread counts and spend, then read the messages in any of them. A chat id is the fan id, so one id opens both the fan and the conversation.
Live reads that stay unread
Add ?fresh=true to read a chat live. Reading a chat on OnlyFans marks it read, so we put the unread state back and say so in meta.sideEffects if that ever fails.
Search
Find words across an account's messages, for one fan or a date range.
Paid messages
Set priceCents and attach vault media ids to send a PPV message. OnlyFans needs at least $3, and a lower price is refused when you make the request.
Mass messages
Send to fan lists or chosen fans and leave lists out. The approval shows the estimated recipients, and an unsend takes back every copy at once.
Safe retries
Every write carries an Idempotency-Key header. Retrying with the same key and body returns the original action instead of making a second one.
Mass messages
Send OnlyFans mass messages through the API
Create a send_mass_message action with the text, an optional price and vault media, and an audience: fan lists to send to, lists to leave out and up to 1,000 fans by id. Afterwards, GET /v1/accounts/{accountId}/mass-messages shows how many fans got, viewed and bought each one, and what it earned. Mass messages work on OnlyFans accounts only.
FAQ
Frequently asked questions
Can I send OnlyFans messages through an API?
Yes. POST to /v1/accounts/{accountId}/actions with type send_message, the fan id and the text. By default the API answers 202 with a pending action and an approval link, and the message goes to OnlyFans once an owner or admin approves it. Your key needs the write scope, and writes must be turned on for that account.
How do I send a pay-per-view message?
Add priceCents and one or more vault media ids to a send_message action. OnlyFans needs a price of at least $3, or 300 cents, and the most is $20,000. The approval card shows the price and the media, so the person approving sees exactly what the fan will be asked to pay.
Does it support OnlyFans mass messages?
Yes. A send_mass_message action takes the text, an optional price and media, and an audience of fan lists, excluded lists and single fans. The pending action shows how many fans it will reach. To take one back, an unsend_message action with the mass message id removes every copy.
Will reading a chat mark it as read for the creator?
No. Reads without fresh=true never touch OnlyFans. A live read with ?fresh=true does open the chat on OnlyFans, so we restore its unread state straight after. If that restore ever fails, the response lists thread_marked_read in meta.sideEffects so you know.
Related
Related features
GET STARTED
Build it in test mode today.
Sign up, make a test key and work against sandbox creators. Link a real account when your flow is ready.
Questions first? Write to hello@betterfans.link.