Give the website a template's look
curl --request POST \
--url https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look \
--header 'Content-Type: application/json' \
--data '
{
"siteId": 123,
"useTemplateColors": true,
"restyleSections": true
}
'import requests
url = "https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look"
payload = {
"siteId": 123,
"useTemplateColors": True,
"restyleSections": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({siteId: 123, useTemplateColors: true, restyleSections: true})
};
fetch('https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look', 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://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look",
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([
'siteId' => 123,
'useTemplateColors' => true,
'restyleSections' => true
]),
CURLOPT_HTTPHEADER => [
"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://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look"
payload := strings.NewReader("{\n \"siteId\": 123,\n \"useTemplateColors\": true,\n \"restyleSections\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": 123,\n \"useTemplateColors\": true,\n \"restyleSections\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": 123,\n \"useTemplateColors\": true,\n \"restyleSections\": true\n}"
response = http.request(request)
puts response.read_bodyPlatform Website
Give the website a template's look
Writes the template’s design tokens to the draft, replacing the look before them and leaving every page and all content alone. The club’s brand colours stay unless useTemplateColors is true. Nothing is public until a release. Requires the website:write scope.
POST
/
v1
/
platform
/
website
/
templates
/
{templateKey}
/
apply-look
Give the website a template's look
curl --request POST \
--url https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look \
--header 'Content-Type: application/json' \
--data '
{
"siteId": 123,
"useTemplateColors": true,
"restyleSections": true
}
'import requests
url = "https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look"
payload = {
"siteId": 123,
"useTemplateColors": True,
"restyleSections": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({siteId: 123, useTemplateColors: true, restyleSections: true})
};
fetch('https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look', 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://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look",
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([
'siteId' => 123,
'useTemplateColors' => true,
'restyleSections' => true
]),
CURLOPT_HTTPHEADER => [
"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://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look"
payload := strings.NewReader("{\n \"siteId\": 123,\n \"useTemplateColors\": true,\n \"restyleSections\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": 123,\n \"useTemplateColors\": true,\n \"restyleSections\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/website/templates/{templateKey}/apply-look")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": 123,\n \"useTemplateColors\": true,\n \"restyleSections\": true\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Response
The saved draft and its resolved theme. usedTemplateColors names the colours taken from the template, and fadingBrandColors the colours the Brand Book kept that are hard to read on this look.
Was this page helpful?