Webhooks are now available in the Fansly API Console! 🚀
Fansly API Logo
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*
string
The unique identifier for the connected account.
chat_id*
string
The unique identifier for the chat.

Query Parameters

cursor ?
string
The 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

FieldTypeDescription
statusCodenumberThe HTTP status code of the response (e.g., 200)
messagestringA human-readable message about the result
dataobjectThe main response payload
├─ status_codenumberThe internal status code of the Fansly operation
└─ dataobjectNested data container
└─ responseobjectContainer for the message data
├─ messagesarrayA list of message objects
│ ├─ idstringUnique identifier for the message
│ ├─ contentstringThe text content of the message
│ ├─ senderIdstringThe ID of the user who sent the message
│ ├─ createdAtnumberUnix timestamp of when the message was sent
│ ├─ attachmentsarrayA list of attached media or metadata
│ │ ├─ messageIdstringThe ID of the message this attachment belongs to
│ │ ├─ contentTypenumberThe type of attachment
│ │ ├─ contentIdstringThe ID of the attached content
│ │ └─ posnumberThe position order of the attachment
│ ├─ interactionsarrayDelivery and read status for users
│ │ ├─ userIdstringThe ID of the user who interacted
│ │ ├─ readAtnumberUnix timestamp of when the message was read
│ │ └─ deliveredAtnumberUnix timestamp of when the message was delivered
│ └─ totalTipAmountnumberTotal amount tipped on this message
└─ accountMediaarrayA list of media objects accompanying the messages
├─ idstringUnique identifier for the account media entry
├─ mediaIdstringThe ID of the attached media
├─ accountIdstringThe ID of the account that owns the media
├─ pricenumberThe price to unlock the media (if PPV)
├─ accessbooleanWhether the requesting user has access to view this media
└─ mediaobjectThe full details of the media file, including its CDN locations and variants
└─ cursorstringThe cursor ID used to fetch the next page of older messages
timestampstringThe ISO 8601 timestamp of when the response was generated

On this page