Create poll
API to create a poll
Key | Type | Description |
question required | string | The question/title of the Poll |
identifier | string | Can be used to pass in custom identifier, eg - user id, email, etc. |
data | object | A flexible data field to store any meta data with each option |
Minimum 2 Options are required in a poll (Just making the obvious known )
😅
Key | Type | Description |
text required | string | String to store the option's text |
data | object | A flexible data field to store any meta data with each option |
post
https://api.pollsapi.com/v1
/create/poll
Creating a Poll
curl -X POST \
'https://api.pollsapi.com/v1/create/poll' \
-H 'content-type: application/json' \
-H "api-key: $API_KEY" \
-d '
{
"question": "Do you like polls?",
"options": [
{
"text": "Yes"
},
{
"text": "No"
}
]
}
'
{
"question": "Does this doc help?",
"identifier": "custom_identifier",
"data": {
"custom": "Poll Data"
}
"options": [
{
"text": "Option Text",
"data": {
"custom": "data"
}
},
{
"text": "Option Text2",
"data": {
"custom": "data"
}
}
]
}
Last modified 2yr ago