> ## Documentation Index
> Fetch the complete documentation index at: https://gaia-docs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Votes

> Retrieves all votes for a specific chat

## Path Parameters

<ParamField path="chatId" type="string" required>
  Chat ID to retrieve votes from
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="votes" type="array">
  Array of vote objects for the chat
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.yourdomain.com/api/chats/chat_123abc/votes \
    --header 'Authorization: Bearer <token>'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.yourdomain.com/api/chats/chat_123abc/votes', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer <token>'
    }
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  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()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "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"
      }
    ]
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "success": false,
    "votes": [],
    "message": "Unauthorized"
  }
  ```
</ResponseExample>
