Poll API Documentation v4

With Last Poll Fallback & Blind Voting.

1. Get Active (or Last) Poll

Fetches the currently active poll. If no active poll exists, it returns the results of the last available poll (e.g., an expired one).

Note:

GET /api/endpoint.php
curl -X GET https://poll.teraboxfast.com/api/endpoint.php

Response Behavior

Scenario A: Active Poll (Not Voted)

{ "poll_id": 1, "title": "Which is the Best Premium Midrange Phone of 2025?", "status": "active", "end_time": 1735234567, "user_voted_option_id": null, "total_votes": 0, "options": [ { "id": 1, "label": "Option A" }, { "id": 2, "label": "Option B" } ] }

Note: Stats are hidden to prevent bias.

Scenario B: Active Poll (Voted) OR Past Poll

{ "poll_id": 1, "title": "Poll Question", "total_votes": 120, "options": [ { "id": 1, "label": "Option A", "percent": 45.0, "votes": 54 }, { "id": 2, "label": "Option B", "percent": 55.0, "votes": 66 } ] }

Note: Stats are visible because the user has either already voted or the poll is finished.

2. Vote on a Poll

POST /api/endpoint.php
curl -X POST https://poll.teraboxfast.com/api/endpoint.php \ -H "Content-Type: application/json" \ -d '{"poll_id": 1, "option_id": 2}'