curl --request POST \
--url https://test.polltheroom.com/api/v1/rooms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deckId": "cmtwzaz21009juqmfmvygdi2b",
"label": "Amsterdam office, Tuesday"
}
'import requests
url = "https://test.polltheroom.com/api/v1/rooms"
payload = {
"deckId": "cmtwzaz21009juqmfmvygdi2b",
"label": "Amsterdam office, Tuesday"
}
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({deckId: 'cmtwzaz21009juqmfmvygdi2b', label: 'Amsterdam office, Tuesday'})
};
fetch('https://test.polltheroom.com/api/v1/rooms', 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",
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([
'deckId' => 'cmtwzaz21009juqmfmvygdi2b',
'label' => 'Amsterdam office, Tuesday'
]),
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"
payload := strings.NewReader("{\n \"deckId\": \"cmtwzaz21009juqmfmvygdi2b\",\n \"label\": \"Amsterdam office, Tuesday\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deckId\": \"cmtwzaz21009juqmfmvygdi2b\",\n \"label\": \"Amsterdam office, Tuesday\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.polltheroom.com/api/v1/rooms")
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 \"deckId\": \"cmtwzaz21009juqmfmvygdi2b\",\n \"label\": \"Amsterdam office, Tuesday\"\n}"
response = http.request(request)
puts response.read_body{
"code": "487308",
"hostToken": "05a3e3f5-4350-4603-aff1-151047439a99",
"joinUrl": "https://test.polltheroom.com/j/487308",
"presentUrl": "https://test.polltheroom.com/present/487308#host=05a3e3f5-4350-4603-aff1-151047439a99"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}Start a room
Open a room for a deck: a six-digit code the audience joins with, and a presenter link that carries the host’s key. The room waits in the lobby until the presenter (or room_action with start) begins. A deck with slide pages starts here too: the server draws every page of its PDF first, the way the editor does, which adds a few seconds.
Needs the rooms:start scope.
curl --request POST \
--url https://test.polltheroom.com/api/v1/rooms \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deckId": "cmtwzaz21009juqmfmvygdi2b",
"label": "Amsterdam office, Tuesday"
}
'import requests
url = "https://test.polltheroom.com/api/v1/rooms"
payload = {
"deckId": "cmtwzaz21009juqmfmvygdi2b",
"label": "Amsterdam office, Tuesday"
}
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({deckId: 'cmtwzaz21009juqmfmvygdi2b', label: 'Amsterdam office, Tuesday'})
};
fetch('https://test.polltheroom.com/api/v1/rooms', 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",
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([
'deckId' => 'cmtwzaz21009juqmfmvygdi2b',
'label' => 'Amsterdam office, Tuesday'
]),
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"
payload := strings.NewReader("{\n \"deckId\": \"cmtwzaz21009juqmfmvygdi2b\",\n \"label\": \"Amsterdam office, Tuesday\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deckId\": \"cmtwzaz21009juqmfmvygdi2b\",\n \"label\": \"Amsterdam office, Tuesday\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.polltheroom.com/api/v1/rooms")
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 \"deckId\": \"cmtwzaz21009juqmfmvygdi2b\",\n \"label\": \"Amsterdam office, Tuesday\"\n}"
response = http.request(request)
puts response.read_body{
"code": "487308",
"hostToken": "05a3e3f5-4350-4603-aff1-151047439a99",
"joinUrl": "https://test.polltheroom.com/j/487308",
"presentUrl": "https://test.polltheroom.com/present/487308#host=05a3e3f5-4350-4603-aff1-151047439a99"
}{
"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.
Body
The deck's id
1A name for this session, such as "Class 3B, Tuesday", so a deck used for several classes lists them apart
1 - 80People type their own name to join instead of getting a nickname, for marks and attendance. A name already in the room is refused, so every answer belongs to one person
Quiz questions score and the room keeps standings. True unless you pass false, which still reveals every right answer but pays nobody
A faster right answer is worth more, 1000 points down to 500 at the buzzer. True unless you pass false, which makes every right answer worth the same