curl --request POST \
--url https://apix.us.amity.co/api/v3/polls/{pollId}/votes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '{
"answerIds": [
"<string>"
]
}'
{
"polls": [
{
"pollId": "<string>",
"userId": "<string>",
"userInternalId": "64be1f6cb9b4106b5a6bbf3f",
"userPublicId": "User123",
"title": "<string>",
"question": "<string>",
"answers": [
{
"dataType": "text",
"data": "<string>",
"fileId": "<string>",
"voteCount": 0,
"isVotedByUser": false,
"id": "<string>"
}
],
"answerType": "<string>",
"closedAt": "<string>",
"createdAt": "<string>",
"isVoted": false,
"status": "open",
"closedIn": 123
}
],
"users": [
{
"_id": "<string>",
"path": "<string>",
"userId": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [
"MUTE_CHANNEL"
],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isDeleted": true
}
],
"roles": [
{
"roleId": "<string>",
"displayName": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
],
"isDeleted": false
}
]
}
Client vote poll
curl --request POST \
--url https://apix.us.amity.co/api/v3/polls/{pollId}/votes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '{
"answerIds": [
"<string>"
]
}'
{
"polls": [
{
"pollId": "<string>",
"userId": "<string>",
"userInternalId": "64be1f6cb9b4106b5a6bbf3f",
"userPublicId": "User123",
"title": "<string>",
"question": "<string>",
"answers": [
{
"dataType": "text",
"data": "<string>",
"fileId": "<string>",
"voteCount": 0,
"isVotedByUser": false,
"id": "<string>"
}
],
"answerType": "<string>",
"closedAt": "<string>",
"createdAt": "<string>",
"isVoted": false,
"status": "open",
"closedIn": 123
}
],
"users": [
{
"_id": "<string>",
"path": "<string>",
"userId": "<string>",
"userInternalId": "<string>",
"userPublicId": "<string>",
"roles": [
"<string>"
],
"permissions": [
"MUTE_CHANNEL"
],
"displayName": "<string>",
"profileHandle": "<string>",
"description": "<string>",
"avatarFileId": "<string>",
"avatarCustomUrl": "<string>",
"flagCount": 123,
"hashFlag": {
"bits": 123,
"hashes": 123,
"hash": [
"<string>"
]
},
"metadata": {},
"isGlobalBan": true,
"isBrand": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isDeleted": true
}
],
"roles": [
{
"roleId": "<string>",
"displayName": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
],
"isDeleted": false
}
]
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Information of a poll to be voted.
The body is of type object
.
Poll Information
The response is of type object
.