Get unread chats, messages, and notifications count
curl --request GET \
--url https://api.fanvue.com/v1/chats/unread \
--header 'Authorization: Bearer <token>' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>'import requests
url = "https://api.fanvue.com/v1/chats/unread"
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.fanvue.com/v1/chats/unread', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"unreadChatsCount": 5,
"unreadMessagesCount": 12,
"unreadNotifications": {
"newFollower": 3,
"newPostComment": 2,
"newPostLike": 8,
"newPurchase": 1,
"newSubscriber": 4,
"newTip": 2,
"newPromotion": 0
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"nextVersion": "<string>"
}{
"error": "<string>"
}Chats
Get unread chats, messages, and notifications count
Returns the count of unread chats, total unread messages, and unread notifications by type for the authenticated user.
Polling for real-time updates? Use a webhook instead.
If you are calling this endpoint on a schedule to detect new activity, subscribe to the message.received, message.read webhook events instead — you’ll get pushed updates in real time without polling. See the webhook documentation.
GET
/
v1
/
chats
/
unread
Get unread chats, messages, and notifications count
curl --request GET \
--url https://api.fanvue.com/v1/chats/unread \
--header 'Authorization: Bearer <token>' \
--header 'X-Fanvue-API-Version: <x-fanvue-api-version>'import requests
url = "https://api.fanvue.com/v1/chats/unread"
headers = {
"X-Fanvue-API-Version": "<x-fanvue-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Fanvue-API-Version': '<x-fanvue-api-version>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.fanvue.com/v1/chats/unread', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"unreadChatsCount": 5,
"unreadMessagesCount": 12,
"unreadNotifications": {
"newFollower": 3,
"newPostComment": 2,
"newPostLike": 8,
"newPurchase": 1,
"newSubscriber": 4,
"newTip": 2,
"newPromotion": 0
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"nextVersion": "<string>"
}{
"error": "<string>"
}Required scope
read:chat— Read chat conversations, messages, and chat-related data. This includes viewing chat lists and message history.
Authorizations
OAuth 2.0 access token, presented as a JWT bearer token in the Authorization header. Obtain a token via the authorization-code flow; the scopes granted to the token determine which operations it may call.
Headers
API version to use for the request
Example:
"2025-06-26"
Was this page helpful?