---
title: "Cast a ballot"
method: POST
path: "/api/v2/votes/{code}/ballots"
tags: ["Votes (v2)"]
---

# Cast a ballot

`POST /api/v2/votes/{code}/ballots`

## Request

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

The join page's submit: one option id (several when the vote allows it), the voter's name when the vote
asks for it, and on a vote with roles the listed person voting (`voter`, or `__someone_else` with a
`name`). The ballot is filed under the caller's account. With households on, `another: true` lets a
further person vote from the same account under their own name. The document comes back with the
caller's picks and the tallies when they may see them.

## Request body

- object
  - `optionIds` integer[], required: The option ids picked.
  - `name` string, nullable: The voter's name.
  - `voter` string, nullable: The listed person voting (a name from `roles`, or __someone_else).
  - `another` boolean: A further household member voting from this account.

## Response `201`

- object
  - `code` string
  - `state` string
  - `has_voted` boolean
  - `my_option_ids` integer[]
  - `weight` integer

## Other responses

- `401`: unauthenticated: No valid bearer token was sent.
- `409`
- `422`
- `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)
