> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Package: richContent

# Namespace: pollsV1

# Webhook link: https://dev.wix.com/docs/api-reference/assets/rich-content/polls-v1/poll-vote-removed.md

# Webhook Permissions Scopes IDs:
Manage Ricos Polls: SCOPE.DC-RICOS.MANAGE-POLLS

## REST API

### Schema

```
Webhook: Poll Vote Removed
Description: 
Event body:
 - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events.
 - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event.
 - name: slug | type: string | description: Event name.
 - name: entityId | type: string | description: ID of the entity associated with the event.
 - name: eventTime | type: string (date-time) | description: Event timestamp.
 - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR.
 - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
 - name: actionEvent | type: object | description: Custom action event details.
    - name: body | type: PollVoteRemoved | description: The event body.
        - name: poll | type: Poll | description: Poll with its voting results after the vote was removed. The results include vote counts and voters even when the poll's `settings` hide them from callers.
           - name: id | type: string | description: Poll GUID.
           - name: revision | type: string | description: Revision number, which increments by 1 each time the poll is updated. To prevent conflicting changes, the existing revision must be specified when updating a poll.  Ignored when creating a poll.
           - name: createdDate | type: string | description: Date and time the poll was created.
           - name: updatedDate | type: string | description: Date and time the poll was last updated.  Not returned for polls that weren't updated since they were created.
           - name: question | type: string | description: Poll question.  Optional. A poll without a question has no `question`, for example a poll that only has images. When the field is set, it can't be empty.
           - name: image | type: Image | description: Poll image.  To set the image, send its `url`: a Wix Media URL (`static.wixstatic.com`) of an image in the site's Media Manager. `id` is derived from the URL. `height` and `width` aren't populated and are always `0`.
              - name: id | type: string | description: Wix Media image GUID.
              - name: url | type: string | description: Image URL.
              - name: height | type: integer | description: Original image height in pixels.
              - name: width | type: integer | description: Original image width in pixels.
           - name: createdBy | type: IdentificationData | description: Identity of the poll's creator: a site member, a Wix user or a site visitor who isn't logged in. Only the creator can update or delete the poll.
              - ONE-OF:
                 - name: anonymousVisitorId | type: string | description: GUID of a site visitor who isn't logged in.
                 - name: memberId | type: string | description: GUID of a site member.
                 - name: wixUserId | type: string | description: GUID of a Wix user, such as the site owner or a contributor.
                 - name: appId | type: string | description: GUID of an app.
           - name: options | type: array<PollOption> | description: Options that voters can choose from. The order of the array is the order in which options are displayed.  When updating a poll, `options` replaces the full list. Options that aren't included are removed together with their votes. See `PollOption` for details.
              - name: id | type: string | description: Option GUID. Generated when the option is added to the poll. Ignored when creating a poll.  When updating a poll, specify the GUID of an existing option to keep it. An option without an GUID is added as a new option. An GUID that isn't in the poll is treated as a new option, and the option gets a new GUID.  Options that aren't included in the updated `options` array are removed together with their votes.
              - name: text | type: string | description: Option text. Can't be changed after the option receives votes (`POLL_OPTION_HAS_VOTES`).  Optional. An option without text has no `text`, for example an option that only has an image. When the field is set, it can't be empty.
              - name: image | type: Image | description: Option image. Can't be changed after the option receives votes.  To set the image, send its `url`: a Wix Media URL (`static.wixstatic.com`) of an image in the site's Media Manager. `id` is derived from the URL. `height` and `width` aren't populated and are always `0`.
           - name: settings | type: PollSettings | description: Poll settings.
              - name: multipleVotes | type: boolean | description: Whether a voter can vote for more than one option.  Default: `false`
              - name: votingAccess | type: VotingAccess | description: Who can vote.  Default: `PUBLIC`
                   - enum:
                   -     PUBLIC: Anyone can vote: site members, site visitors who aren't logged in, and Wix users. Wix users vote with their own identity.
                   -     MEMBERS: Only site members and Wix users can vote. Site visitors who aren't logged in get the `MEMBERS_ONLY_VOTING` error and must log in as site members to vote.
              - name: resultsVisibility | type: ResultsVisibility | description: Who can see the results. When the caller isn't allowed to see them, `results` is omitted from the response without an error. Whether the caller voted is still returned in `currentVoterOptionIds`.  Default: `PUBLIC`
                   - enum:
                   -     PUBLIC: Everyone can see the results, including site visitors who aren't logged in.
                   -     VOTERS: Only callers who voted, and the poll's creator, can see the results. Wix users who aren't the creator see the results after they vote.
                   -     CREATOR: Only the poll's creator can see the results. Other callers, including other Wix users, don't see them.
              - name: showVoteCounts | type: boolean | description: Whether vote counts are shown in the results. When `false`, counts are omitted and voters are also hidden, but `percentage` is still returned.  Default: `true`
              - name: showVoters | type: boolean | description: Whether the members who voted for each option are shown. Voters are shown only when `showVoteCounts` is also `true`.  Default: `true`
           - name: results | type: PollResults | description: Voting results.  Returned only when `RESULTS` is specified in `fields`, and only when the caller is allowed to see results. See `settings.resultsVisibility`.
              - name: voteCount | type: integer | description: Total number of votes cast for all options. This is the number of votes, not voters: when `settings.multipleVotes` is `true`, a voter who chose several options is counted once per option.  Not returned when `settings.showVoteCounts` is `false`.
              - name: anonymousVoteCount | type: integer | description: Number of votes cast by site visitors who weren't logged in. Included in `voteCount`.  Not returned when `settings.showVoteCounts` is `false`.
              - name: optionResults | type: array<PollOptionResults> | description: Results for each option.
                 - name: optionId | type: string | description: Option GUID.
                 - name: voteCount | type: integer | description: Number of votes for the option.  Not returned when `settings.showVoteCounts` is `false`.
                 - name: anonymousVoteCount | type: integer | description: Number of votes for the option cast by site visitors who weren't logged in. Included in `voteCount`.  Not returned when `settings.showVoteCounts` is `false`.
                 - name: percentage | type: integer | description: Percentage of `results.voteCount` cast for the option, rounded to the nearest integer. Because of rounding, and because a voter can choose several options when `settings.multipleVotes` is `true`, the percentages of all options don't always add up to 100.  Returned even when `settings.showVoteCounts` is `false`, so that relative results can be displayed without counts.
                 - name: latestVoters | type: array<IdentificationData> | description: Identities of up to 5 site members or Wix users who voted for the option most recently. To retrieve all voters, call List Voters. To get member names and photos, call Query Members.  Not returned when `settings.showVoters` or `settings.showVoteCounts` is `false`.
           - name: currentVoterOptionIds | type: array<string> | description: IDs of the options the caller voted for. Empty if the caller didn't vote.  Returned only when `CURRENT_VOTER_VOTES` is specified in `fields`, regardless of `settings.resultsVisibility`.
        - name: optionId | type: string | description: GUID of the option that the vote was removed from.
        - name: voter | type: IdentificationData | description: Identity of the voter: a site member, a Wix user or a site visitor who isn't logged in.

```

