Developers
Build with StrawPoll
Create polls and forms from your own code, collect responses and read the results. All you need is an API key and a few lines of code.
Create your first poll
Three steps to a published poll.
01
Create an API key
Create one in Settings → API keys and store it in an environment variable, so it is not part of your code:
export STRAWPOLL_API_KEY="sp_your_key"02
Run a script
Save the script and run it. It publishes a poll and prints its voting and results links.
curl -s -X POST "https://strawpoll.com/api/v4/polls" \ -H "X-API-Key: $STRAWPOLL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Where should we go for lunch?", "options": ["Pizza", "Sushi", "Tacos"] }' \ | jq -r '.urls.voteUrl, .urls.resultsUrl'Runsh create-poll.sh· Needs jq03
Read the results
Fetch the poll by its id, the end of its link. Each option includes its votes.
curl "https://strawpoll.com/api/v4/polls/w8Jq3KdN" \ -H "X-API-Key: $STRAWPOLL_API_KEY"
Everything for developers
- API reference Every endpoint with its parameters, payloads and responses.
- Playground Send real requests with your key directly from the browser.
- AI assistants (MCP) Let Claude, ChatGPT and other agents create polls for you.
- Embeds Add a poll to your website with an iframe or a script tag.
- Webhooks Receive every new response on your server.
- OpenAPI spec Generate a client or import the API into Postman or Insomnia.
- Poll API v3 The previous API, still running for existing integrations.
- llms.txt A summary of StrawPoll and its API for language models.