Create poll
API to create a poll

Fields Information

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

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

Example cURL request

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"
}
]
}
'

Request Body

{
"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"
}
}
]
}

Copy link
On this page
Fields Information
Poll
Option
post
Creating a Poll
Example cURL request
Request Body