curl --request POST \
--url https://apix.us.amity.co/api/v3/polls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"question": "<string>",
"answers": [
{
"dataType": "text",
"data": "<string>",
"fileId": "<string>"
}
],
"answerType": null,
"closedIn": 123
}
'{
"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": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<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,
"isDeleted": true
}
],
"roles": [
{
"roleId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
],
"isDeleted": false,
"displayName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Create a poll
curl --request POST \
--url https://apix.us.amity.co/api/v3/polls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"question": "<string>",
"answers": [
{
"dataType": "text",
"data": "<string>",
"fileId": "<string>"
}
],
"answerType": null,
"closedIn": 123
}
'{
"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": [
{
"userId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"_id": "<string>",
"path": "<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,
"isDeleted": true
}
],
"roles": [
{
"roleId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"permissions": [
"<string>"
],
"isDeleted": false,
"displayName": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Information of a poll to be created.
text and image, we can also mix dataType in one poll.millisecondsPoll title with maximum 150 characters
150question.
10Show child attributes
single or multiple.
single, multiple Countdown time to close vote (milliseconds)