Create or Update Choice
Use this method to create or update a poll choice.
This method requires authentication.
Use this method to create or update a poll choice. This method will return all choices with their positions updated so that they can be displayed correctly in an editor. When utilizing random sort order, that will be applied when requesting the poll details
* id: (optional) If specified, the poll choice with this ID will be updated
* position: (optional, default = -1) The position of the choice in the list of choices. By default a new choice is added to the end of the list of choices. If you specify a position, the choice is moved to that position and any other choices there or after that position are moved up one position index.
* title: (optional) This is the text displayed with the choice.
* imageurl: (optional) You can use this field to set the URL for an image
* videoid: (optional) A field to store the ID of a video
* embedcode: (optional) Store content that can be used to display the choice.
* vidoeurl: (optional) This field may be used to store the URL for a video
* customid: (optional) A customid for the room. Can be unused, or a unique key.
* customtype : (optional) Custom type string.
* custompayload : (optional) Custom payload string.
* customfield1 : (optional) User custom field 1. Store any string value you want here, limit 1024 bytes.
* customfield2 : (optional) User custom field 2. Store any string value you want here, limit 1024 bytes.
* customtags : (optional) A comma delimited list of tags
* private: (false | optional) If set to true a user cannot join this room unless explicitly granted with a call to the Set User Permission API.
Parameters
Values in the path and query string.
appid path The TalkLabs application ID assigned to your account.
Example:your-app-id pollid path The TalkLabs assigned poll ID.
Example:poll-id JSON body
Send as application/json.
id pollID The TalkLabs assigned poll ID.
position title subtitle imageUrl videoID embedCode customType customId A customer defined ID chosen by your application. TalkLabs stores it so you can retrieve the resource without keeping its TalkLabs ID.
customPayload customField1 customField2 customTags {
"position": -1,
"title": "Red"
} Status codes
Every JSON response uses the API result envelope.
200 OK ApiResult 400 Bad Request ApiResult 403 Forbidden ApiResult 500 Internal Server Error ApiResult {
"message": "Success",
"errors": {},
"data": [
{
"kind": "poll.choice",
"id": "662da22ee45ad80a7f2bd951",
"appid": "662bb49bf10e9a26a7e8ed92",
"pollid": "662da20fe45ad80a7f2bd950",
"position": 0,
"title": "Red",
"imageurl": "",
"videoid": "",
"embedcode": "",
"customtype": "",
"customid": "",
"custompayload": "",
"customtags": null,
"customfield1": "",
"customfield2": ""
}
]
}