Votes (v2)

Change a vote

The same body as create, on the caller's own vote while it may still be edited: an unshared draft, or an open vote with no ballot yet. Fields left out keep their stored values. An open vote stays open. A closed vote or one with ballots answers 409.

put/api/v2/votes/{code}

Request

  • Base URL: https://www.endlesstravelplans.com
  • URL: https://www.endlesstravelplans.com/api/v2/votes/{code}
  • Auth: HTTP bearer

Request body

step'basic' | 'options' | 'settings' | 'all'
draftboolean
titlestring nullable

Must not be greater than 255 characters.

typeIdinteger nullable
descriptionstring nullable

Must not be greater than 2000 characters.

tripExternalIdstring nullable

Must not be greater than 64 characters.

tripDestinationstring nullable

Must not be greater than 255 characters.

departureDatestring nullable

Must be a valid date in the format <code>Y-m-d</code>.

returnDatestring nullable

Must be a valid date in the format <code>Y-m-d</code>.

activePresetinteger nullable
anonymousboolean
allowMultipleOptionsboolean
rankedChoiceVotingboolean
showLiveResultsboolean
weightedVotingEnabledboolean
gamificationboolean
nameRequiredboolean
votingDeadlinestring nullable

Must be a valid date in the format <code>Y-m-d</code>.

consensusThresholdPercentinteger

Must be at least 0. Must not be greater than 100.

Example request

{
  "step": "settings",
  "draft": true,
  "title": "b",
  "typeId": 16,
  "description": "Et animi quos velit et fugiat.",
  "tripExternalId": "d",
  "tripDestination": "l",
  "departureDate": "2026-10-16",
  "returnDate": "2026-10-16",
  "options": [
    {
      "title": "g",
      "description": "Quos velit et fugiat sunt nihil accusantium harum.",
      "tags": [
        "i"
      ]
    }
  ],
  "activePreset": 16,
  "anonymous": true,
  "rankedChoiceVoting": true,
  "voterRoles": [
    {
      "name": "k",
      "role": "h"
    }
  ],
  "votingDeadline": "2026-10-16",
  "consensusThresholdPercent": 22
}

Response

codestring
statestring
titlestring

Example response

{
  "code": "7Q2K-9M4N",
  "state": "draft",
  "title": "Where do we go in May?"
}

Changes

No recorded changes to this operation across all 1 revision of this API.