Drive a room
curl --request POST \
--url https://test.polltheroom.com/api/v1/rooms/{code}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "next"
}
'import requests
url = "https://test.polltheroom.com/api/v1/rooms/{code}/actions"
payload = { "action": "next" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'next'})
};
fetch('https://test.polltheroom.com/api/v1/rooms/{code}/actions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.polltheroom.com/api/v1/rooms/{code}/actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'next'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.polltheroom.com/api/v1/rooms/{code}/actions"
payload := strings.NewReader("{\n \"action\": \"next\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://test.polltheroom.com/api/v1/rooms/{code}/actions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"next\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.polltheroom.com/api/v1/rooms/{code}/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"next\"\n}"
response = http.request(request)
puts response.read_body{
"status": "presenting",
"stepIndex": 1,
"stepCount": 4
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}rooms
Drive a room
What the presenter’s buttons do: start the session, walk to the next or previous step, close the live poll and reveal, or stop the session; spin the wheel on screen, show or hide the join code in the corner of the audience screen (chip), switch live reactions on or off, or put the quiz standings over whatever is on screen and take them away again (standings).
Needs the rooms:start scope.
POST
/
api
/
v1
/
rooms
/
{code}
/
actions
Drive a room
curl --request POST \
--url https://test.polltheroom.com/api/v1/rooms/{code}/actions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "next"
}
'import requests
url = "https://test.polltheroom.com/api/v1/rooms/{code}/actions"
payload = { "action": "next" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'next'})
};
fetch('https://test.polltheroom.com/api/v1/rooms/{code}/actions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://test.polltheroom.com/api/v1/rooms/{code}/actions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'next'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://test.polltheroom.com/api/v1/rooms/{code}/actions"
payload := strings.NewReader("{\n \"action\": \"next\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://test.polltheroom.com/api/v1/rooms/{code}/actions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"next\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.polltheroom.com/api/v1/rooms/{code}/actions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"next\"\n}"
response = http.request(request)
puts response.read_body{
"status": "presenting",
"stepIndex": 1,
"stepCount": 4
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}Authorizations
An API key from Settings › API, sent as Authorization: Bearer ptr_…. Shown once when made; only a hash is stored.
Path Parameters
The room's six-digit code
Pattern:
^\d{6}$Body
application/json
start, next, prev, close, stop, spin, chip, reactions or standings
Available options:
start, next, prev, close, stop, spin, chip, reactions, standings