Pepvote Support Center

Update Voting Event

PATCH
/voting-events/{idOrCode}

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Header Parameters

User-Agentstringrequired

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

Path Parameters

idOrCodestringrequired

Voting event ID or code.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Send at least 1 property

titlestring

Event title.

  • Length: 1 to 200 characters
descstring | null

Description shown to voters. Null clears it.

  • Length: up to 5000 characters
  • Nullable: send null to clear
startsAtinteger | null

When voting opens, in Unix milliseconds. Null unschedules the event.

  • Minimum value: 0
  • Nullable: send null to clear
endsAtinteger | null

When voting closes, in Unix milliseconds. Null unschedules the event.

  • Minimum value: 0
  • Nullable: send null to clear
liveResultboolean

Show results to voters while voting is live.

publishedResultboolean

Show results to voters after voting ends.

voterCanRegisterboolean

Let voters register themselves from the voting page.

candidateCanRegisterboolean

Let candidates register themselves from the voting page.

resultDisplayLimitinteger | null

Maximum candidates shown per position on the results page. Null shows all.

  • Minimum value: 1
  • Nullable: send null to clear

Response Body

application/json

application/json

curl -X PATCH "https://example.com/voting-events/string" \  -H "User-Agent: my-app/1.0" \  -H "Content-Type: application/json" \  -d '{}'
{
  "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