Panelist API Overview

The Panelist API enables client-side interactions for voting, survey responses, and idea banks. Use it to build custom voting and idea-collection interfaces.

Base URL

https://api.votito.com/public

Authentication

The Panelist API uses compound tokens obtained from the Tenant API. Include the token in the Authorization header:

Authorization: {publicKey}

Survey tokens come from the Tenant API’s panelist access endpoint. Idea bank tokens come from the Tenant API’s ideabank panelist access endpoint.

The endpoints are organized into two groups: Surveys for collecting votes and survey responses, and Idea Banks for proposal submission, voting, comments, and roadmap updates.

Surveys

Survey endpoints load survey questions and record panelist responses and dismissals.

Survey Endpoints

MethodEndpointDescription
GET/surveyLoad survey questions
POST/surveySubmit votes/survey responses
POST/survey/dismissRecord survey dismissal

Survey Workflow

1. Get Voting Token

First, your backend calls the Tenant API to get a token:

// Server-side
const { panelist } = await fetch(`https://api.votito.com/tenant/surveys/${surveyId}/panelists/${customerId}`, { headers: { 'X-API-Key': apiKey } }).then((r) =>
	r.json()
);

// Pass panelist.publicKey to your frontend

2. Load Survey

Use the token to load survey questions:

// Client-side
const survey = await fetch('https://api.votito.com/public/survey', {
	headers: { 'Authorization': publicKey }
}).then((r) => r.json());

3. Submit Response

Submit the panelist’s votes:

const result = await fetch('https://api.votito.com/public/survey', {
	method: 'POST',
	headers: {
		'Authorization': publicKey,
		'Content-Type': 'application/json'
	},
	body: JSON.stringify({
		responses: {
			'question-1': { optionId: '3' },
			'question-2': { optionId: '1' }
		},
		isFinal: true
	})
}).then((r) => r.json());

Idea Banks

Idea bank endpoints load an idea bank for a panelist and record proposals, votes, comments, and let panelists track published changes and roadmap items.

Idea Bank Endpoints

MethodEndpointDescription
GET/ideabankLoad idea bank info and capabilities
GET/ideabank/proposalsList proposals
POST/ideabank/proposalsSubmit a new proposal
POST/ideabank/proposals/{proposalId}/voteVote for a proposal
DELETE/ideabank/proposals/{proposalId}/voteRemove a vote
GET/ideabank/proposals/{proposalId}/commentsList proposal comments
POST/ideabank/proposals/{proposalId}/commentsAdd a proposal comment
GET/ideabank/my-votesList the panelist’s votes

Updates

MethodEndpointDescription
GET/ideabank/changelogList published changelog entries
GET/ideabank/roadmapList published roadmap items

Idea Bank Workflow

1. Get Idea Bank Token

Your backend calls the Tenant API to get a token:

// Server-side
const { panelist } = await fetch(`https://api.votito.com/tenant/ideabanks/${ideaBankId}/panelists/${customerId}`, { headers: { 'X-API-Key': apiKey } }).then(
	(r) => r.json()
);

// Pass panelist.publicKey to your frontend

2. Load Idea Bank

Use the token to load the idea bank and the panelist’s capabilities:

// Client-side
const ideaBank = await fetch('https://api.votito.com/public/ideabank', {
	headers: { 'Authorization': publicKey }
}).then((r) => r.json());

3. Submit a Proposal

Submit a new proposal on the panelist’s behalf:

const result = await fetch('https://api.votito.com/public/ideabank/proposals', {
	method: 'POST',
	headers: {
		'Authorization': publicKey,
		'Content-Type': 'application/json'
	},
	body: JSON.stringify({
		title: 'Dark mode',
		description: 'Please add a dark theme.'
	})
}).then((r) => r.json());

Error Handling

StatusErrorDescription
401UnauthorizedMissing or invalid token
403ForbiddenToken expired or survey/idea bank closed
400invalid_responseRequest data is invalid

Reference