---
title: "Check vote inputs"
method: POST
path: "/api/v2/votes/validate"
tags: ["Votes (v2)"]
---

# Check vote inputs

`POST /api/v2/votes/validate`

## Request

- Base URL: `https://www.endlesstravelplans.com`
- URL: `https://www.endlesstravelplans.com/api/v2/votes/validate`
- Auth: HTTP bearer

Runs the wizard's rules on a body without saving anything. `step` picks one step (`basic`, `options`,
`settings`); everything is checked when it is left out. The errors carry the wizard's exact words keyed
by its field names (`title`, `type`, `options`, `options.1.title`, `voting_deadline`, `voter_roles`).

## Request body

- object
  - `step` string: Which step to check: basic, options, settings or all.
  - `draft` boolean
  - `title` string, nullable: The question.
  - `typeId` integer, nullable: The vote type id from the catalogue.
  - `description` string, nullable: Must not be greater than 2000 characters.
  - `tripExternalId` string, nullable: Must not be greater than 64 characters.
  - `tripDestination` string, nullable: Must not be greater than 255 characters.
  - `departureDate` string, nullable: Must be a valid date in the format <code>Y-m-d</code>.
  - `returnDate` string, nullable: Must be a valid date in the format <code>Y-m-d</code>.
  - `options` object[]: The choices (two to twenty).
    - `title` string, nullable: Must not be greater than 255 characters.
    - `description` string, nullable: Must not be greater than 1000 characters.
    - `tags` string[]: Must not be greater than 50 characters.
  - `activePreset` integer, nullable
  - `anonymous` boolean
  - `allowMultipleOptions` boolean
  - `rankedChoiceVoting` boolean
  - `showLiveResults` boolean
  - `weightedVotingEnabled` boolean
  - `voterRoles` object[]: Must not have more than 40 items.
    - `name` string, nullable: Must not be greater than 255 characters.
    - `role` string, nullable: Must not be greater than 50 characters.
  - `gamification` boolean
  - `nameRequired` boolean
  - `votingDeadline` string, nullable: Must be a valid date in the format <code>Y-m-d</code>.
  - `consensusThresholdPercent` integer: Must be at least 0. Must not be greater than 100.

## Response `200`

- object
  - `valid` boolean
  - `errors` object
    - `options` string
  - `inputs` object
    - `title` string
    - `options` unknown[]
      - unknown

## Other responses

- `401`: unauthenticated: No valid bearer token was sent.
- `422`: validation_failed: The request body failed validation; field messages are in `errors`.
- `429`: rate_limited: A throttle or a per-account allowance refused the request; `retry_after` or `remaining` may be present.
- `500`: server_error: Unhandled failure; quote `request_id` to support.

---

[API](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api.md) · [All operations](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/llms.txt) · [OpenAPI document](https://skmtc.dev/endlesstravelplans/apis/endless-travel-plans-api/revisions/ae82ed3e4a8f?raw)
