# us.off-the-clock.polls.poll

> A question a member asks a content space, with two to ten options that members answer with us.off-the-clock.polls.vote records. Each option is named by a key that stays the same when the poll is edited, so votes follow the option they were cast for. Posts may reply to a poll, so a poll heads a thread.

- Kind: record
- Record key: tid
- Authority: polls.off-the-clock.us
- Lexicon: 1
- Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.polls.poll)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.polls.poll/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.polls.poll/analytics)

## Record (`us.off-the-clock.polls.poll`)

Type: record · key tid

### Properties

- `allowMultiple` (boolean): Voters may choose any set of options; otherwise at most one.
  - Constraints: default: false
- `closesAt` (string · datetime): Votes cast after this do not count. After opensAt when both are given.
- `createdAt` (string · datetime, required)
- `labels` (union): The author's own labels: a content warning (D101).
  - One of: `com.atproto.label.defs#selfLabels`
- `opensAt` (string · datetime): Votes cast before this do not count.
- `options` (array, required): In the order shown. Keys are unique within the poll.
  - Constraints: minLength: 2, maxLength: 10
  - `items` (ref)
    - Reference: `#option`
- `prompt` (string, required)
  - Constraints: minLength: 1, maxLength: 3000, minGraphemes: 1, maxGraphemes: 300

## #option (`us.off-the-clock.polls.poll#option`)

Type: object

### Properties

- `allowInput` (boolean): A voter choosing this option may type an answer beside it.
  - Constraints: default: false
- `key` (string, required): Stable across edits and never reused within the poll; a vote names it.
  - Constraints: minLength: 1, maxLength: 64
- `text` (string, required)
  - Constraints: minLength: 1, maxLength: 800, minGraphemes: 1, maxGraphemes: 80

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A question a member asks a content space, with two to ten options that members answer with us.off-the-clock.polls.vote records. Each option is named by a key that stays the same when the poll is edited, so votes follow the option they were cast for. Posts may reply to a poll, so a poll heads a thread.",
      "key": "tid",
      "record": {
        "properties": {
          "allowMultiple": {
            "default": false,
            "description": "Voters may choose any set of options; otherwise at most one.",
            "type": "boolean"
          },
          "closesAt": {
            "description": "Votes cast after this do not count. After opensAt when both are given.",
            "format": "datetime",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "labels": {
            "description": "The author's own labels: a content warning (D101).",
            "refs": [
              "com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "opensAt": {
            "description": "Votes cast before this do not count.",
            "format": "datetime",
            "type": "string"
          },
          "options": {
            "description": "In the order shown. Keys are unique within the poll.",
            "items": {
              "ref": "#option",
              "type": "ref"
            },
            "maxLength": 10,
            "minLength": 2,
            "type": "array"
          },
          "prompt": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "minGraphemes": 1,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "prompt",
          "options",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "option": {
      "properties": {
        "allowInput": {
          "default": false,
          "description": "A voter choosing this option may type an answer beside it.",
          "type": "boolean"
        },
        "key": {
          "description": "Stable across edits and never reused within the poll; a vote names it.",
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        },
        "text": {
          "maxGraphemes": 80,
          "maxLength": 800,
          "minGraphemes": 1,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "text",
        "key"
      ],
      "type": "object"
    }
  },
  "id": "us.off-the-clock.polls.poll",
  "lexicon": 1
}
```
