---
title: "Vote"
method: POST
path: "/clubs/{club_id}/polls/questions/{id}/votes"
tags: ["Poll", "signed_request"]
---

# Vote

`POST /clubs/{club_id}/polls/questions/{id}/votes`

## Request

- Base URL: `https://api.clubplatform.de/api`
- URL: `https://api.clubplatform.de/api/clubs/{club_id}/polls/questions/{id}/votes`
- Auth: one of:
  - API key in query parameter `auth_token`
  - API key in query parameter `hmac`

Create a vote for a poll.
Votes can only be created once per uuid on a poll.
The poll **MUST** be in state `running`.

<br>
> The request **MUST** be signed like it's described in the signed request section.

## Path parameters

- `club_id` integer, required
- `id` integer, required

## Request body

- object
  - `vote` object
    - `choice_id` integer: ID of the choice you want to vote for.
    - `uuid` string: Unique idientifier of the voting device.
  - `hmac` string: Signature of the request. See signed request section for more details.

## Response `200`

OK

- object
  - `data` object
    - `id` integer: ID of question.
    - `question` string: Text with question.
    - `starts_at` string, date-time: Date and time when the poll starts.
    - `ends_at` string, date-time: Date and time when the poll ends.
    - `modified_at` string, date-time: Date and time when the poll last modified.
    - `votes_count` integer: Number of total votes.
    - `status` 'pending' | 'running' | 'closed': State of the poll. | value | description | |:----------|:-------------------------| | `pending` | has not started yet | | `running` | is able to receive votes | | `closed` | is closed |
    - `locale` string: Locale of the object. 'de-DE', 'en-GB' or 'nl-NL'. This locale must be whitelisted for your club!
    - `category` object[]: List of categories the poll is associated with.
      - `handle` string: Handle of the category.
      - `name` string: Name of the category.
    - `choices` object[]: List of choices of this poll.
      - `id` integer: ID of the choice.
      - `text` string: Text of the choice.
      - `votes_count` integer: Number of votes for this choise.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/clubplatform/apis/clubplatform-api.md) - [All operations](https://skmtc.dev/clubplatform/apis/clubplatform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/clubplatform/apis/clubplatform-api/revisions/5c107a185e03?raw)
