Chat messages
List Chat Messages
Get the message history for a specific chat.
Get the list of messages for a chat.
https://v1.apifansly.com
GET
/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.
Path Parameters
curl -X GET "https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages" \
-H "x-api-key: YOUR_API_KEY"fetch("https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages", {
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY"
}
})import requests
url = "https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages"
headers = {
"x-api-key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
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")
.GET()
.build();
client.sendAsync(request, HttpResponse.BodyHandlers.ofString())
.thenApply(HttpResponse::body)
.thenAccept(System.out::println)
.join();using System.Net.Http;
using System.Threading.Tasks;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var response = await client.GetAsync("https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages");
var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://v1.apifansly.com/api/fansly/{account_id}/chats/{chat_id}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}account_id*
stringThe unique identifier for the connected account.
chat_id*
stringThe unique identifier for the chat.
Query Parameters
cursor ?
stringThe cursor ID to fetch the next page of older messages (found at the bottom of the previous response).
Response
{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"messages": [
{
"id": "MESSAGE_ID_1",
"type": 1,
"dataVersion": 1,
"content": "Message content here",
"groupId": "GROUP_ID",
"senderId": "SENDER_ID",
"correlationId": "CORRELATION_ID",
"inReplyTo": null,
"inReplyToRoot": null,
"createdAt": 1774700000,
"attachments": [
{
"messageId": "MESSAGE_ID_1",
"contentType": 1,
"contentId": "CONTENT_ID",
"pos": 0
}
],
"embeds": [],
"interactions": [
{
"userId": "USER_ID",
"readAt": 1774700100,
"deliveredAt": 1774700050
}
],
"likes": [],
"totalTipAmount": 0
}
],
"accountMedia": [
{
"id": "ACCOUNT_MEDIA_ID_1",
"mediaId": "MEDIA_ID_1",
"accountId": "ACCOUNT_ID",
"permissionFlags": 0,
"price": 0,
"previewId": null,
"whitelist": [],
"permissions": {
"permissionFlags": [],
"accountPermissionFlags": {
"flags": 255,
"metadata": "{}"
}
},
"tags": [],
"likeCount": 0,
"purchased": true,
"whitelisted": true,
"accountPermissionFlags": 255,
"access": true,
"media": {
"id": "MEDIA_ID_1",
"type": 1,
"status": 1,
"accountId": "ACCOUNT_ID",
"mimetype": "image/jpeg",
"flags": 6,
"filename": "image.jpeg",
"location": "/ACCOUNT_ID/MEDIA_ID_1.jpeg",
"width": 1400,
"height": 987,
"metadata": "{\"dominant\":{\"r\":24,\"g\":40,\"b\":24},\"resolutionMode\":1}",
"updatedAt": 1774700000,
"createdAt": 1774700000,
"variants": [
{
"id": "VARIANT_ID_1",
"type": 1,
"status": 1,
"mimetype": "image/jpeg",
"flags": 0,
"filename": "image_720.jpeg",
"location": "/ACCOUNT_ID/VARIANT_ID_1.jpeg",
"width": 1022,
"height": 720,
"metadata": "{\"resolutionMode\":1}",
"updatedAt": 1774700000,
"locations": [
{
"locationId": "1",
"location": "https://cdn3.fansly.com/ACCOUNT_ID/VARIANT_ID_1.jpeg?..."
}
]
}
],
"variantHash": {},
"locations": [
{
"locationId": "1",
"location": "https://cdn3.fansly.com/ACCOUNT_ID/MEDIA_ID_1.jpeg?..."
}
]
}
}
],
"cursor": "NEXT_CURSOR_ID"
}
}
},
"timestamp": "2026-03-29T17:10:50.635Z"
}Response Body
| Field | Type | Description |
|---|---|---|
statusCode | number | The HTTP status code of the response (e.g., 200) |
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 | Container for the message data |
├─ messages | array | A list of message objects |
│ ├─ id | string | Unique identifier for the message |
│ ├─ content | string | The text content of the message |
│ ├─ senderId | string | The ID of the user who sent the message |
│ ├─ createdAt | number | Unix timestamp of when the message was sent |
│ ├─ attachments | array | A list of attached media or metadata |
│ │ ├─ messageId | string | The ID of the message this attachment belongs to |
│ │ ├─ contentType | number | The type of attachment |
│ │ ├─ contentId | string | The ID of the attached content |
│ │ └─ pos | number | The position order of the attachment |
│ ├─ interactions | array | Delivery and read status for users |
│ │ ├─ userId | string | The ID of the user who interacted |
│ │ ├─ readAt | number | Unix timestamp of when the message was read |
│ │ └─ deliveredAt | number | Unix timestamp of when the message was delivered |
│ └─ totalTipAmount | number | Total amount tipped on this message |
└─ accountMedia | array | A list of media objects accompanying the messages |
├─ id | string | Unique identifier for the account media entry |
├─ mediaId | string | The ID of the attached media |
├─ accountId | string | The ID of the account that owns the media |
├─ price | number | The price to unlock the media (if PPV) |
├─ access | boolean | Whether the requesting user has access to view this media |
└─ media | object | The full details of the media file, including its CDN locations and variants |
└─ cursor | string | The cursor ID used to fetch the next page of older messages |
timestamp | string | The ISO 8601 timestamp of when the response was generated |