Home/API documentation
Developers

Polls for Gmail API

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.

Base URL

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"}.

Authentication

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"}
Where do I get a key? Sign in to your dashboard → Settings → Zapier row → Show API key. Regenerating the key there instantly revokes the old one. Keys are scoped to your account: the API can only ever see your own polls and votes.

Endpoints

GET/me

Auth test. Returns email and tier ("free" | "standard" | "pro") for the key's account.

GET/polls

Your polls, newest first (up to 200). Optional ?status=active or ?status=closed.

Items: id, question, status, poll_type, total_votes, created_at

GET/votes

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

GET/closed-polls

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

POST/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"}
POST/polls/close

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)

Errors & limits

Zapier

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].

Get your API key.

Sign in, open Settings, and copy your key — every plan has one.

Open dashboard See the Zapier integration