Polls

Poll Fields

Field Type Description
closed_at string The time at which the poll closes in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ.
created_at string The time at which the poll was created in ISO 8601 format; YYYY-MM-DDTHH:MM:SSZ.
id string Primary identifier for a poll. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This id space is unique to poll objects. There can be a Post and Poll with the same ID; no relation is implied.
is_anonymous boolean Whether poll results are anonymous, or if who responded to what option is displayed when the poll is over (or the creator of the poll looks at it).
is_public boolean Whether poll is public or private. If private, it still may be attached to a public object, such as a post or a message.
max_options integer How many options can be selected at once by responders. Default is 1.
options object A list of 2 to 10 responses for the poll.
Field Type Description
text string Up to 64 Unicode characters. One response for users to choose for the poll. Any spaces, including line endings, will be replaced with a single space.
position integer Order of the option in the list of options, starting at 1 and going up sequentially. Assigned by the API if the user does not specify them.
is_your_response boolean True if user responded to the poll with this option.

Only set on authenticated user calls.

respondents integer Number of users that responded to the poll.

Only set if the poll is closed.

respondent_ids object A sample of respondent IDs.

Only set if is_anonymous is false and respondents is present.

poll_token string A token to access and respond to the poll.

Only set on POST creation response, if included in the query string, or if the Polls scope gives you access to the poll.

prompt string A readable name of the poll. This is the prompt users will be responding to for the Options. Up to 256 Unicode characters. Be sure to escape if necessary.
source object
Field Type Description
name string Description of the API consumer that created this poll.
id string The public client id of the API consumer that created this poll.
url string Link provided by the API consumer that created this poll.
type string The type of poll. Generally uses a reversed domain name to identify the intended purpose. Non-core poll types (io.pnut.core.*) are not authenticated by the server; clients should not assume other clients created their poll types the same way.
user object This is an embedded User object.

In certain cases, this key may be omitted.

user_id string Primary identifier for the user who created the poll.

Only set if the user above is omitted.

raw object The raw items attached to this object.

Only set if query parameter specified.

Field Type Description
{type name} list of objects A list of objects of this type.

General Poll Parameters

Any endpoint that returns poll objects can be subject to these parameters.

General Parameters

Name Type Description Default
include_closed integer (0 or 1) Include closed polls. Only applicable to the user's poll stream. true
include_private integer (0 or 1) Include private polls. Only applicable to the user's poll stream. true
poll_types string Comma-separated list of poll types to retrieve. Only applicable to the user's poll stream. If not included, will return any polls the app is authorized to view. all
exclude_poll_types string Comma-separated list of poll types not to retrieve. Only applicable to the user's poll stream. Ignored if poll_types set. none
include_raw integer (0 or 1) Include raw on all objects. false
include_poll_raw integer (0 or 1) Include raw on all poll objects. false