Skip to Content
MinexonMinexon

forum.poll-vote

Vote for one option in an open topic poll.

POST/api/v1/{locale}/forum/topics/{slug}/poll/vote

API scope forum.poll-vote

Request

Send Authorization: Bearer <key> with each request.

Requires a signed-in player and applicable permission.

Path parameters

FieldTypeRequirementDescription
localetr or enRequiredRequest locale.
slugstringRequiredURL slug of the resource.

Request body

FieldTypeRequirementDescription
choicestringRequiredPoll option key, up to 80 bytes.

Run samples from your application server. See Quickstart for variables and sessions.

curl --fail-with-body --request POST \
  -H "Authorization: Bearer $MINEXON_API_KEY" \
  -b "$MINEXON_COOKIE_JAR" -c "$MINEXON_COOKIE_JAR" \
  -H 'Content-Type: application/json' \
  --data '{
  "choice": "<poll option key>"
}' \
  "${MINEXON_BASE_URL}/api/v1/en/forum/topics/example/poll/vote"

Response

HTTP 200 · application/json

FieldTypeRequirementDescription
nextstringRequiredNext location returned by the CMS or provider.
noticesstring[]ConditionalSuccess and state codes.
errorstringConditionalError code.
errorsstring[]ConditionalField or operation error codes.
{
  "next": "/en/forum/topic/example"
}

When the form is shown again, the response can contain data instead of next. Check the HTTP status and the error fields together.

Form response fields
FieldTypeRequirementDescription
localestringRequiredResponse locale.
errorstring or nullConditionalAction error. Can be empty on success.
errorsarray or objectConditionalField or form validation errors.
noticestring or nullConditionalAction notice.
topicobjectConditionalTopic data and related replies.
categoriesarray or objectConditionalAvailable categories or a map keyed by category.
categoryTrailsarray or objectConditionalCategory paths.
relatedTopicsarray or objectConditionalRelated topics.
memberRolesarray or objectConditionalVisible author role badges.
forumCanReplybooleanConditionalWhether the current account can reply.
forumCanManagebooleanConditionalCategory moderation permission.
forumCanFollowbooleanConditionalTopic follow permission.
forumCanVotebooleanConditionalPoll-voting permission.
forumCanEditTopicbooleanConditionalPermission to edit the topic.
editableRepliesarrayConditionalIDs of editable replies.
forumNoticestring or nullConditionalForum status notice.
reportablearray or objectConditionalReportable targets and report state.
reportErrorstring or nullConditionalReport validation error.
pollErrorstring or nullConditionalPoll vote error.
submissionstringConditionalSubmit as _submission for the same form.

Flow and error cases

Locked or closed polls reject new votes. Repeating a vote for the same option does not add another vote.

Shared error and authentication contract