curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc/votes \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc/votes', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc/votes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"votes": [
{
"id": "vote_789xyz",
"chatId": "chat_123abc",
"messageId": "msg_456def",
"isUpvoted": true,
"createdAt": "2024-01-17T10:30:00Z"
},
{
"id": "vote_012abc",
"chatId": "chat_123abc",
"messageId": "msg_789ghi",
"isUpvoted": false,
"createdAt": "2024-01-17T10:35:00Z"
}
]
}
{
"success": false,
"votes": [],
"message": "Unauthorized"
}
Votes
List Votes
Retrieves all votes for a specific chat
GET
/
api
/
chats
/
{chatId}
/
votes
curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc/votes \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc/votes', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc/votes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"votes": [
{
"id": "vote_789xyz",
"chatId": "chat_123abc",
"messageId": "msg_456def",
"isUpvoted": true,
"createdAt": "2024-01-17T10:30:00Z"
},
{
"id": "vote_012abc",
"chatId": "chat_123abc",
"messageId": "msg_789ghi",
"isUpvoted": false,
"createdAt": "2024-01-17T10:35:00Z"
}
]
}
{
"success": false,
"votes": [],
"message": "Unauthorized"
}
Path Parameters
string
required
Chat ID to retrieve votes from
Response
boolean
Indicates if the request was successful
array
Array of vote objects for the chat
curl --request GET \
--url https://api.yourdomain.com/api/chats/chat_123abc/votes \
--header 'Authorization: Bearer <token>'
const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc/votes', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
import requests
url = "https://api.yourdomain.com/api/chats/chat_123abc/votes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
data = response.json()
{
"success": true,
"votes": [
{
"id": "vote_789xyz",
"chatId": "chat_123abc",
"messageId": "msg_456def",
"isUpvoted": true,
"createdAt": "2024-01-17T10:30:00Z"
},
{
"id": "vote_012abc",
"chatId": "chat_123abc",
"messageId": "msg_789ghi",
"isUpvoted": false,
"createdAt": "2024-01-17T10:35:00Z"
}
]
}
{
"success": false,
"votes": [],
"message": "Unauthorized"
}
⌘I

