# Build a two-cue rehearsal

> Create an event, populate its rundown with two timed cues, then load it into a new rehearsal room with the runofsho REST API.

- Canonical: https://runofsho.com/developers/rundowns/
- Last updated: 2026-11-22
- Publisher: runofsho

## Before you create anything

Use a rehearsal team with capacity for a new room and a team-wide `manage` key. Set `API` and `RUNOFSHO_KEY` as in the [quickstart](https://runofsho.com/developers/quickstart/), using the manage key instead of the read key. These requests create persistent resources; running the script again creates another rehearsal.

## Create the plan and load it into a room

Run the following as a Bash script with cURL and `jq`. It stops on the first failed request. Keep the printed IDs if you need to resume partway through.

```bash
set -euo pipefail
: "${API:?Set API to https://api.runofsho.com/v1}" "${RUNOFSHO_KEY:?Set a manage key}"
post() {
  curl -sS --fail-with-body "$API/$1" \
    -H "Authorization: Bearer $RUNOFSHO_KEY" \
    -H 'Content-Type: application/json' --data "$2"
}
EVENT=$(post events '{"name":"Technical rehearsal"}' | jq -er '.data.id')
echo "Event: $EVENT"
RD=$(post "events/$EVENT/rundowns" '{"name":"Main stage"}' | jq -er '.data.id')
echo "Rundown: $RD"
post "rundowns/$RD/items" '{"name":"Welcome","duration":"90s"}' | jq -e '.data.id'
post "rundowns/$RD/items" '{"name":"Keynote","duration":"20m"}' | jq -e '.data.id'
ROOM=$(post rooms "$(jq -n --arg rd "$RD" \
  '{name:"Rehearsal stage",active_rundown_id:$rd}')" | jq -er '.data.id')
echo "Room: $ROOM"
```

## Verify the handoff

Read `GET /v1/rundowns/{rundownId}/items` to check that Welcome precedes Keynote. Then use `GET /v1/rooms/{roomId}/state` and compare `data.room.active_rundown_id` with the printed rundown ID. The script does not send a playback start command.

Use the room ID, not the event or rundown ID, for the [playback example](https://runofsho.com/developers/playback/). If you are importing from a scheduling system, assign an `external_id` to each item so your integration can identify a cue even after someone changes its position.

## Endpoint reference

- [Create an event](https://api.runofsho.com/docs/#tag/events/POST/v1/events): `POST /v1/events` (`createEvent`).
- [Create a rundown](https://api.runofsho.com/docs/#tag/rundowns/POST/v1/events/{eventId}/rundowns): `POST /v1/events/{eventId}/rundowns` (`createRundown`).
- [Add an item](https://api.runofsho.com/docs/#tag/items/POST/v1/rundowns/{rundownId}/items): `POST /v1/rundowns/{rundownId}/items` (`createItem`).
- [List a rundown's items in order](https://api.runofsho.com/docs/#tag/items/GET/v1/rundowns/{rundownId}/items): `GET /v1/rundowns/{rundownId}/items` (`listItems`).
- [Create a room](https://api.runofsho.com/docs/#tag/rooms/POST/v1/rooms): `POST /v1/rooms` (`createRoom`).
- [Get everything a display needs](https://api.runofsho.com/docs/#tag/state/GET/v1/rooms/{roomId}/state): `GET /v1/rooms/{roomId}/state` (`getRoomState`).
