Pepvote Support Center

Voting events

Create, read, update, and delete voting events.

Use a voting event's id or its short code wherever a path has :idOrCode. All endpoints except health require a bearer API key and a User-Agent header.

Endpoints

MethodPathScopeDescription
GET/voting-eventsreadList accessible voting events.
POST/voting-eventswriteCreate a voting event.
GET/voting-events/:idOrCodereadGet one voting event.
PATCH/voting-events/:idOrCodewriteUpdate allowed event settings.
DELETE/voting-events/:idOrCodewriteDelete a voting event.
PUT/voting-events/:idOrCode/logowriteSet the event logo from an upload.
DELETE/voting-events/:idOrCode/logowriteRemove the event logo.
GET/voting-events/:idOrCode/statsreadGet event counts and turnout.

List query parameters

NameTypeRequiredDescription
limitintegerNoPage size from 1 to 200. Default: 50.
cursorstringNoCursor from nextCursor.
typeelection or pollNoFilter by event type.
statusdraft, upcoming, ongoing, or endedNoFilter by status. Same names as the dashboard.

Create request fields

title is required. See uploads before setting a logo.

FieldTypeRequiredDescription
titlestringYes1 to 200 characters.
typeelection or pollNoDefaults to Pepvote's event type.
descstringNoUp to 5,000 characters.
startsAt, endsAtintegerNoUnix milliseconds.
liveResult, publishedResultbooleanNoControl results visibility.
resultDisplayLimitintegerNoMinimum 1.
groupModebooleanNoEnable event groups.
voterCanRegister, candidateCanRegisterbooleanNoAllow public registration.
canContestMultiplePositionsbooleanNoAllow a candidate to enter more than one position.
requireVoterIdbooleanNoRequire a voter ID.
shuffleCandidates, multiStepVotingbooleanNoSet the voting experience.
enableWeightedVotingbooleanNoEnable weighted voting.
votingFormatdefault, big_avatar, options_with_avatar, or optionsNoSet the ballot layout.

Update request fields

Send at least one field. Send null to clear desc, startsAt, endsAt, or resultDisplayLimit.

FieldTypeDescription
titlestring1 to 200 characters.
descstring or nullUp to 5,000 characters.
startsAt, endsAtinteger or nullUnix milliseconds.
liveResult, publishedResultbooleanControl results visibility.
voterCanRegister, candidateCanRegisterbooleanAllow public registration.
resultDisplayLimitinteger or nullMinimum 1.

Create example

curl -X POST "https://api.pepvote.com/voting-events" \
  -H "Authorization: Bearer $PEPVOTE_API_KEY" \
  -H "User-Agent: my-app/1.0" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: board-2026" \
  -d '{"title":"Board election 2026","type":"election","liveResult":true}'
{
  "data": {
    "id": "j57event01",
    "code": "BOARD26",
    "type": "election",
    "title": "Board election 2026",
    "desc": null,
    "startsAt": null,
    "endsAt": null,
    "status": "draft",
    "locked": false,
    "liveResult": true,
    "publishedResult": false,
    "resultDisplayLimit": null,
    "groupMode": false,
    "votingFormat": "default",
    "shuffleCandidates": false,
    "multiStepVoting": false,
    "canContestMultiplePositions": false,
    "enableWeightedVoting": false,
    "enablePayToVote": false,
    "enablePayToRegisterCandidate": false,
    "registration": {
      "voterCanRegister": false,
      "voterPublicRegistrationClosesAt": null,
      "candidateCanRegister": false,
      "candidatePublicRegistrationClosesAt": null,
      "requireVoterId": false,
      "voterIdValidationLogic": null,
      "voterIdValidatingValue": null
    },
    "aliases": {
      "votingEvent": null,
      "votingCenter": null,
      "position": null,
      "group": null,
      "positionGroup": null,
      "candidateGroup": null,
      "voterGroup": null,
      "candidate": null,
      "voter": null,
      "voterId": null,
      "sponsor": null,
      "weight": null
    },
    "plan": {
      "name": "Starter",
      "maxVoters": 500
    },
    "logoUrl": null,
    "createdAt": 1776900000000
  }
}

Logo example

Upload the image first. Then pass its storageId to the logo endpoint.

curl -X PUT "https://api.pepvote.com/voting-events/BOARD26/logo" \
  -H "Authorization: Bearer $PEPVOTE_API_KEY" \
  -H "User-Agent: my-app/1.0" \
  -H "Content-Type: application/json" \
  -d '{"storageId":"kg2storage01"}'
{
  "data": {
    "id": "j57event01",
    "code": "BOARD26",
    "logoUrl": "https://storage.example/logo.png"
  }
}

Delete returns 204 for a voting event. The stats response has votingEventId, positionCount, candidateCount, approvedCandidateCount, sponsorCount, groupCount, voterCount, approvedVoterCount, pendingVoterCount, votedVoterCount, votesCast, votesConfirmed, and turnoutPercent.

Was this helpful?

Last updated September 6, 2026

On this page