Get poll by Id

Endpoint to fetch a Poll by Id

You have a poll created, but how do you fetch it?

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

Headers

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