Cast or cancel a vote
This action adds or removes a vote from a poll option, changing the number of votes given to each option. Use this action to override a previous vote and update the user's final choice of poll options.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
poll_id | integer | Specifies the unique ID of the poll. |
Request body
The following table lists the properties that this action supports.
Required
Property name | Type | Description |
---|---|---|
user_id | string | Specifies the unique ID of a user who casts or cancels a vote. |
option_ids | array of integers | Specifies the array of option IDs to cast or cancel votes. For example, if a user had voted for both Option 1 and Option 2 in a poll, you can specify this property's value as |
Response
If successful, this action returns an updated poll resource in the response body.
In the case of an error, an error object is returned. A detailed list of error codes is available here.