Get poll by Id
Endpoint to fetch a Poll by Id
You have a poll created, but how do you fetch it?
Well, this is the reason this endpoint exists😉. Just pass in the poll id that you want to retrieve and let the magic happen.
Get Poll by Id
GET
https://api.pollsapi.com/v1/get/poll/{poll_id}
This endpoint allows you to fetch your poll by ID
Path Parameters
Name
Type
Description
poll_id
string
ID of the Poll to fetch
Headers
Name
Type
Description
api-key
string
API KEY for your account
{
"status": "success",
"statusCode": 200,
"data": {
"identifier": null,
"question": "Do you like polls?",
"data": {},
"created_at": "2020-10-24T02:28:46.391Z",
"updated_at": "2020-10-24T02:28:46.391Z",
"id": "5f93915e7e044c74074f072e",
"entity": "Poll",
"options": [
{
"text": "Yes",
"votes_count": 0,
"data": {},
"poll_id": "5f93915e7e044c74074f072e",
"created_at": "2020-10-24T02:28:46.422Z",
"updated_at": "2020-10-24T02:28:46.422Z",
"id": "5f93915e7e044c74074f072f",
"entity": "Option"
},
{
"text": "No",
"votes_count": 0,
"data": {},
"poll_id": "5f93915e7e044c74074f072e",
"created_at": "2020-10-24T02:28:46.422Z",
"updated_at": "2020-10-24T02:28:46.422Z",
"id": "5f93915e7e044c74074f0730",
"entity": "Option"
}
]
}
}
Example cURL Request
curl https://api.pollsapi.com/v1/get/poll/5f9f7b186477891e5bc646a1 \
-H "content-type: application/json" \
-H "api-key: $API_KEY"
Last updated
Was this helpful?