Embed
Update embedded template (not available)
A builder token reads a template. Edit with PUT /api/templates/, which keeps version history.
PUT
/
api
/
embed
/
template
/
{id}
Update embedded template (not available)
curl --request PUT \
--url https://spitshake.io/api/embed/template/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"submitter_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"readonly": true,
"key": "<string>",
"default_value": "<string>",
"placeholder": "<string>",
"pattern": "<string>",
"options": [
"<string>"
],
"formula": "<string>",
"areas": [
{
"x": 23.07,
"y": 20.35,
"w": 25,
"h": 5,
"page": 1,
"attachment_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"preferences": {}
}
],
"submitters": [
{}
]
}
'import requests
url = "https://spitshake.io/api/embed/template/{id}"
payload = {
"schema": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"submitter_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": True,
"readonly": True,
"key": "<string>",
"default_value": "<string>",
"placeholder": "<string>",
"pattern": "<string>",
"options": ["<string>"],
"formula": "<string>",
"areas": [
{
"x": 23.07,
"y": 20.35,
"w": 25,
"h": 5,
"page": 1,
"attachment_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"preferences": {}
}
],
"submitters": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schema: [
{
uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
submitter_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
required: true,
readonly: true,
key: '<string>',
default_value: '<string>',
placeholder: '<string>',
pattern: '<string>',
options: ['<string>'],
formula: '<string>',
areas: [
{
x: 23.07,
y: 20.35,
w: 25,
h: 5,
page: 1,
attachment_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
preferences: {}
}
],
submitters: [{}]
})
};
fetch('https://spitshake.io/api/embed/template/{id}', 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://spitshake.io/api/embed/template/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'schema' => [
[
'uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'submitter_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'required' => true,
'readonly' => true,
'key' => '<string>',
'default_value' => '<string>',
'placeholder' => '<string>',
'pattern' => '<string>',
'options' => [
'<string>'
],
'formula' => '<string>',
'areas' => [
[
'x' => 23.07,
'y' => 20.35,
'w' => 25,
'h' => 5,
'page' => 1,
'attachment_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'preferences' => [
]
]
],
'submitters' => [
[
]
]
]),
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://spitshake.io/api/embed/template/{id}"
payload := strings.NewReader("{\n \"schema\": [\n {\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"submitter_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": true,\n \"readonly\": true,\n \"key\": \"<string>\",\n \"default_value\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"pattern\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"formula\": \"<string>\",\n \"areas\": [\n {\n \"x\": 23.07,\n \"y\": 20.35,\n \"w\": 25,\n \"h\": 5,\n \"page\": 1,\n \"attachment_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"preferences\": {}\n }\n ],\n \"submitters\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://spitshake.io/api/embed/template/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema\": [\n {\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"submitter_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": true,\n \"readonly\": true,\n \"key\": \"<string>\",\n \"default_value\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"pattern\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"formula\": \"<string>\",\n \"areas\": [\n {\n \"x\": 23.07,\n \"y\": 20.35,\n \"w\": 25,\n \"h\": 5,\n \"page\": 1,\n \"attachment_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"preferences\": {}\n }\n ],\n \"submitters\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/embed/template/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema\": [\n {\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"submitter_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": true,\n \"readonly\": true,\n \"key\": \"<string>\",\n \"default_value\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"pattern\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"formula\": \"<string>\",\n \"areas\": [\n {\n \"x\": 23.07,\n \"y\": 20.35,\n \"w\": 25,\n \"h\": 5,\n \"page\": 1,\n \"attachment_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"preferences\": {}\n }\n ],\n \"submitters\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"code": "update_via_templates_api"
}Authorizations
JWT token for Embed API endpoints
Path Parameters
⌘I
Update embedded template (not available)
curl --request PUT \
--url https://spitshake.io/api/embed/template/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schema": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"submitter_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": true,
"readonly": true,
"key": "<string>",
"default_value": "<string>",
"placeholder": "<string>",
"pattern": "<string>",
"options": [
"<string>"
],
"formula": "<string>",
"areas": [
{
"x": 23.07,
"y": 20.35,
"w": 25,
"h": 5,
"page": 1,
"attachment_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"preferences": {}
}
],
"submitters": [
{}
]
}
'import requests
url = "https://spitshake.io/api/embed/template/{id}"
payload = {
"schema": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"submitter_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": True,
"readonly": True,
"key": "<string>",
"default_value": "<string>",
"placeholder": "<string>",
"pattern": "<string>",
"options": ["<string>"],
"formula": "<string>",
"areas": [
{
"x": 23.07,
"y": 20.35,
"w": 25,
"h": 5,
"page": 1,
"attachment_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"preferences": {}
}
],
"submitters": [{}]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
schema: [
{
uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
submitter_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
required: true,
readonly: true,
key: '<string>',
default_value: '<string>',
placeholder: '<string>',
pattern: '<string>',
options: ['<string>'],
formula: '<string>',
areas: [
{
x: 23.07,
y: 20.35,
w: 25,
h: 5,
page: 1,
attachment_uuid: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
preferences: {}
}
],
submitters: [{}]
})
};
fetch('https://spitshake.io/api/embed/template/{id}', 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://spitshake.io/api/embed/template/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'schema' => [
[
'uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'submitter_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'required' => true,
'readonly' => true,
'key' => '<string>',
'default_value' => '<string>',
'placeholder' => '<string>',
'pattern' => '<string>',
'options' => [
'<string>'
],
'formula' => '<string>',
'areas' => [
[
'x' => 23.07,
'y' => 20.35,
'w' => 25,
'h' => 5,
'page' => 1,
'attachment_uuid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'preferences' => [
]
]
],
'submitters' => [
[
]
]
]),
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://spitshake.io/api/embed/template/{id}"
payload := strings.NewReader("{\n \"schema\": [\n {\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"submitter_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": true,\n \"readonly\": true,\n \"key\": \"<string>\",\n \"default_value\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"pattern\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"formula\": \"<string>\",\n \"areas\": [\n {\n \"x\": 23.07,\n \"y\": 20.35,\n \"w\": 25,\n \"h\": 5,\n \"page\": 1,\n \"attachment_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"preferences\": {}\n }\n ],\n \"submitters\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://spitshake.io/api/embed/template/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schema\": [\n {\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"submitter_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": true,\n \"readonly\": true,\n \"key\": \"<string>\",\n \"default_value\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"pattern\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"formula\": \"<string>\",\n \"areas\": [\n {\n \"x\": 23.07,\n \"y\": 20.35,\n \"w\": 25,\n \"h\": 5,\n \"page\": 1,\n \"attachment_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"preferences\": {}\n }\n ],\n \"submitters\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/embed/template/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"schema\": [\n {\n \"uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"submitter_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": true,\n \"readonly\": true,\n \"key\": \"<string>\",\n \"default_value\": \"<string>\",\n \"placeholder\": \"<string>\",\n \"pattern\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"formula\": \"<string>\",\n \"areas\": [\n {\n \"x\": 23.07,\n \"y\": 20.35,\n \"w\": 25,\n \"h\": 5,\n \"page\": 1,\n \"attachment_uuid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"preferences\": {}\n }\n ],\n \"submitters\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"code": "update_via_templates_api"
}
