Office

Polls

The 4 tools for polls. Before an agent first makes one, it reads guide topic polls.

create_poll

Make a poll in a space: a question (the title) and options people vote on — one each, or several — with the results live as they vote: counts, shares and who voted for what (unless anonymous). The votes are kept in a spreadsheet or a database table of the space (votes_to; left out, a new sheet of its own), a row per vote, where people see and use them like any other data. For a team decision, a date, a venue, a name, a priority; with open_options, an idea board. People vote; you read the results with read_poll. Read guide topic "polls" first; check it with render_poll.

Parameters

space_idstringrequired
titlestringrequired
The question, as people will read it: "Where should we hold the Q1 offsite?"
optionsobject[]required
The choices, in the order they show.
Show child attributes
titlestringrequired
The choice, short: "Lisbon", "Option B: annual pricing", "Ship on Friday".
descriptionstring
A line or two under it: what it means, what it costs, the trade-off.
imagestring
A picture of it (a venue, a design, a product): an http(s) image address, or one add_asset gave.
urlstring
Its page: the venue, the product, the design file, the proposal.
votes_toobject
Where the votes are kept, one row (or record) per vote: Voted at (UTC), Who, Option, Voter ID. Left out, a new spreadsheet "<question> — votes" of its own.
Show child attributes
sheetstring
A spreadsheet in this space.
tabstring
With sheet: the tab (made when missing; left out, a new "Votes" tab).
databasestring
Or a database in this space.
tablestring
With database: the table, by name or id (its missing fields are added; left out, a new "Votes" table).
descriptionstring
Under the question: the context people need to choose — what is being decided, by when, what happens with the result.
multipleboolean
People may pick more than one option (default: one).
max_choicesinteger
With multiple: at most this many each.
anonymousboolean
Show only how many voted for each option, never who (the votes' Who is left blank). Set it before anyone votes.
open_optionsboolean
Anyone who can vote may add an option of their own (an idea board).
closes_atstring
When voting ends: an ISO time "2026-11-05T17:00:00Z", or a day "2026-11-05" (its end, UTC).

read_poll

A poll as it is now, counted from its votes: the question, whether it is open, where the votes are kept, and each option with its id (what update_poll and comment take), its votes, its share of the voters and who voted for it (names; none when anonymous), the leaders and how many people voted; problems with the votes (rows for no option, a votes tab that is gone).

Parameters

item_idstringrequired

update_poll

Change a poll. Any of: title (the question); description, multiple, max_choices, anonymous (before the first vote), open_options, closes_at (null to clear); closed (true ends voting now, false opens it again); add_options; change_options (by id: title, description, image, url; "" clears one — a new title renames its votes too); remove_options (their votes are deleted with them); move_options (to a 0-based place); clear_votes (deletes everyone's votes, to start over — only when the person asks); votes_to (where votes go from now on; the votes so far are copied there). Applied in that order. People's votes are theirs: never vote for them.

Parameters

item_idstringrequired
titlestring
descriptionstring | null
multipleboolean
max_choicesinteger | null
anonymousboolean
open_optionsboolean
closes_atstring | null
closedboolean
add_optionsobject[]
Show child attributes
titlestringrequired
The choice, short: "Lisbon", "Option B: annual pricing", "Ship on Friday".
descriptionstring
A line or two under it: what it means, what it costs, the trade-off.
imagestring
A picture of it (a venue, a design, a product): an http(s) image address, or one add_asset gave.
urlstring
Its page: the venue, the product, the design file, the proposal.
change_optionsobject[]
Show child attributes
idstringrequired
changesobjectrequired
Show child attributes
titlestring
The choice, short: "Lisbon", "Option B: annual pricing", "Ship on Friday".
descriptionstring
A line or two under it: what it means, what it costs, the trade-off.
imagestring
A picture of it (a venue, a design, a product): an http(s) image address, or one add_asset gave.
urlstring
Its page: the venue, the product, the design file, the proposal.
remove_optionsstring[]
move_optionsobject[]
Show child attributes
idstringrequired
tointegerrequired
clear_votesboolean
votes_toobject
Where the votes are kept, one row (or record) per vote: Voted at (UTC), Who, Option, Voter ID. Left out, a new spreadsheet "<question> — votes" of its own.
Show child attributes
sheetstring
A spreadsheet in this space.
tabstring
With sheet: the tab (made when missing; left out, a new "Votes" tab).
databasestring
Or a database in this space.
tablestring
With database: the table, by name or id (its missing fields are added; left out, a new "Votes" table).

render_poll

See a poll as people do: a screenshot of the question, the options with their pictures, and the results bars as they stand, plus checks (fewer than two options, a closing time passed, a limit that limits nothing, problems with the votes) and errors the page hit.

Parameters

item_idstringrequired