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

# Quickstart

> From a test key to a fan's vote and its result, in four calls.

Four calls, about five minutes. Every call is also in the [API reference](https://developer.dizplai.com/experiences/overview.md), where you can send it from the playground.

**1. Get your test keys**

Your Dizplai contact sends a test publishable key and a test fan token. Test keys only see a test organisation's experiences, so nothing you do reaches a live show. In the playground, put the key in `x-api-key` and the fan token in `Authorization`.

```bash theme={null}
export DIZPLAI_KEY=...
export FAN_TOKEN=...
```

**2. List live experiences**

```bash theme={null}
curl https://api.dizplai.com/v1/experiences \
  -H "x-api-key: $DIZPLAI_KEY"
```

Lists return live experiences unless you ask for other statuses.

**3. Get one experience with its widgets**

```bash theme={null}
curl https://api.dizplai.com/v1/experiences/exp_01JBX7Q2T8M4K9R6V3N5P0WZCD \
  -H "x-api-key: $DIZPLAI_KEY"
```

`items` holds every widget in display order. Pick a live poll, and note its `id` and one option's `id`.

**4. Cast a vote**

```bash theme={null}
curl -X POST https://api.dizplai.com/v1/polls/pol_01JBX7Q3A1B2C3D4E5F6G7H8J9/votes \
  -H "x-api-key: $DIZPLAI_KEY" \
  -H "Authorization: Bearer $FAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"option_id": "opt_01M7WQND9RKTH6WF72R2VFKZ1S"}'
```

`202 Accepted`: the vote is queued, and counts once for this fan.

**5. Fetch the results**

```bash theme={null}
curl https://api.dizplai.com/v1/polls/pol_01JBX7Q3A1B2C3D4E5F6G7H8J9 \
  -H "x-api-key: $DIZPLAI_KEY"
```

Each option carries `votes` and `percent`, and `total_votes` counts the fans who voted. Your vote shows within a second, if the poll's `results_visibility` lets fans see results now. See [Live updates](/live-updates.md).

Next: draw the widgets in your app with the [rendering guide](https://developer.dizplai.com/experiences/rendering.md).


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