> 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

# CreatePoll

# Package: richContent

# Namespace: RicosPolls

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

## Permission Scopes:
Manage Ricos Polls: SCOPE.DC-RICOS.MANAGE-POLLS

## Introduction

Creates a poll.

The caller becomes the poll's creator. A poll must have at least one option. Option IDs are ignored and generated.

Creating a poll doesn't display it on the site. To display the poll, add a poll node with the returned `poll.id` in `pollData.poll.id` to the rich content, such as a blog post, and publish the content. See the Rich Content documentation.

Site visitors, site members and Wix users can call this method.

---

## REST API

### Schema

```
 Method: createPoll
 Description: Creates a poll.  The caller becomes the poll's creator. A poll must have at least one option. Option GUIDs are ignored and generated.  Creating a poll doesn't display it on the site. To display the poll, add a poll node with the returned `poll.id` in `pollData.poll.id` to the rich content, such as a blog post, and publish the content. See the Rich Content documentation.  Site visitors, site members and Wix users can call this method.
 URL: https://www.wixapis.com/ricos/v1/polls
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  poll, poll.options
 Method parameters: 
   param name: poll | type: Poll | description: A poll is a question with a set of options that site visitors, site members and Wix users can vote on. Polls are embedded in Ricos, Wix's rich content format used by Wix Blog, Wix Forum, Wix Comments and other apps. A poll node in the rich content references the poll by its GUID, in `pollData.poll.id`.  A poll is displayed on the site only when the rich content that contains it includes a poll node with the poll's GUID. Deleting the content doesn't delete its polls, and deleting a poll doesn't remove its node from the content. | required: true 
        - 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.  | validation: minLength 1, maxLength 500
        - 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.  | validation: maxLength 100
           - name: url | type: string | description: Image URL.  | validation: format WEB_URL
        - 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. | required: true | validation: minItems 1, maxItems 50
           - 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.  | validation: format GUID
           - 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.  | validation: minLength 1, maxLength 500
           - 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`  
 Return type: CreatePollResponse
  - name: poll | type: Poll | description: Created poll.  
     - name: id | type: string | description: Poll GUID.  | read-only: true | validation: format 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.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the poll was created.  | read-only: true | validation: format date-time
     - 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.  | read-only: true | validation: format date-time
     - 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.  | validation: minLength 1, maxLength 500
     - 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.  | validation: maxLength 100
        - name: url | type: string | description: Image URL.  | validation: format WEB_URL
        - name: height | type: integer | description: Original image height in pixels.  | read-only: true 
        - name: width | type: integer | description: Original image width in pixels.  | read-only: true 
     - 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.  | read-only: true 
        - ONE-OF: 
           - name: anonymousVisitorId | type: string | description: GUID of a site visitor who isn't logged in.  | validation: format GUID
           - name: memberId | type: string | description: GUID of a site member.  | validation: format GUID
           - name: wixUserId | type: string | description: GUID of a Wix user, such as the site owner or a contributor.  | validation: format GUID
           - name: appId | type: string | description: GUID of an app.  | validation: format GUID
     - 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.  | validation: minItems 1, maxItems 50
        - 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.  | validation: format GUID
        - 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.  | validation: minLength 1, maxLength 500
        - 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`.  | read-only: true 
        - 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`.  | validation: minimum 0, format int32
        - 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`.  | validation: minimum 0, format int32
        - name: optionResults | type: array<PollOptionResults> | description: Results for each option.  | validation: maxItems 50
           - name: optionId | type: string | description: Option GUID.  | validation: format GUID
           - name: voteCount | type: integer | description: Number of votes for the option.  Not returned when `settings.showVoteCounts` is `false`.  | validation: minimum 0, format int32
           - 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`.  | validation: minimum 0, format int32
           - 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.  | validation: minimum 0, maximum 100, format int32
           - 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`.  | validation: maxItems 5
     - 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`.  | read-only: true | validation: maxItems 50, format GUID


