Online Poll Maker
v1.0.0Create poll drafts on onlinepollmaker.com.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_poll_draft Create poll draft
Create a poll draft (1-100 single-choice questions, 2-10 options each). Returns id, token, version and edit_url. Give the edit_url to the person so they can review, verify and publish it in their browser; the draft expires 24 hours after creation. Never say the poll is published.
| Parameter | Type | Description |
|---|---|---|
questions * | null | array | 1-100 required single-choice questions |
email_mode | string | One of none (default), optional or required: whether participants are asked for an email address shared with the creator. Cannot change after publishing. |
email_purpose | string | Required when email_mode is optional or required: a short note (up to 200 characters) telling participants why the email is collected. |
title | string | Optional poll title, up to 200 characters after trimming. Empty means the first question is used as the title. |
get_poll_draft Read poll draft
Read the latest content and version of a draft. Call this before every update: the person may have edited the draft in the browser.
| Parameter | Type | Description |
|---|---|---|
id * | string | draft id returned by create_poll_draft |
token * | string | draft token returned by create_poll_draft |
update_poll_draft Replace poll draft
Replace the whole draft content. Send the version you just read with get_poll_draft. On version_conflict, read the draft again and re-apply your change; never overwrite newer content with an older copy.
| Parameter | Type | Description |
|---|---|---|
content * | object | the complete poll content; it replaces the whole draft |
id * | string | draft id returned by create_poll_draft |
token * | string | draft token returned by create_poll_draft |
version * | integer | the version you just read with get_poll_draft; a newer version on the server returns version_conflict |