GET /ideabank/my-votes

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.

To cast or remove a vote, use Vote on Proposal.

Request

GET /public/ideabank/my-votes

Headers

HeaderRequiredDescription
AuthorizationYesCompound idea-bank token from Tenant API

Query Parameters

ParameterRequiredDescription
limitNoPage size
cursorNoEncrypted cursor from a previous response; omit for the first page

Response

{
	"votes": [
		{
			"proposalId": "p-abc123",
			"vote": 1,
			"isMutable": true,
			"tsVoted": 1700000000
		},
		{
			"proposalId": "p-def456",
			"vote": -1,
			"isMutable": false,
			"tsVoted": 1699990000
		}
	],
	"cursor": "encrypted-cursor-token"
}

Response Fields

FieldTypeDescription
votesarrayList of vote objects
cursorstringEncrypted cursor for the next page; null or absent on last page

Vote Object

FieldTypeDescription
proposalIdstringThe proposal the vote was cast on
voteintegerThe panelist’s vote: 1 for, -1 against
isMutablebooleanWhether the panelist may still change or remove this vote
tsVotedintegerUnix 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

const getMyVotes = async (publicKey, { limit, cursor } = {}) => {
	const url = new URL('https://api.votito.com/public/ideabank/my-votes');
	if (limit) {
		url.searchParams.set('limit', String(limit));
	}
	if (cursor) {
		url.searchParams.set('cursor', cursor);
	}

	const response = await fetch(url, {
		headers: { 'Authorization': publicKey }
	});

	if (!response.ok) {
		throw new Error(`Failed to load votes: ${response.status}`);
	}

	return response.json();
};

// Usage - build a lookup of proposalId -> vote
const myVotesByProposal = {};
let cursor = undefined;
do {
	const page = await getMyVotes(publicKey, { cursor });
	page.votes.forEach((v) => {
		myVotesByProposal[v.proposalId] = v.vote;
	});
	cursor = page.cursor;
} while (cursor);

Python

import requests

def get_my_votes(public_key, limit=None, cursor=None):
    params = {}
    if limit:
        params["limit"] = limit
    if cursor:
        params["cursor"] = cursor
    response = requests.get(
        "https://api.votito.com/public/ideabank/my-votes",
        headers={"Authorization": public_key},
        params=params
    )
    response.raise_for_status()
    return response.json()

# Usage
page = get_my_votes(public_key)
for vote in page["votes"]:
    print(vote["proposalId"], vote["vote"])

Error Handling

StatusErrorDescription
401UnauthorizedMissing or invalid token
403ForbiddenToken expired or malformed
404idea-bank-not-foundIdea bank is closed or not panelist-accessible

Notes