OnlyFans Messaging API
Build chat tools, auto-responders and CRMs on top of OnlyFans direct messages without driving a headless browser. The ofapis messaging endpoints let you list a creator's chats, read message history, and send a message — all over authenticated HTTP, billed one credit per successful call. The mental model is three verbs: enumerate chats, read a thread, post into it.
What you can do
- List a creator's chats (paginated, most-recent first).
- Fetch the message history of a specific chat.
- Send a message into a chat.
- Run any of the above globally (first active account) or scoped to a specific linked account for agencies.
Endpoints
GET /api/public/v1/chats
GET /api/public/v1/chats/{chatId}/messages
POST /api/public/v1/chats/{chatId}/messages
# account-scoped (agencies)
GET /api/public/v1/accounts/{accountId}/chats
GET /api/public/v1/accounts/{accountId}/chats/{chatId}/messages
POST /api/public/v1/accounts/{accountId}/chats/{chatId}/messages
Read a thread, then reply
# newest messages in a chat
curl "https://api.ofapis.com/api/public/v1/chats/123/messages?limit=30" \
-H "Authorization: Bearer ofapis_sk_..."
# send a reply
curl -X POST https://api.ofapis.com/api/public/v1/chats/123/messages \
-H "Authorization: Bearer ofapis_sk_..." \
-H "Content-Type: application/json" \
-d '{"text":"Thanks for subscribing!"}'
A successful send returns the created message object and debits one credit. Failed sends — expired session, invalid chatId — are rejected and not charged. Authentication is a single Bearer token; see the authentication guide.
Gotchas worth knowing
- Pagination.
chatsandmessagesare cursor-paginated. Follow the cursor the response hands back; don't assume a full history in one page. - Sending is a write. Space out bursts under your plan's requests-per-minute limit rather than firing a whole backlog at once, and treat a non-2xx as "not delivered" — retry with backoff.
- No dedupe on the wire. The send endpoint doesn't dedupe for you, so a naive retry can double-post. Track your own message key if a job might run twice.
- One-to-one only. This is per-chat messaging. To reach many fans at once, don't loop here.
When to use it
Reach for these endpoints when you're building a chatbot, a unified inbox, a welcome-message automation, or a CRM that needs live chat context. For sending the same message to many fans, use the higher-level mass DM API instead of looping over chats — it's one idempotent call with a cost preview.
FAQ
Can I send media or PPV messages?
Text sending is available today. Richer message types, including media and pay-per-view attachments, are on the roadmap; check the live OpenAPI spec for the current request schema.
How do I read a full conversation history?
Call GET /chats/{chatId}/messages and page through with the cursor in each response. Start from the newest messages and walk backward until you have the range you need.
Is sending rate limited?
Yes, by your plan's requests-per-minute ceiling — 60 rpm on Free up to 500 rpm on Pro. See pricing. Retries should use backoff so a burst doesn't trip the limit.
How do I message across multiple creators?
Use the account-scoped routes (/accounts/{accountId}/chats/...) and pass the linked account's id. Each account is addressed independently, which is how agencies run one integration across a roster.
Start building: get a token free or try the Python quickstart.