# app.protoimsg.chat.vote

> Published by [lexicons.protoimsg.app](https://lexicon.garden/identity/did:plc:xk3xpcauatfephlieonmluh4)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.vote)
- [Documentation](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.vote/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:xk3xpcauatfephlieonmluh4/app.protoimsg.chat.vote/examples)

## Definitions

### `app.protoimsg.chat.vote`

**Type**: `record`

A vote on a poll. Lives in the voter's repo.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `poll` | `string` (at-uri) | Yes | AT-URI of the poll being voted on. |
| `createdAt` | `string` (datetime) | Yes | Timestamp of vote. |
| `selectedOptions` | `array` | Yes | Indices of selected options (0-based). |

## Raw Schema

```json
{
  "id": "app.protoimsg.chat.vote",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "poll",
          "selectedOptions",
          "createdAt"
        ],
        "properties": {
          "poll": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of the poll being voted on."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp of vote."
          },
          "selectedOptions": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "maxLength": 10,
            "description": "Indices of selected options (0-based)."
          }
        }
      },
      "description": "A vote on a poll. Lives in the voter's repo."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
