Update brand
Admin only. Renames the brand and/or replaces its branding. branding, when sent,
REPLACES the whole object; a key sent as null or "" is removed. Omit branding to
change only the name. Applies at render time to every template and submission that
selects this brand, including signers who have not finished yet.
curl --request PUT \
--url https://spitshake.io/api/brands/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"branding": {
"display_title": "Acme Legal",
"logo_url": "https://cdn.example.com/acme/logo.png",
"favicon_url": "https://cdn.example.com/acme/favicon.png",
"primary_button_color": "#2f5d8a"
}
}
'import requests
url = "https://spitshake.io/api/brands/{id}"
payload = { "branding": {
"display_title": "Acme Legal",
"logo_url": "https://cdn.example.com/acme/logo.png",
"favicon_url": "https://cdn.example.com/acme/favicon.png",
"primary_button_color": "#2f5d8a"
} }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
branding: {
display_title: 'Acme Legal',
logo_url: 'https://cdn.example.com/acme/logo.png',
favicon_url: 'https://cdn.example.com/acme/favicon.png',
primary_button_color: '#2f5d8a'
}
})
};
fetch('https://spitshake.io/api/brands/{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/brands/{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([
'branding' => [
'display_title' => 'Acme Legal',
'logo_url' => 'https://cdn.example.com/acme/logo.png',
'favicon_url' => 'https://cdn.example.com/acme/favicon.png',
'primary_button_color' => '#2f5d8a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$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/brands/{id}"
payload := strings.NewReader("{\n \"branding\": {\n \"display_title\": \"Acme Legal\",\n \"logo_url\": \"https://cdn.example.com/acme/logo.png\",\n \"favicon_url\": \"https://cdn.example.com/acme/favicon.png\",\n \"primary_button_color\": \"#2f5d8a\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
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/brands/{id}")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branding\": {\n \"display_title\": \"Acme Legal\",\n \"logo_url\": \"https://cdn.example.com/acme/logo.png\",\n \"favicon_url\": \"https://cdn.example.com/acme/favicon.png\",\n \"primary_button_color\": \"#2f5d8a\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/brands/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branding\": {\n \"display_title\": \"Acme Legal\",\n \"logo_url\": \"https://cdn.example.com/acme/logo.png\",\n \"favicon_url\": \"https://cdn.example.com/acme/favicon.png\",\n \"primary_button_color\": \"#2f5d8a\"\n }\n}"
response = http.request(request)
puts response.read_body{
"brand": {
"id": 7,
"name": "Acme Legal",
"branding": {
"display_title": "Acme Legal",
"logo_url": "https://cdn.example.com/acme/logo.png",
"favicon_url": "https://cdn.example.com/acme/favicon.png",
"company_name": "Acme Legal LLP",
"primary_button_color": "#2f5d8a",
"header_color": "#14213d",
"show_branding": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}Authorizations
API token generated at Settings > API
Path Parameters
Body
120A set of signing-page and email branding keys, stored on a custom domain (CustomDomain.branding) or a named brand (Brand.branding). Only these keys are accepted; an unknown key, a wrong type, a non-http(s) URL or a header_color that is not a dark #rrggbb is rejected with 422. Resolved when the page or email is rendered, so an edit applies to signers who have not finished yet.
Show child attributes
Show child attributes
Response
Updated brand
A named set of branding for accounts that sign on behalf of more than one brand. A template or submission uses it by setting preferences.brand_id to its id.
Show child attributes
Show child attributes
curl --request PUT \
--url https://spitshake.io/api/brands/{id} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"branding": {
"display_title": "Acme Legal",
"logo_url": "https://cdn.example.com/acme/logo.png",
"favicon_url": "https://cdn.example.com/acme/favicon.png",
"primary_button_color": "#2f5d8a"
}
}
'import requests
url = "https://spitshake.io/api/brands/{id}"
payload = { "branding": {
"display_title": "Acme Legal",
"logo_url": "https://cdn.example.com/acme/logo.png",
"favicon_url": "https://cdn.example.com/acme/favicon.png",
"primary_button_color": "#2f5d8a"
} }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
branding: {
display_title: 'Acme Legal',
logo_url: 'https://cdn.example.com/acme/logo.png',
favicon_url: 'https://cdn.example.com/acme/favicon.png',
primary_button_color: '#2f5d8a'
}
})
};
fetch('https://spitshake.io/api/brands/{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/brands/{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([
'branding' => [
'display_title' => 'Acme Legal',
'logo_url' => 'https://cdn.example.com/acme/logo.png',
'favicon_url' => 'https://cdn.example.com/acme/favicon.png',
'primary_button_color' => '#2f5d8a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$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/brands/{id}"
payload := strings.NewReader("{\n \"branding\": {\n \"display_title\": \"Acme Legal\",\n \"logo_url\": \"https://cdn.example.com/acme/logo.png\",\n \"favicon_url\": \"https://cdn.example.com/acme/favicon.png\",\n \"primary_button_color\": \"#2f5d8a\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
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/brands/{id}")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branding\": {\n \"display_title\": \"Acme Legal\",\n \"logo_url\": \"https://cdn.example.com/acme/logo.png\",\n \"favicon_url\": \"https://cdn.example.com/acme/favicon.png\",\n \"primary_button_color\": \"#2f5d8a\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://spitshake.io/api/brands/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branding\": {\n \"display_title\": \"Acme Legal\",\n \"logo_url\": \"https://cdn.example.com/acme/logo.png\",\n \"favicon_url\": \"https://cdn.example.com/acme/favicon.png\",\n \"primary_button_color\": \"#2f5d8a\"\n }\n}"
response = http.request(request)
puts response.read_body{
"brand": {
"id": 7,
"name": "Acme Legal",
"branding": {
"display_title": "Acme Legal",
"logo_url": "https://cdn.example.com/acme/logo.png",
"favicon_url": "https://cdn.example.com/acme/favicon.png",
"company_name": "Acme Legal LLP",
"primary_button_color": "#2f5d8a",
"header_color": "#14213d",
"show_branding": true
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}
