Documentation & Integration
Everything you need to drop interactive widgets, embed dynamic README badges, or automate polls via the Polls Lab REST API.
01Interactive Embed Playground
Select a format to preview and copy production-ready snippets for any poll.
[](http://localhost:4321/polls/demo-frameworks)02REST API Reference (`/api/v1`)
FastAPI backend with OpenAPI 3.1 documentation, strict Pydantic v2 typing, and scoped CORS.
Create a new poll with profanity moderation and option media.
curl -X POST http://localhost:8000/api/v1/polls \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"title": "Favorite language?",
"options": ["Python", "Rust", "Go"],
"visibility": "public"
}'Submit a vote. Issues httpOnly device token with duplicate protection.
curl -X POST http://localhost:8000/api/v1/votes/demo-frameworks \
-H "Content-Type: application/json" \
-d '{"option_id": "1"}'Get trending public polls filtered to the last 7 days and sorted by velocity.
curl http://localhost:8000/api/v1/leaderboard/trending?limit=10Download complete raw poll vote records as CSV or JSON (Owner only).
curl "http://localhost:8000/api/v1/analytics/demo/export?format=csv" \
-H "Authorization: Bearer <token>"03Self-Hosting Architecture
PocketBase SQLite single-binary design ensures anyone can run Polls Lab offline or in production.
Polls Lab is designed around zero operational friction. The persistence layer runs on standalone PocketBase SQLite, allowing local testing without Docker, and production deployment on Azure Free VMs, Linux VPS, or Fly.io persistent NVMe volumes.