curl --request POST \
--url https://api.fanvue.com/v1/agencies/chats/messages/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>' \
--data '
{
"creators": [
{
"chatUuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"creatorUserUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceMessageUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limit": 20
}
]
}
'import requests
url = "https://api.fanvue.com/v1/agencies/chats/messages/batch"
payload = { "creators": [
{
"chatUuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"creatorUserUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceMessageUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limit": 20
}
] }
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
creators: [
{
chatUuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
creatorUserUuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sinceMessageUuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
limit: 20
}
]
})
};
fetch('https://api.fanvue.com/v1/agencies/chats/messages/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"byCreator": {
"c3d4e5f6-7g8h-9i0j-1k2l-m3n4o5p6q7r8": {
"byChat": {
"b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7": {
"messages": [
{
"uuid": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"text": "Hey there! How are you doing?",
"sentAt": "2024-01-15T00:00:00.000Z",
"sender": {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"handle": "sarah-jones",
"nickname": "SarahK",
"displayName": "Sarah Jones",
"isTopSpender": true,
"avatarUrl": "https://media.fanvue.com/avatars/example-avatar.jpg",
"registeredAt": "2024-01-10T12:00:00.000Z"
},
"recipient": {
"uuid": "3bbe6394-2830-4646-a8ba-4a0a05426947",
"handle": "johnny-doey",
"nickname": "JohnnyD",
"displayName": "Johnny Doey",
"isTopSpender": true,
"avatarUrl": "https://media.fanvue.com/avatars/example-avatar.jpg",
"registeredAt": "2024-01-10T12:00:00.000Z"
},
"type": "SINGLE_RECIPIENT",
"hasMedia": false,
"mediaType": null,
"mediaUuids": [],
"mediaPreviewUuid": null,
"gif": null,
"pricing": null,
"purchasedAt": null,
"sentByUserId": null,
"appUuid": "f6a7b8c9-0123-4567-89ab-cdef01234567",
"isRead": true
}
],
"hasMore": true,
"oldestMessageUuid": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6"
},
"c3d4e5f6-7890-1234-5678-9abcdef01234": {
"error": "not_found"
}
}
},
"22222222-2222-4222-8222-222222222222": {
"error": "forbidden"
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"nextVersion": "<string>"
}{
"error": "Too many requests",
"rateLimit": {
"scope": "app",
"layer": "<string>",
"limit": 123,
"windowSeconds": 123,
"retryAfterSeconds": 123,
"docs": "<string>"
}
}Get messages from multiple chats in bulk across the agency's creators (POST batch)
Returns the most recent messages for chats grouped by creator, across the creators the authenticated user’s agency manages, in a single request.
This collapses the outer per-creator fan-out: instead of one batch call per managed creator (POST /creators/{creatorUserUuid}/chats/messages/batch), agencies send one request grouping chat UUIDs under each creator. Each creator group takes the same chatUuids, sinceMessageUuid and limit fields as the per-creator batch, so per-key behaviour is identical — just add the creator dimension.
Per-creator and per-chat errors are reported inside the 200 response body, so a single forbidden/missing creator or chat never collapses the whole request. A creator the agency does not manage is returned as { "error": "forbidden" | "not_found" } at the creator level.
isRead reflects each message’s state at read time.curl --request POST \
--url https://api.fanvue.com/v1/agencies/chats/messages/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>' \
--data '
{
"creators": [
{
"chatUuids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"creatorUserUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceMessageUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limit": 20
}
]
}
'import requests
url = "https://api.fanvue.com/v1/agencies/chats/messages/batch"
payload = { "creators": [
{
"chatUuids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"creatorUserUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinceMessageUuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limit": 20
}
] }
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
creators: [
{
chatUuids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
creatorUserUuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sinceMessageUuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
limit: 20
}
]
})
};
fetch('https://api.fanvue.com/v1/agencies/chats/messages/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"byCreator": {
"c3d4e5f6-7g8h-9i0j-1k2l-m3n4o5p6q7r8": {
"byChat": {
"b2c3d4e5-6f7g-8h9i-0j1k-l2m3n4o5p6q7": {
"messages": [
{
"uuid": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6",
"text": "Hey there! How are you doing?",
"sentAt": "2024-01-15T00:00:00.000Z",
"sender": {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"handle": "sarah-jones",
"nickname": "SarahK",
"displayName": "Sarah Jones",
"isTopSpender": true,
"avatarUrl": "https://media.fanvue.com/avatars/example-avatar.jpg",
"registeredAt": "2024-01-10T12:00:00.000Z"
},
"recipient": {
"uuid": "3bbe6394-2830-4646-a8ba-4a0a05426947",
"handle": "johnny-doey",
"nickname": "JohnnyD",
"displayName": "Johnny Doey",
"isTopSpender": true,
"avatarUrl": "https://media.fanvue.com/avatars/example-avatar.jpg",
"registeredAt": "2024-01-10T12:00:00.000Z"
},
"type": "SINGLE_RECIPIENT",
"hasMedia": false,
"mediaType": null,
"mediaUuids": [],
"mediaPreviewUuid": null,
"gif": null,
"pricing": null,
"purchasedAt": null,
"sentByUserId": null,
"appUuid": "f6a7b8c9-0123-4567-89ab-cdef01234567",
"isRead": true
}
],
"hasMore": true,
"oldestMessageUuid": "a1b2c3d4-5e6f-7g8h-9i0j-k1l2m3n4o5p6"
},
"c3d4e5f6-7890-1234-5678-9abcdef01234": {
"error": "not_found"
}
}
},
"22222222-2222-4222-8222-222222222222": {
"error": "forbidden"
}
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"nextVersion": "<string>"
}{
"error": "Too many requests",
"rateLimit": {
"scope": "app",
"layer": "<string>",
"limit": 123,
"windowSeconds": 123,
"retryAfterSeconds": 123,
"docs": "<string>"
}
}read:agency— Read agency information, including the agency’s team members.read:chat— Read chat conversations, messages, and chat-related data. This includes viewing chat lists and message history.
Authorizations
Scopes
Headers
Body
Was this page helpful?