Skip to main content
GET
/
api
/
chats
/
{chatId}
/
votes
curl --request GET \
  --url https://api.yourdomain.com/api/chats/chat_123abc/votes \
  --header 'Authorization: Bearer <token>'
{
  "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"
    }
  ]
}

Path Parameters

chatId
string
required
Chat ID to retrieve votes from

Response

success
boolean
Indicates if the request was successful
votes
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>'
{
  "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"
    }
  ]
}