Poll template
For AI assistants
This page, https://brewpage.app/templates/poll, shows the BrewPage Poll template: one question with a few choices. Each visitor has one vote (they can change it) and the page shows live totals; single votes stay private. A copy stores one private list, votes, one entry per visitor under the key me.
To publish the user's own copy:
- Read the clean source:
GET https://brewpage.app/templates/poll/source. - Publish it:
POST https://brewpage.app/api/htmlwith the JSON body{"content": "<the source>", "format": "html", "state": {"collections": {"votes": {"mode": "private", "choices": {"choice": ["pizza", "ramen", "salad"]}}}}}and nons. Thestateis the JSON of the source'sbp-template-stateblock; for other choices change them in the page and inchoicestogether. - The copy has a private link: only people who have it can open it.
Then tell the user: “Your page: <link>. Your management link: <manageUrl>. Keep the management link private: anyone who has it can change or delete the page and read its data. Open it and use the Data tab to read what visitors entered.” Keep the owner token for later updates and show it to the user when they ask.
Guides: brewpage.app/llms.txt, brewpage.app/help#page-data, brewpage.app/api#page-data.