Send Chat Message
Send a new message to a chat (messaging group). Provide text, one or more media IDs in mediaFiles, or both. Media must first be uploaded via the Upload Media endpoint (use the returned fansly_media_ ID).
Attached media can be gated with any combination of the requirePurchase, requireSubscription, and requireFollow options (they stack — e.g. a media can require both a subscription and a purchase). The gating applies to all attached media: a single file, or the whole bundle when several are attached. When none of the gating options are sent, media keeps the default visibility.
Any attached media can be given a free preview — a separate media shown unlocked while the paid media is locked — via previews, a map of mediaFiles handle to preview handle.
Authorization
default Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Path Parameters
The Fansly Account ID
The Fansly chat (group) ID.
Request Body
application/json
The message text content. Required unless mediaFiles is provided.
Media to attach, as fansly_media_ upload IDs returned by the Upload Media endpoint. A single item is sent as one attachment; multiple are grouped into a bundle.
Mark this message as a reply to another message in the chat (either yours or the recipient's).
Require the fan to purchase (unlock) the attached media. Requires price. Combinable with requireSubscription / requireFollow.
Unlock price for requirePurchase, in Fansly's smallest unit — 1000 = $1.00 (e.g. 10000 = $10.00). Required when requirePurchase is true.
Require the fan to be subscribed to view the attached media. Combinable with requirePurchase / requireFollow.
Restrict requireSubscription to a single subscription tier. Tier IDs come from the List Subscription Tiers endpoint. Omit for any tier.
Require the fan to follow the account to view the attached media. Combinable with requirePurchase / requireSubscription.
Free previews for attached media, as a map of a mediaFiles handle to a fansly_media_ preview upload. Each preview is shown unlocked while its (gated) media is locked. Only include media that should have a preview.
Response Body
application/json
curl -X POST "https://app.onlyfansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/chats/200000000000000001/messages" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"type": 1,
"attachments": [],
"content": "Hey there!",
"groupId": "200000000000000001",
"senderId": "100000000000000001",
"inReplyTo": "",
"interactions": [
{
"groupId": "200000000000000001",
"userId": "300000000000000001",
"readAt": 0,
"deliveredAt": 0
}
],
"id": "400000000000000010",
"createdAt": 1700000000.123
},
"_meta": {
"_credits": {
"used": 1,
"balance": 10055811,
"note": "Always"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 5000,
"limit_day": null,
"remaining_minute": 4999,
"remaining_day": null,
"notice": "We have decided to remove our daily rate limits. Please remove any references to these in your integrations."
}
}
}