Pepvote Support Center

Create Voting Event

POST
/voting-events

Authorization

bearerAuth
AuthorizationBearer <token>

A key in the form pepvote_api_ followed by 32 hexadecimal characters.

In: header

Header Parameters

Idempotency-Keystring

Optional retry key. First successful response is stored for 24 hours.

  • Length: up to 255 characters
User-Agentstringrequired

Name and version of the calling integration. Required on every request.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

titlestringrequired

Event title.

  • Length: 1 to 200 characters
typeenum<string>

election or poll. Defaults to election.

  • Values:election|poll
descstring

Description shown to voters.

  • Length: up to 5000 characters
startsAtinteger

When voting opens, in Unix milliseconds.

  • Minimum value: 0
endsAtinteger

When voting closes, in Unix milliseconds.

  • Minimum value: 0
liveResultboolean

Show results to voters while voting is live.

publishedResultboolean

Show results to voters after voting ends.

resultDisplayLimitinteger

Maximum candidates shown per position on the results page.

  • Minimum value: 1
groupModeboolean

Use groups for positions, candidates, and voters.

voterCanRegisterboolean

Let voters register themselves from the voting page.

candidateCanRegisterboolean

Let candidates register themselves from the voting page.

canContestMultiplePositionsboolean

Let a candidate be listed under more than one position.

requireVoterIdboolean

Require a voter ID at registration and sign-in.

shuffleCandidatesboolean

Show candidates to each voter in a random order.

multiStepVotingboolean

Show one position per step on the ballot.

enableWeightedVotingboolean

Apply voter weights to the tally.

votingFormatenum<string>

Ballot layout: default, big_avatar, options_with_avatar, or options.

  • Values:default|big_avatar|options_with_avatar|options

Response Body

application/json

application/json

curl -X POST "https://example.com/voting-events" \  -H "User-Agent: my-app/1.0" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{
  "data": {
    "id": "string",
    "code": "string",
    "type": "string",
    "title": "string",
    "desc": "string",
    "startsAt": 0,
    "endsAt": 0,
    "status": "draft",
    "locked": true,
    "liveResult": true,
    "publishedResult": true,
    "resultDisplayLimit": 0,
    "groupMode": true,
    "votingFormat": "string",
    "shuffleCandidates": true,
    "multiStepVoting": true,
    "canContestMultiplePositions": true,
    "enableWeightedVoting": true,
    "enablePayToVote": true,
    "enablePayToRegisterCandidate": true,
    "registration": {
      "voterCanRegister": true,
      "voterPublicRegistrationClosesAt": 0,
      "candidateCanRegister": true,
      "candidatePublicRegistrationClosesAt": 0,
      "requireVoterId": true,
      "voterIdValidationLogic": "string",
      "voterIdValidatingValue": "string"
    },
    "aliases": {
      "votingEvent": "string",
      "votingCenter": "string",
      "position": "string",
      "group": "string",
      "positionGroup": "string",
      "candidateGroup": "string",
      "voterGroup": "string",
      "candidate": "string",
      "voter": "string",
      "voterId": "string",
      "sponsor": "string",
      "weight": "string"
    },
    "plan": {
      "name": "string",
      "maxVoters": 0
    },
    "logoUrl": "string",
    "createdAt": 0
  }
}
{
  "error": {
    "code": "bad_request",
    "message": "string",
    "details": {
      "field": "string",
      "parameter": "string",
      "limit": 0,
      "retryAfterSeconds": 0,
      "feature": "string",
      "plan": "string"
    }
  }
}
Was this helpful?

Last updated September 6, 2026