StrawPoll API


Authentication

To send authenticated requests, an account must first be registered. Afterwards a new key can be generated in the account settings under "API Key". If this key gets into other attachments, it can be invalidated at any time by generating a new key.
The API key is added to a request by sending an additional header field to which the key is attached. Just replace <<api_key>> with your api key in the example below.

Example Query for Creating a Poll Using an API Key

curl 'https://strawpoll.com/api/poll' \
--header 'API-KEY: <<api_key>>' \
--data-binary '{"poll":{"title":"API Example","answers":["Answer 1", "Answer 2"],"priv":true}}'