Pepvote Support Center

Create Candidate

POST
/voting-events/{idOrCode}/candidates

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.

Path Parameters

idOrCodestringrequired

Voting event ID or code.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

namestringrequired

Candidate name.

  • Length: 1 to 200 characters
emailstring

Contact email.

  • Length: up to 320 characters
positionIdsarray<string>

IDs of the positions the candidate is contesting.

groupIdstring

Group the candidate belongs to. Requires group mode.

statusenum<string>
  • Values:not_approved|pending|approved
referendumRoleenum<string>

For referendum positions, which side the option represents, for example yes or no. Null otherwise.

  • Values:for|against|abstain
avatarUrlstring

Public image URL to use as the photo. Use PUT ../avatar with an upload instead for stored images.

  • Length: up to 2048 characters

Response Body

application/json

curl -X POST "https://example.com/voting-events/string/candidates" \  -H "User-Agent: my-app/1.0" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "data": {
    "id": "string",
    "votingEventId": "string",
    "groupId": "string",
    "positionIds": [
      "string"
    ],
    "name": "string",
    "email": "string",
    "status": "not_approved",
    "selfRegistered": true,
    "referendumRole": "string",
    "avatarUrl": "string",
    "group": {
      "id": "string",
      "votingEventId": "string",
      "name": "string",
      "desc": "string",
      "groupFor": "any",
      "logoUrl": "string",
      "createdAt": 0
    },
    "positions": [
      {
        "id": "string",
        "votingEventId": "string",
        "groupId": "string",
        "title": "string",
        "desc": "string",
        "votingMethod": "string",
        "tallyRule": {
          "type": "plurality_total",
          "seatCount": 1,
          "stvQuota": "droop",
          "bordaSchema": "zero_based"
        },
        "minSelections": 0,
        "maxSelections": 0,
        "scoreMin": 0,
        "scoreMax": 0,
        "cumulativePointBudget": 0,
        "quadraticBaseCreditBudget": 0,
        "quadraticAllowCreditTopUps": true,
        "quadraticMaxPurchasedCreditsPerVoter": 0,
        "createdAt": 0
      }
    ],
    "createdAt": 0
  }
}
Was this helpful?

Last updated September 6, 2026