Count conversations
curl --request GET \
--url https://api.onlyx.ai/v1/conversations/counts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onlyx.ai/v1/conversations/counts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onlyx.ai/v1/conversations/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ai": 1102,
"aiOff": 35,
"handoff": 7,
"team": 96,
"total": 1240,
"unread": 58
}Count conversations
Returns how many conversations are in each status, and how many have unread fan messages, for every visible creator or for one with creatorId. Use it for badges and dashboards instead of paging through the list. It scans the whole inbox, so it has its own limit of 30 calls per 60 seconds per credential.
Scope: requires inbox:read.
Rate limits: 30 requests per 60 seconds per credential — on top of the general limit of 120 requests per 60 seconds per credential.
GET
/
v1
/
conversations
/
counts
Count conversations
curl --request GET \
--url https://api.onlyx.ai/v1/conversations/counts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onlyx.ai/v1/conversations/counts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onlyx.ai/v1/conversations/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ai": 1102,
"aiOff": 35,
"handoff": 7,
"team": 96,
"total": 1240,
"unread": 58
}Authorizations
Response
How many conversations are in each status, and how many have unread fan messages.