Skip to main content
POST
Create vote

Authorizations

Authorization
string
header
required

Personal API token — find yours under My Account → API.

Headers

X-POLLUNIT-USER-IDENTIFIER
string

Your own identification of the user on whose behalf the request is made, any string. The user identifiers should not be guessable and stay secret, otherwise users could get access to other users' contents. Only used with a public API token: the created or changed object belongs to that anonymous user instead of the token owner, which keeps the user in control of it in later requests with the same identifier.

X-POLLUNIT-POLL-PASSWORD
string

Access password of the poll. Only needed for password protected polls.

Path Parameters

poll_id
string
required

Poll member_hash or admin_hash

Query Parameters

organization_id
string

public_id of an organization the user belongs to. When given, the request runs in that organization context instead of the personal account.

Body

application/json
voter_id
string
required

Voter public_id of the participant who votes

option_id
string
required

Option public_id

vote
object
required

Response

bought votes have to be paid

Returned instead of the vote when the poll sells votes (voting_fee_type voting_sell_votes). The vote is saved, but the bought votes only count once the payment page has been completed.

message
string
Example:

"Complete payment for voter"

url
string<uri>

Payment page for the bought votes.