PATCH
/
v1
/
themes
/
{id}
Update a theme
curl --request PATCH \
--url https://api.propal.io/v1/themes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"section_styles": [
{
"bg": "<string>",
"headingColor": "<string>",
"textColor": "<string>",
"borderColor": "<string>",
"cardBg": "<string>",
"cardHeadingColor": "<string>",
"cardTextColor": "<string>",
"cardBorderColor": "<string>",
"id": "<string>",
"badgeBg": "<string>",
"badgeText": "<string>",
"badgeBorder": "<string>"
}
],
"radius": 1,
"button_radius": 1,
"paragraph_margin_top": 48,
"is_default": true
}
'import requests
url = "https://api.propal.io/v1/themes/{id}"
payload = {
"name": "<string>",
"section_styles": [
{
"bg": "<string>",
"headingColor": "<string>",
"textColor": "<string>",
"borderColor": "<string>",
"cardBg": "<string>",
"cardHeadingColor": "<string>",
"cardTextColor": "<string>",
"cardBorderColor": "<string>",
"id": "<string>",
"badgeBg": "<string>",
"badgeText": "<string>",
"badgeBorder": "<string>"
}
],
"radius": 1,
"button_radius": 1,
"paragraph_margin_top": 48,
"is_default": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
section_styles: [
{
bg: '<string>',
headingColor: '<string>',
textColor: '<string>',
borderColor: '<string>',
cardBg: '<string>',
cardHeadingColor: '<string>',
cardTextColor: '<string>',
cardBorderColor: '<string>',
id: '<string>',
badgeBg: '<string>',
badgeText: '<string>',
badgeBorder: '<string>'
}
],
radius: 1,
button_radius: 1,
paragraph_margin_top: 48,
is_default: true
})
};
fetch('https://api.propal.io/v1/themes/{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://api.propal.io/v1/themes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'section_styles' => [
[
'bg' => '<string>',
'headingColor' => '<string>',
'textColor' => '<string>',
'borderColor' => '<string>',
'cardBg' => '<string>',
'cardHeadingColor' => '<string>',
'cardTextColor' => '<string>',
'cardBorderColor' => '<string>',
'id' => '<string>',
'badgeBg' => '<string>',
'badgeText' => '<string>',
'badgeBorder' => '<string>'
]
],
'radius' => 1,
'button_radius' => 1,
'paragraph_margin_top' => 48,
'is_default' => true
]),
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://api.propal.io/v1/themes/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"section_styles\": [\n {\n \"bg\": \"<string>\",\n \"headingColor\": \"<string>\",\n \"textColor\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"cardBg\": \"<string>\",\n \"cardHeadingColor\": \"<string>\",\n \"cardTextColor\": \"<string>\",\n \"cardBorderColor\": \"<string>\",\n \"id\": \"<string>\",\n \"badgeBg\": \"<string>\",\n \"badgeText\": \"<string>\",\n \"badgeBorder\": \"<string>\"\n }\n ],\n \"radius\": 1,\n \"button_radius\": 1,\n \"paragraph_margin_top\": 48,\n \"is_default\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.propal.io/v1/themes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"section_styles\": [\n {\n \"bg\": \"<string>\",\n \"headingColor\": \"<string>\",\n \"textColor\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"cardBg\": \"<string>\",\n \"cardHeadingColor\": \"<string>\",\n \"cardTextColor\": \"<string>\",\n \"cardBorderColor\": \"<string>\",\n \"id\": \"<string>\",\n \"badgeBg\": \"<string>\",\n \"badgeText\": \"<string>\",\n \"badgeBorder\": \"<string>\"\n }\n ],\n \"radius\": 1,\n \"button_radius\": 1,\n \"paragraph_margin_top\": 48,\n \"is_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.propal.io/v1/themes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"section_styles\": [\n {\n \"bg\": \"<string>\",\n \"headingColor\": \"<string>\",\n \"textColor\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"cardBg\": \"<string>\",\n \"cardHeadingColor\": \"<string>\",\n \"cardTextColor\": \"<string>\",\n \"cardBorderColor\": \"<string>\",\n \"id\": \"<string>\",\n \"badgeBg\": \"<string>\",\n \"badgeText\": \"<string>\",\n \"badgeBorder\": \"<string>\"\n }\n ],\n \"radius\": 1,\n \"button_radius\": 1,\n \"paragraph_margin_top\": 48,\n \"is_default\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"font": "<string>",
"body_theme": "<string>",
"color_accent": "<string>",
"colors": {},
"radius": 123,
"button_radius": 123,
"is_default": true,
"created_at": "<string>",
"updated_at": "<string>",
"section_styles": null
}Authorizations
API key in format: pp_live_xxxxxxxxxxxxxxxxxxxxxxxx
Path Parameters
Theme UUID
Body
application/json
Minimum string length:
1Available options:
inter, helvetica, satoshi, poppins, outfit, plus_jakarta Available options:
inter, helvetica, satoshi, poppins, outfit, plus_jakarta Available options:
inter, helvetica, satoshi, poppins, outfit, plus_jakarta Available options:
white, gray, outlined, black Available options:
blue, green, purple, red, orange, black Show child attributes
Show child attributes
Show child attributes
Show child attributes
Border radius in rem, between 0 and 2 in 0.1 steps.
Required range:
0 <= x <= 2Border radius in rem, between 0 and 2 in 0.1 steps.
Required range:
0 <= x <= 2Default paragraph top margin in px, between 0 and 96 in 2 steps. Overridable per paragraph.
Required range:
0 <= x <= 96Response
Updated theme
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Update a theme
curl --request PATCH \
--url https://api.propal.io/v1/themes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"section_styles": [
{
"bg": "<string>",
"headingColor": "<string>",
"textColor": "<string>",
"borderColor": "<string>",
"cardBg": "<string>",
"cardHeadingColor": "<string>",
"cardTextColor": "<string>",
"cardBorderColor": "<string>",
"id": "<string>",
"badgeBg": "<string>",
"badgeText": "<string>",
"badgeBorder": "<string>"
}
],
"radius": 1,
"button_radius": 1,
"paragraph_margin_top": 48,
"is_default": true
}
'import requests
url = "https://api.propal.io/v1/themes/{id}"
payload = {
"name": "<string>",
"section_styles": [
{
"bg": "<string>",
"headingColor": "<string>",
"textColor": "<string>",
"borderColor": "<string>",
"cardBg": "<string>",
"cardHeadingColor": "<string>",
"cardTextColor": "<string>",
"cardBorderColor": "<string>",
"id": "<string>",
"badgeBg": "<string>",
"badgeText": "<string>",
"badgeBorder": "<string>"
}
],
"radius": 1,
"button_radius": 1,
"paragraph_margin_top": 48,
"is_default": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
section_styles: [
{
bg: '<string>',
headingColor: '<string>',
textColor: '<string>',
borderColor: '<string>',
cardBg: '<string>',
cardHeadingColor: '<string>',
cardTextColor: '<string>',
cardBorderColor: '<string>',
id: '<string>',
badgeBg: '<string>',
badgeText: '<string>',
badgeBorder: '<string>'
}
],
radius: 1,
button_radius: 1,
paragraph_margin_top: 48,
is_default: true
})
};
fetch('https://api.propal.io/v1/themes/{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://api.propal.io/v1/themes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'section_styles' => [
[
'bg' => '<string>',
'headingColor' => '<string>',
'textColor' => '<string>',
'borderColor' => '<string>',
'cardBg' => '<string>',
'cardHeadingColor' => '<string>',
'cardTextColor' => '<string>',
'cardBorderColor' => '<string>',
'id' => '<string>',
'badgeBg' => '<string>',
'badgeText' => '<string>',
'badgeBorder' => '<string>'
]
],
'radius' => 1,
'button_radius' => 1,
'paragraph_margin_top' => 48,
'is_default' => true
]),
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://api.propal.io/v1/themes/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"section_styles\": [\n {\n \"bg\": \"<string>\",\n \"headingColor\": \"<string>\",\n \"textColor\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"cardBg\": \"<string>\",\n \"cardHeadingColor\": \"<string>\",\n \"cardTextColor\": \"<string>\",\n \"cardBorderColor\": \"<string>\",\n \"id\": \"<string>\",\n \"badgeBg\": \"<string>\",\n \"badgeText\": \"<string>\",\n \"badgeBorder\": \"<string>\"\n }\n ],\n \"radius\": 1,\n \"button_radius\": 1,\n \"paragraph_margin_top\": 48,\n \"is_default\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.propal.io/v1/themes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"section_styles\": [\n {\n \"bg\": \"<string>\",\n \"headingColor\": \"<string>\",\n \"textColor\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"cardBg\": \"<string>\",\n \"cardHeadingColor\": \"<string>\",\n \"cardTextColor\": \"<string>\",\n \"cardBorderColor\": \"<string>\",\n \"id\": \"<string>\",\n \"badgeBg\": \"<string>\",\n \"badgeText\": \"<string>\",\n \"badgeBorder\": \"<string>\"\n }\n ],\n \"radius\": 1,\n \"button_radius\": 1,\n \"paragraph_margin_top\": 48,\n \"is_default\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.propal.io/v1/themes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"section_styles\": [\n {\n \"bg\": \"<string>\",\n \"headingColor\": \"<string>\",\n \"textColor\": \"<string>\",\n \"borderColor\": \"<string>\",\n \"cardBg\": \"<string>\",\n \"cardHeadingColor\": \"<string>\",\n \"cardTextColor\": \"<string>\",\n \"cardBorderColor\": \"<string>\",\n \"id\": \"<string>\",\n \"badgeBg\": \"<string>\",\n \"badgeText\": \"<string>\",\n \"badgeBorder\": \"<string>\"\n }\n ],\n \"radius\": 1,\n \"button_radius\": 1,\n \"paragraph_margin_top\": 48,\n \"is_default\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"font": "<string>",
"body_theme": "<string>",
"color_accent": "<string>",
"colors": {},
"radius": 123,
"button_radius": 123,
"is_default": true,
"created_at": "<string>",
"updated_at": "<string>",
"section_styles": null
}