-
get-pollGet Poll -
get-votesGet Votes -
list-pollsList Polls
Get Poll
Fetch a single poll with its options and current vote counts. Requires install_plugins. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
poll_id |
integer | Yes | The post ID of the poll. | |
site_id |
integer | No | Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site. |
Get Votes
Fetch votes for a poll, optionally filtered by option. Returns voter details, comment text, and timestamp. Useful for summarising results once a poll has closed. Requires install_plugins. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
poll_id |
integer | Yes | The post ID of the poll. | |
option_id |
integer | No | Optional. Filter to a specific option ID, which must belong to the poll. | |
site_id |
integer | No | Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site. |
List Polls
List all polls on the current site with their status, option count, and total vote count. Requires install_plugins. Pass site_id to act on another site you belong to.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status |
string | No | Filter by post status. Defaults to any. One of: publish, draft, private, any. |
|
site_id |
integer | No | Optional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site. |