> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createPoll

> Create a new poll or question in a space

**Required scopes:** `write:posts`, `host:write:network_posts` (any one)



**mutation** `createPoll(input: CreatePollInput!): CreatePollPayload`

## Arguments

**`input`**: `CreatePollInput!` (required)

Parameters for CreatePoll

## Returns

`CreatePollPayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`errors`**: `[String!]!`

---

**`poll`**: `Poll`

## Examples

```graphql Mutation
mutation CreatePoll($input: CreatePollInput!) {
  createPoll(input: $input) {
    clientMutationId
    errors
    poll {
      answerCount
      answerType
      answerers {
        ambassadorLevel
        ambassadorLevelId
        avatarUrl
        badges {
          __typename
        }
        communityRole
        conversations {
          __typename
        }
      }
      answers {
        edges {
          __typename
        }
        nodes {
          __typename
        }
        pageInfo {
          __typename
        }
      }
      assets {
        aspectRatio
        assetStyle
        contentType
        fileSize
        id
        imageUrl
      }
      body
    }
  }
}
```

```json Variables
{
  "input": {
    "pollType": "HOT_COLD",
    "spaceId": "id",
    "title": "string"
  }
}
```

```json Response
{
  "data": {
    "createPoll": {
      "clientMutationId": "string",
      "errors": [
        "string"
      ],
      "poll": {
        "answerCount": 1,
        "answerType": "string",
        "answerers": [
          {
            "ambassadorLevel": "string",
            "ambassadorLevelId": 1,
            "avatarUrl": "string",
            "badges": [
              {
                "__typename": "Badge"
              }
            ],
            "communityRole": "CONTRIBUTOR",
            "conversations": {
              "__typename": "PublicConversationConnection"
            }
          }
        ],
        "answers": {
          "edges": [
            {
              "__typename": "PollAnswerEdge"
            }
          ],
          "nodes": [
            {
              "__typename": "PollAnswer"
            }
          ],
          "pageInfo": {
            "__typename": "PageInfo"
          }
        },
        "assets": [
          {
            "aspectRatio": 1.5,
            "assetStyle": "string",
            "contentType": "string",
            "fileSize": "string",
            "id": "id",
            "imageUrl": "string"
          }
        ],
        "body": "string"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.