```

### Examples

### Create Poll
Creates a poll with two options. Anyone can vote, and each voter can vote for one option.

```curl
curl -X POST \
  'https://www.wixapis.com/ricos/v1/polls' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  --data-binary '{
    "poll": {
      "question": "Which topic should we cover next?",
      "options": [
        { "text": "Performance tuning" },
        { "text": "Accessibility" }
      ],
      "settings": {
        "multipleVotes": false,
        "votingAccess": "PUBLIC",
        "resultsVisibility": "VOTERS",
        "showVoteCounts": true,
        "showVoters": true
      }
    }
  }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.richContent.ricosPolls.createPoll(poll)
 Description: Creates a poll.  The caller becomes the poll's creator. A poll must have at least one option. Option GUIDs are ignored and generated.  Creating a poll doesn't display it on the site. To display the poll, add a poll node with the returned `poll.id` in `pollData.poll.id` to the rich content, such as a blog post, and publish the content. See the Rich Content documentation.  Site visitors, site members and Wix users can call this method.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  poll, poll.options
 Method parameters: 
   param name: poll | type: Poll | description: A poll is a question with a set of options that site visitors, site members and Wix users can vote on. Polls are embedded in Ricos, Wix's rich content format used by Wix Blog, Wix Forum, Wix Comments and other apps. A poll node in the rich content references the poll by its GUID, in `pollData.poll.id`.  A poll is displayed on the site only when the rich content that contains it includes a poll node with the poll's GUID. Deleting the content doesn't delete its polls, and deleting a poll doesn't remove its node from the content. | required: true 
        - 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.  | validation: minLength 1, maxLength 500
        - 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: 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. | required: true | validation: minItems 1, maxItems 50
           - 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.  | validation: format GUID
           - 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.  | validation: minLength 1, maxLength 500
           - 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`  
 Return type: PROMISE<Poll>
  - name: _id | type: string | description: Poll GUID.  | read-only: true | validation: format 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.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the poll was created.  | read-only: true 
  - 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.  | read-only: true 
  - 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.  | validation: minLength 1, maxLength 500
  - 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.  | read-only: true 
     - ONE-OF: 
        - name: anonymousVisitorId | type: string | description: GUID of a site visitor who isn't logged in.  | validation: format GUID
        - name: memberId | type: string | description: GUID of a site member.  | validation: format GUID
        - name: wixUserId | type: string | description: GUID of a Wix user, such as the site owner or a contributor.  | validation: format GUID
        - name: appId | type: string | description: GUID of an app.  | validation: format GUID
  - 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.  | validation: minItems 1, maxItems 50
     - 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.  | validation: format GUID
     - 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.  | validation: minLength 1, maxLength 500
     - 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`.  | read-only: true 
     - 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`.  | validation: minimum 0, format int32
     - 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`.  | validation: minimum 0, format int32
     - name: optionResults | type: array<PollOptionResults> | description: Results for each option.  | validation: maxItems 50
        - name: optionId | type: string | description: Option GUID.  | validation: format GUID
        - name: voteCount | type: integer | description: Number of votes for the option.  Not returned when `settings.showVoteCounts` is `false`.  | validation: minimum 0, format int32
        - 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`.  | validation: minimum 0, format int32
        - 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.  | validation: minimum 0, maximum 100, format int32
        - 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`.  | validation: maxItems 5
  - 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`.  | read-only: true | validation: maxItems 50, format GUID


```

### Examples

### Create a poll
Creates a poll with two options. Anyone can vote, and each voter can vote for one option.

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

async function createPoll() {
  const response = await ricosPolls.createPoll({
    question: "Which topic should we cover next?",
    options: [{ text: "Performance tuning" }, { text: "Accessibility" }],
    settings: {
      multipleVotes: false,
      votingAccess: "PUBLIC",
      resultsVisibility: "VOTERS",
      showVoteCounts: true,
      showVoters: true,
    },
  });
}

```

### createPoll (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { ricosPolls } from '@wix/rich-content';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { ricosPolls },
  // Include the auth strategy and host as relevant
});


async function createPoll(poll) {
  const response = await myWixClient.ricosPolls.createPoll(poll);
};
```

---