A small, API-key-authenticated REST API for reading votes and results and managing polls. It powers the Zapier integration and is available on every plan, free included.
https://us-central1-polls-for-gmail.cloudfunctions.net/zapierApi
All endpoints are HTTPS-only and return JSON. Errors return an appropriate HTTP status with a body of {"error": "human-readable message"}.
Every request carries your per-account API key in the X-API-Key header (an Authorization: Bearer header works too). Keys start with pfg_.
# Verify a key — returns the account it belongs to curl https://us-central1-polls-for-gmail.cloudfunctions.net/zapierApi/me \ -H "X-API-Key: pfg_your_key_here" {"email":"[email protected]","tier":"pro"}
Auth test. Returns email and tier ("free" | "standard" | "pro") for the key's account.
Your polls, newest first (up to 200). Optional ?status=active or ?status=closed.
Items: id, question, status, poll_type, total_votes, created_at
Recent votes across all your polls, newest first (up to 100). Optional ?poll_id= narrows to one poll. Votes on deleted polls are excluded.
Items: id, poll_id, poll_question, poll_type, voter_name, voter_email (null on anonymous polls), choice (readable label — e.g. "Lisbon", "Yes", or "Lisbon > Porto" for ranked), answers (per-question array on multi-question polls), voted_at, poll_url
Your recently closed polls with final results — closed by hand, by API, or by a passed deadline (up to 25, drawn from your 150 newest polls).
Items: id, question, poll_type, total_votes, deadline, created_at, poll_url, results (array of {option, votes, percent}), results_text (ready-to-post summary), winner, plus average on rating polls
Create a poll. Available on every tier; the same plan quota applies as any other create surface.
Body: question (required, ≤500 chars) · options (array, or newline-separated string; required for single/multiple/ranked; 2–10 options, up to 20 on Pro) · poll_type ("single" default | "multiple" | "yesno" | "rating" | "ranked" | "text") · rating_max (3–10, rating polls) · deadline (ISO 8601, must be future) · hide_results (boolean)
curl -X POST .../zapierApi/polls \
-H "X-API-Key: pfg_your_key_here" -H "Content-Type: application/json" \
-d '{"question":"Where should we hold the offsite?",
"options":"Lisbon\nPorto","deadline":"2026-10-01T17:00:00Z"}'
{"id":"pabc123","question":"Where should we hold the offsite?",
"options":["Lisbon","Porto"],"poll_type":"single","status":"active",
"deadline":"2026-10-01T17:00:00.000Z","hide_results":false,
"poll_url":"https://pollsforgmail.com/vote.html?pollId=pabc123",
"dashboard_url":"https://pollsforgmail.com/dashboard.html"}
Close a poll you own and get its final results in the same response (same shape as /closed-polls items, plus already_closed). Closing an already-closed poll is a safe no-op.
Body: poll_id (required)
401 — missing, malformed, or revoked API key.400 — invalid input; the message says exactly what to fix (bad deadline, too few options, …). Invalid input is never silently corrected.402 — your plan's poll-creation quota is used for the month (Free and Standard).403/404 — the poll doesn't exist on your account.429 — more than 200 polls created via the API in one day (a runaway-automation backstop).This API backs the official Polls for Gmail Zapier integration — triggers for New Vote and Poll Closed, actions for Create Poll and Close Poll. If you just want votes in Google Sheets or Slack, start there; no code needed.
Building something else against this API? We'd love to hear about it — [email protected].
Sign in, open Settings, and copy your key — every plan has one.