Chat messages
Send Message
Send a message to a specific chat.
https://v1.apifansly.com
POST
/api/fansly/{account_id}/chats/{chat_id}/messages
The chat_id parameter corresponds to the groupId returned by the List Chats endpoint.
Get Started
All requests to the Fansly API require an API Key. See the Authentication page for details.
Request Body
curl -X POST "https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Message content here"
}'fetch("https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
content: "Message content here"
})
})import requests
url = "https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"content": "Message content here"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
String json = "{\"content\": \"Message content here\"}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages"))
.header("x-api-key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(BodyPublishers.ofString(json))
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var json = "{\"content\": \"Message content here\"}";
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages", content);
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);package main
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages"
payload := []byte(`{"content": "Message content here"}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Set("x-api-key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}Path Parameters
account_id*
stringThe unique identifier for the connected account.
chat_id*
stringThe unique identifier for the chat.
Request Body Parameters
content*
stringThe text content of the message to send.
Response
{
"statusCode": 201,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"type": 1,
"attachments": [],
"content": "Hello beautiful",
"groupId": "86832xxxxxxxxxx",
"senderId": "865407xxxxxxxxxx",
"inReplyTo": "",
"interactions": [
{
"groupId": "868324xxxxxxxxxx",
"userId": "5429823xxxxxxxxxx",
"readAt": 0,
"deliveredAt": 0
}
],
"id": "869685xxxxxxxxxx",
"createdAt": 1768143472.598
}
}
},
"timestamp": "2026-01-19T17:24:12.698Z"
}Response Body
| Field | Type | Description |
|---|---|---|
statusCode | number | The HTTP status code of the response (201) |
message | string | A human-readable message about the result |
data | object | The main response payload |
ββ status_code | number | The internal status code of the Fansly operation |
ββ data | object | Nested data container |
ββ response | object | The details of the sent message |
ββ id | string | Unique identifier for the message |
ββ type | number | The type of message (1 for text) |
ββ content | string | The text content of the message |
ββ senderId | string | The ID of the user who sent the message |
ββ groupId | string | The ID of the chat group |
ββ createdAt | number | Unix timestamp of the message creation |
ββ attachments | array | A list of attached media or metadata |
ββ interactions | array | Delivery and read status for participants |
ββ groupId | string | The ID of the group for this interaction |
ββ userId | string | The ID of the interacting user |
ββ readAt | number | Unix timestamp of when read |
ββ deliveredAt | number | Unix timestamp of when delivered |
timestamp | string | The ISO 8601 timestamp of when the response was generated |