---

## JavaScript SDK

### Schema

```
Webhook: onPollVoteRemoved
Description: 
Payload: PollVoteRemovedEnvelope
  - name: data | type: PollVoteRemoved | description: none
     - name: poll | type: Poll | description: Poll with its voting results after the vote was removed. The results include vote counts and voters even when the poll's `settings` hide them from callers.
        - name: _id | type: string | description: Poll GUID.
        - name: revision | type: string | description: Revision number, which increments by 1 each time the poll is updated. To prevent conflicting changes, the existing revision must be specified when updating a poll.  Ignored when creating a poll.
        - name: _createdDate | type: Date | description: Date and time the poll was created.
        - name: _updatedDate | type: Date | description: Date and time the poll was last updated.  Not returned for polls that weren't updated since they were created.
        - name: question | type: string | description: Poll question.  Optional. A poll without a question has no `question`, for example a poll that only has images. When the field is set, it can't be empty.
        - name: image | type: string | description: Poll image.  To set the image, send its `url`: a Wix Media URL (`static.wixstatic.com`) of an image in the site's Media Manager. `id` is derived from the URL. `height` and `width` aren't populated and are always `0`.
        - name: createdBy | type: IdentificationData | description: Identity of the poll's creator: a site member, a Wix user or a site visitor who isn't logged in. Only the creator can update or delete the poll.
           - ONE-OF:
              - name: anonymousVisitorId | type: string | description: GUID of a site visitor who isn't logged in.
              - name: memberId | type: string | description: GUID of a site member.
              - name: wixUserId | type: string | description: GUID of a Wix user, such as the site owner or a contributor.
              - name: appId | type: string | description: GUID of an app.
        - name: options | type: array<PollOption> | description: Options that voters can choose from. The order of the array is the order in which options are displayed.  When updating a poll, `options` replaces the full list. Options that aren't included are removed together with their votes. See `PollOption` for details.
           - name: _id | type: string | description: Option GUID. Generated when the option is added to the poll. Ignored when creating a poll.  When updating a poll, specify the GUID of an existing option to keep it. An option without an GUID is added as a new option. An GUID that isn't in the poll is treated as a new option, and the option gets a new GUID.  Options that aren't included in the updated `options` array are removed together with their votes.
           - name: text | type: string | description: Option text. Can't be changed after the option receives votes (`POLL_OPTION_HAS_VOTES`).  Optional. An option without text has no `text`, for example an option that only has an image. When the field is set, it can't be empty.
           - name: image | type: string | description: Option image. Can't be changed after the option receives votes.  To set the image, send its `url`: a Wix Media URL (`static.wixstatic.com`) of an image in the site's Media Manager. `id` is derived from the URL. `height` and `width` aren't populated and are always `0`.
        - name: settings | type: PollSettings | description: Poll settings.
           - name: multipleVotes | type: boolean | description: Whether a voter can vote for more than one option.  Default: `false`
           - name: votingAccess | type: VotingAccess | description: Who can vote.  Default: `PUBLIC`
                 - enum:
                 -     PUBLIC: Anyone can vote: site members, site visitors who aren't logged in, and Wix users. Wix users vote with their own identity.
                 -     MEMBERS: Only site members and Wix users can vote. Site visitors who aren't logged in get the `MEMBERS_ONLY_VOTING` error and must log in as site members to vote.
           - name: resultsVisibility | type: ResultsVisibility | description: Who can see the results. When the caller isn't allowed to see them, `results` is omitted from the response without an error. Whether the caller voted is still returned in `currentVoterOptionIds`.  Default: `PUBLIC`
                 - enum:
                 -     PUBLIC: Everyone can see the results, including site visitors who aren't logged in.
                 -     VOTERS: Only callers who voted, and the poll's creator, can see the results. Wix users who aren't the creator see the results after they vote.
                 -     CREATOR: Only the poll's creator can see the results. Other callers, including other Wix users, don't see them.
           - name: showVoteCounts | type: boolean | description: Whether vote counts are shown in the results. When `false`, counts are omitted and voters are also hidden, but `percentage` is still returned.  Default: `true`
           - name: showVoters | type: boolean | description: Whether the members who voted for each option are shown. Voters are shown only when `showVoteCounts` is also `true`.  Default: `true`
        - name: results | type: PollResults | description: Voting results.  Returned only when `RESULTS` is specified in `fields`, and only when the caller is allowed to see results. See `settings.resultsVisibility`.
           - name: voteCount | type: integer | description: Total number of votes cast for all options. This is the number of votes, not voters: when `settings.multipleVotes` is `true`, a voter who chose several options is counted once per option.  Not returned when `settings.showVoteCounts` is `false`.
           - name: anonymousVoteCount | type: integer | description: Number of votes cast by site visitors who weren't logged in. Included in `voteCount`.  Not returned when `settings.showVoteCounts` is `false`.
           - name: optionResults | type: array<PollOptionResults> | description: Results for each option.
              - name: optionId | type: string | description: Option GUID.
              - name: voteCount | type: integer | description: Number of votes for the option.  Not returned when `settings.showVoteCounts` is `false`.
              - name: anonymousVoteCount | type: integer | description: Number of votes for the option cast by site visitors who weren't logged in. Included in `voteCount`.  Not returned when `settings.showVoteCounts` is `false`.
              - name: percentage | type: integer | description: Percentage of `results.voteCount` cast for the option, rounded to the nearest integer. Because of rounding, and because a voter can choose several options when `settings.multipleVotes` is `true`, the percentages of all options don't always add up to 100.  Returned even when `settings.showVoteCounts` is `false`, so that relative results can be displayed without counts.
              - name: latestVoters | type: array<IdentificationData> | description: Identities of up to 5 site members or Wix users who voted for the option most recently. To retrieve all voters, call List Voters. To get member names and photos, call Query Members.  Not returned when `settings.showVoters` or `settings.showVoteCounts` is `false`.
        - name: currentVoterOptionIds | type: array<string> | description: IDs of the options the caller voted for. Empty if the caller didn't vote.  Returned only when `CURRENT_VOTER_VOTES` is specified in `fields`, regardless of `settings.resultsVisibility`.
     - name: optionId | type: string | description: GUID of the option that the vote was removed from.
     - name: voter | type: IdentificationData | description: Identity of the voter: a site member, a Wix user or a site visitor who isn't logged in.
  - name: metadata | type: EventMetadata | description: none
     - name: instanceId | type: string | description: App instance GUID.
     - name: eventType | type: string | description: Event type.
     - name: identity | type: IdentificationData | description: The identification type and identity data.
        - ONE-OF:
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site.
           - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site.
           - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.).
           - name: appId | type: string | description: GUID of an app.
        - name: identityType | type: WebhookIdentityType | description: 
             - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP
     - name: accountInfo | type: AccountInfo | description: Details related to the account
        - name: accountId | type: string | description: GUID of the Wix account associated with the event.
        - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account.
        - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site.
     - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them.
     - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
     - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
     - name: entityId | type: string | description: GUID of the entity associated with the event.
     - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`.
     - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).
     - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event.
     - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at `16:00` and then again at `16:01`, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.

```

### Examples


```javascript
import { ricosPolls } from '@wix/rich-content';

ricosPolls.onPollVoteRemoved((event) => {
    // handle your event here
});
```


```javascript
import { createClient, AppStrategy } from '@wix/sdk';
import { ricosPolls } from '@wix/rich-content';

const wixClient = createClient({
  auth: AppStrategy({
    appId: 'MY-APP-ID',
    publicKey: 'YOUR_APP_PUBLIC_KEY',
  }),
  modules: {
      ricosPolls,
    },
});

wixClient.ricosPolls.onPollVoteRemoved((event) => {
    // handle your event here
});
```

---