Chat messages
Create Group Chat
Create a new group chat on Fansly with specific users.
Creates a new group chat on Fansly including the specified users.
https://v1.apifansly.com
POST
/api/fansly/{account_id}/group
Get Started
All requests to the Fansly API require an API Key. See the Authentication page for details.
Important: You can only pass exactly two users in the users array: your connected account's ID and the ID of the user you want to chat with. The endpoint currently only supports 1-to-1 chats via this group wrapper.
Request Body
curl -X POST "https://v1.apifansly.com/api/fansly/{account_id}/group" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"users": [
{
"userId": "CREATOR_ACCOUNT_ID",
"permissionFlags": 0
},
{
"userId": "TARGET_USER_ID",
"permissionFlags": 0
}
],
"type": 1
}'fetch("https://v1.apifansly.com/api/fansly/{account_id}/group", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
users: [
{
userId: "CREATOR_ACCOUNT_ID",
permissionFlags: 0
},
{
userId: "TARGET_USER_ID",
permissionFlags: 0
}
],
type: 1
})
})
.then(response => response.json())
.then(data => console.log(data));import requests
url = "https://v1.apifansly.com/api/fansly/{account_id}/group"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"users": [
{
"userId": "CREATOR_ACCOUNT_ID",
"permissionFlags": 0
},
{
"userId": "TARGET_USER_ID",
"permissionFlags": 0
}
],
"type": 1
}
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;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
String jsonBody = "{\"users\":[{\"userId\":\"CREATOR_ACCOUNT_ID\",\"permissionFlags\":0},{\"userId\":\"TARGET_USER_ID\",\"permissionFlags\":0}],\"type\":1}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://v1.apifansly.com/api/fansly/{account_id}/group"))
.header("x-api-key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonBody))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var jsonBody = "{\"users\":[{\"userId\":\"CREATOR_ACCOUNT_ID\",\"permissionFlags\":0},{\"userId\":\"TARGET_USER_ID\",\"permissionFlags\":0}],\"type\":1}";
var content = new StringContent(jsonBody, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://v1.apifansly.com/api/fansly/{account_id}/group", 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}/group"
jsonBody := []byte(`{"users":[{"userId":"CREATOR_ACCOUNT_ID","permissionFlags":0},{"userId":"TARGET_USER_ID","permissionFlags":0}],"type":1}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonBody))
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, retrieved from your Dashboard.
Request Body Parameters
users*
arrayArray of users to include in the group. Must contain the ID of the creator account and the ID of the user you want to create a chat with. Each object must have a `userId` (string) and `permissionFlags` set to 0.
type*
numberType of the group (default: 1).
recipients ?
arrayOptional array of recipients. Default is `[]`.
lastMessage ?
objectOptional last message data. Default is `null`.
userSettings ?
objectOptional user settings for the group. Default is `null`.
Response
Success Response (200 OK)
{
"statusCode": 200,
"message": "Success",
"data": {
"status_code": 200,
"data": {
"success": true,
"response": {
"users": [
{
"userId": "865407xxxxxxxxxx", // Creator account ID
"permissionFlags": 65535,
"userSettings": {
"hidden": 1
},
"groupId": "884669xxxxxxxxxx"
},
{
"userId": "839848xxxxxxxxxx", // Target user ID
"permissionFlags": 65535,
"userSettings": {
"hidden": 1
},
"groupId": "884669xxxxxxxxxx"
}
],
"recipients": [],
"lastMessage": null,
"userSettings": null,
"type": 1,
"createdBy": "865407xxxxxxxxxx",
"groupFlagsMetadata": "",
"id": "884669xxxxxxxxxx",
"permissionFlags": [],
"hasDmPermissionFlags": true,
"dmPermissionFlags": [],
"accountDmPermissionFlags": {
"flags": 0,
"metadata": "{}"
}
}
}
},
"timestamp": "2026-03-02T10:00:00.000Z"
}Response Body
| Field | Type | Description |
|---|---|---|
statusCode | number | The HTTP status code of the response (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 | The details of the created group |
├─ id | string | Unique identifier for the created group chat |
├─ type | number | The type of the group |
├─ createdBy | string | The ID of the user who created the group |
├─ users | array | List of users in the group |
│ ├─ userId | string | ID of the user in the group |
│ ├─ permissionFlags | number | Permission flags for the user |
│ ├─ userSettings | object | Settings for the user in this group |
│ └─ groupId | string | The ID of the group chat |
├─ recipients | array | List of recipients for the group |
├─ lastMessage | object | The last message object (if any) |
├─ permissionFlags | array | Array of overall permission flags |
├─ hasDmPermissionFlags | boolean | Indicates if DM permission flags are enabled |
├─ dmPermissionFlags | array | Detailed DM permission flags |
├─ accountDmPermissionFlags | object | Account-level DM permission details |
└─ groupFlagsMetadata | string | Metadata string for group flags |
timestamp | string | The ISO 8601 timestamp of when the response was generated |