# garden.lexicon.nourishing-earthworm.questionSurvey

> A single multiple choice question. The rkey is 12 random base32 characters, never a TID: the survey URL is unlisted and must not be guessable.

- Kind: record
- Record key: any
- Authority: nourishing-earthworm.lexicon.garden
- Lexicon: 1
- Published by [tyler.fun](https://lexicon.garden/identity/did:plc:4gt3dbmp4pydjiemob4konzm), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4gt3dbmp4pydjiemob4konzm/garden.lexicon.nourishing-earthworm.questionSurvey)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4gt3dbmp4pydjiemob4konzm/garden.lexicon.nourishing-earthworm.questionSurvey/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4gt3dbmp4pydjiemob4konzm/garden.lexicon.nourishing-earthworm.questionSurvey/analytics)

## Record (`garden.lexicon.nourishing-earthworm.questionSurvey`)

Type: record · key any

### Properties

- `allowOther` (boolean, required): Offer an "other" answer with free text.
- `closedAt` (string · datetime): Closed by the author by hand. Absent means not closed by hand.
- `closesAt` (string · datetime): Close at this time.
- `createdAt` (string · datetime, required)
- `maxResponses` (integer): Close after this many responses.
  - Constraints: minimum: 1
- `options` (array, required)
  - Constraints: minLength: 2, maxLength: 10
  - `items` (ref)
    - Reference: `#option`
- `question` (string, required)
  - Constraints: maxLength: 3000, maxGraphemes: 300
- `resultsVisibility` (string, required): `author`: only the author sees results. `respondents`: respondents see the tally after answering, and visitors may view results without answering (recorded as a questionView).
  - Constraints: knownValues: author | respondents
- `updatedAt` (string · datetime)

## #option (`garden.lexicon.nourishing-earthworm.questionSurvey#option`)

Type: object

### Properties

- `id` (string, required): Stable within the survey; responses refer to it. `other` is reserved.
  - Constraints: minLength: 1, maxLength: 16
- `text` (string, required)
  - Constraints: maxLength: 1000, maxGraphemes: 100

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A single multiple choice question. The rkey is 12 random base32 characters, never a TID: the survey URL is unlisted and must not be guessable.",
      "key": "any",
      "record": {
        "properties": {
          "allowOther": {
            "description": "Offer an \"other\" answer with free text.",
            "type": "boolean"
          },
          "closedAt": {
            "description": "Closed by the author by hand. Absent means not closed by hand.",
            "format": "datetime",
            "type": "string"
          },
          "closesAt": {
            "description": "Close at this time.",
            "format": "datetime",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "maxResponses": {
            "description": "Close after this many responses.",
            "minimum": 1,
            "type": "integer"
          },
          "options": {
            "items": {
              "ref": "#option",
              "type": "ref"
            },
            "maxLength": 10,
            "minLength": 2,
            "type": "array"
          },
          "question": {
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "resultsVisibility": {
            "description": "`author`: only the author sees results. `respondents`: respondents see the tally after answering, and visitors may view results without answering (recorded as a questionView).",
            "knownValues": [
              "author",
              "respondents"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "question",
          "options",
          "allowOther",
          "resultsVisibility",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "option": {
      "properties": {
        "id": {
          "description": "Stable within the survey; responses refer to it. `other` is reserved.",
          "maxLength": 16,
          "minLength": 1,
          "type": "string"
        },
        "text": {
          "maxGraphemes": 100,
          "maxLength": 1000,
          "type": "string"
        }
      },
      "required": [
        "id",
        "text"
      ],
      "type": "object"
    }
  },
  "id": "garden.lexicon.nourishing-earthworm.questionSurvey",
  "lexicon": 1
}
```
