API
JSON API. No accounts, no API keys — auth is the one-time adminToken returned at creation (Bearer). Votes only come from people on the share page; there is no voting endpoint. Media (image/video/audio): web form only.
lang / translations: English · Français · Deutsch · Italiano (en, fr, de, it)
Endpoints
GET | /api | — | machine-readable schema + example call |
POST | /api/polls | — | create → 201 |
GET | /api/polls/{id} | — | public poll + language versions |
GET | /api/polls/{id}/results | (Bearer) | results + stats (Bearer if private) |
PATCH | /api/polls/{id} | Bearer | close / expiry / language versions |
DELETE | /api/polls/{id} | Bearer | erase poll + responses → 204 |
https://sondage-prive.ch/api ⟶ JSON
Example
curl -X POST https://sondage-prive.ch/api/polls \
-H 'content-type: application/json' \
-d '{"title":"Team lunch?","lang":"en","expiryDays":30,"resultsPublic":true,
"questions":[{"type":"single","label":"Which day?","options":["Mon","Tue"]}]}'
# PATCH body: {"closed":true} | {"expiryDays":730} | {"translations":{"fr":{…}}}
# -H 'authorization: Bearer <adminToken>' Or let an AI assistant do it — paste this into ChatGPT, Claude, …:
Create a poll about <topic> using the API described at https://sondage-prive.ch/api. Questions: <questions>. Give me the share link and the admin link.
Limits: 20 questions, 12 options/question, expiry 7/30/90/365/730 days, 10 creations per hour per IP. Data: no cookies, no stored IPs, day-precision dates, hard-delete at expiry.