curl --request POST \
--url https://test.polltheroom.com/api/v1/decks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Untitled deck",
"document": [
{
"kind": "join",
"id": "<string>"
}
]
}
'import requests
url = "https://test.polltheroom.com/api/v1/decks"
payload = {
"title": "Untitled deck",
"document": [
{
"kind": "join",
"id": "<string>"
}
]
}
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({title: 'Untitled deck', document: [{kind: 'join', id: '<string>'}]})
};
fetch('https://test.polltheroom.com/api/v1/decks', 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/decks",
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([
'title' => 'Untitled deck',
'document' => [
[
'kind' => 'join',
'id' => '<string>'
]
]
]),
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/decks"
payload := strings.NewReader("{\n \"title\": \"Untitled deck\",\n \"document\": [\n {\n \"kind\": \"join\",\n \"id\": \"<string>\"\n }\n ]\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/decks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Untitled deck\",\n \"document\": [\n {\n \"kind\": \"join\",\n \"id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.polltheroom.com/api/v1/decks")
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 \"title\": \"Untitled deck\",\n \"document\": [\n {\n \"kind\": \"join\",\n \"id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"ready": true,
"problems": [
{
"step": 0,
"path": "<string>",
"message": "<string>",
"overlay": 0
}
],
"warnings": [
{
"element": "<string>",
"message": "<string>",
"step": 0,
"with": "<string>"
}
],
"revision": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}{
"error": "<string>",
"fix": "<string>"
}Create a deck
This is the verb an agent starts from. Send a whole document, or nothing for a blank deck that opens with the join screen and one empty slide. A deck can be saved half-finished; presenting needs every poll to pass the readiness check.
Needs the decks:write scope.
curl --request POST \
--url https://test.polltheroom.com/api/v1/decks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Untitled deck",
"document": [
{
"kind": "join",
"id": "<string>"
}
]
}
'import requests
url = "https://test.polltheroom.com/api/v1/decks"
payload = {
"title": "Untitled deck",
"document": [
{
"kind": "join",
"id": "<string>"
}
]
}
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({title: 'Untitled deck', document: [{kind: 'join', id: '<string>'}]})
};
fetch('https://test.polltheroom.com/api/v1/decks', 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/decks",
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([
'title' => 'Untitled deck',
'document' => [
[
'kind' => 'join',
'id' => '<string>'
]
]
]),
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/decks"
payload := strings.NewReader("{\n \"title\": \"Untitled deck\",\n \"document\": [\n {\n \"kind\": \"join\",\n \"id\": \"<string>\"\n }\n ]\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/decks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Untitled deck\",\n \"document\": [\n {\n \"kind\": \"join\",\n \"id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test.polltheroom.com/api/v1/decks")
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 \"title\": \"Untitled deck\",\n \"document\": [\n {\n \"kind\": \"join\",\n \"id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"ready": true,
"problems": [
{
"step": 0,
"path": "<string>",
"message": "<string>",
"overlay": 0
}
],
"warnings": [
{
"element": "<string>",
"message": "<string>",
"step": 0,
"with": "<string>"
}
],
"revision": "<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
Response
OK
Where a person opens it in the editor
Every poll passes the readiness check, so a room can start
What stops it, by step; empty when ready
Show child attributes
Show child attributes
Placements that will not read well on stage, by step: a card smaller than a fifth of the slide either way, or a card or text box over another card or text box. They do not stop a room; fix them anyway
Show child attributes
Show child attributes
The deck's revision after this write; send it as revision with the next write to be sure nobody changed the deck in between