The purpose of this API is to create a poll in a Zoho Connect network.
Request URL: | https://connect.zoho.com/pulse/api/addPoll |
OAuth Scope: | zohopulse.feedList.CREATE |
Request Method: | POST |
Mandatory Header: | Header name: Authorization Header Value: Zoho-oauthtoken d92d401c803988c5cb849d0b4215f52 |
Parameters
Name | Description | Required |
scopeID | Network in which the poll is to be posted. You can get this from the network list API. | Required |
partitionId | It can either be the Group/Company wall/User's partition id. By default, the user partition ID is taken. | Optional |
question | A question for the poll. | Required |
textOptions | Text options for the poll, separated by a comma. | Required |
imageIds | Image Options for the Poll, separated by a comma. Upload files using uploadFiles API and return the fields. You can add up to 10 images to a poll. | Optional |
allowMultiple | Allow members to vote for multiple options. You can set this as either true or false. | Optional |
voteDisplayType | Either (0 | 1 | 2). 0 represents DEFAULT, 1 represents SHOW_AFTER_VOTE, 2 represents SHOW_AFTER_ADMIN_APPROVAL. | Required |
canEditVote | Set this as true or false depending on whether you want members to edit their choice. | Optional |
canDeclareResult | Set this as true or false depending on whether you want the poll closed and the results declared. | Optional |
endYear | End Year for the poll. ex) 2019 | Optional |
endMonth | End Month for the poll. ex) 08 | Optional |
endDate | Days left for the poll to expire. ex) 21 | Optional |
endHour | Hour(s) for the poll to expire. This should be in the 24hr format ex) 20 | Optional |
endMin | Minutes for the poll to expire. ex) 18 | Optional |
Sample URL
Copiedhttps://connect.zoho.com/pulse/api/addPoll?scopeID=929000000015001&partitionId=929000000295001&question=pollQuestion&textOptions=Option1,Option2&allowMultiple=true&voteDisplayType=0
Sample Response
Copied{
"addPoll": {
"stream": {
"id": "929000000855639",
"userDetails": {
"zuid": "2060758",
"id": "2060758",
"name": "Patricia Boyle",
"canFollow": "true"
},
"partition": {
"id": "929000000295001",
"name": "Engineering",
"partitionUrl": "engineering",
"url": "engineering",
"isPrivate": "true",
"status": "ACTIVE",
"isAdmin": "true",
"type": "GROUP",
"typeOrd": "2",
"isUserFollow": "false"
},
"allowFooter": "true",
"isApproved": "true",
"isSpam": "false",
"canAddTask": "true",
"reason": {
"items": {
"*^$@_PARTITION_*^$@": {
"id": "929000000295001",
"name": "Engineering",
"partitionUrl": "engineering",
"url": "engineering",
"isPrivate": "true",
"status": "ACTIVE",
"isAdmin": "true",
"type": "GROUP",
"typeOrd": "2",
"isUserFollow": "false"
},
"*^$@_USERNAME_*^$@_2060758": {
"zuid": "2060758",
"id": "2060758",
"name": "Patricia Boyle",
"canFollow": "true"
}
},
"msg": "*^$@_USERNAME_*^$@_2060758 has started a poll in *^$@_PARTITION_*^$@."
},
"type": "POLL",
"polls": {
"voteDisplayType": "0",
"allowmultiple": "true",
"canShowResult": "true",
"isVoted": "false",
"options": [
{
"id": "929000000855646",
"option": "Option1",
"canDelete": "true"
},
{
"id": "929000000855648",
"option": "Option2",
"canDelete": "true"
}
]
},
"canAddPollOption": "true",
"content": [
{
"text": "pollQuestion"
}
],
"time": "1521525195934",
"streamModifiedTime": "1521525195934",
"formatedTime": "06:53 PM",
"lastActivityTime": "1521525195934",
"canHide": "true",
"canEdit": "true",
"canDelete": "true",
"canLock": "true",
"canEditVote": "true",
"canFollow": "true",
"canMove": "true",
"comments": [],
"url": "https://connect.zoho.com/portal/zillum/stream/929000000855639",
"streamMentionData": [
{
"zuid": "2060758",
"id": "2060758",
"name": "Patricia Boyle",
"type": "C",
"emailId": "patriciab@zillum.com",
"role": "MEMBER"
}
]
}
}
}
Show full
Show less