List every vote the panelist has cast in the idea bank. Use this to restore a panelist’s vote state across sessions, for example to highlight proposals they have already voted on. The response is paginated with an encrypted cursor.
Encrypted cursor for the next page; null or absent on last page
Vote Object
Field
Type
Description
proposalId
string
The proposal the vote was cast on
vote
integer
The panelist’s vote: 1 for, -1 against
isMutable
boolean
Whether the panelist may still change or remove this vote
tsVoted
integer
Unix timestamp (seconds) when the vote was cast
Pagination
Pages are traversed with an opaque, encrypted cursor. Request the first page without a cursor, then pass the cursor from each response into the next request until the response no longer returns one.
Examples
cURL
curl -X GET \"https://api.votito.com/public/ideabank/my-votes"\-H"Authorization: abc123:xyz789:ses456"
JavaScript
constgetMyVotes=async (publicKey,{limit,cursor}={})=>{consturl=newURL('https://api.votito.com/public/ideabank/my-votes');if (limit){url.searchParams.set('limit',String(limit));}if (cursor){url.searchParams.set('cursor',cursor);}constresponse=awaitfetch(url,{headers:{'Authorization':publicKey}});if (!response.ok){thrownewError(`Failed to load votes: ${response.status}`);}returnresponse.json();};// Usage - build a lookup of proposalId -> voteconstmyVotesByProposal={};letcursor=undefined;do{constpage=awaitgetMyVotes(publicKey,{cursor});page.votes.forEach((v)=>{myVotesByProposal[v.proposalId]=v.vote;});cursor=page.cursor;}while (cursor);