Change the theme
curl --request PATCH \
--url https://posy.page/api/v1/page/theme \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"preset": "<string>",
"accent": "<string>",
"font": "<string>",
"radius": "<string>",
"align": "<string>",
"tileStyle": "<string>",
"effect": "<string>",
"avatar": "<string>",
"motion": true,
"ambient": true,
"background": {
"style": "<string>",
"image": "<string>",
"dim": 123,
"blur": 123,
"grain": true,
"color": "<string>"
}
}
'import requests
url = "https://posy.page/api/v1/page/theme"
payload = {
"preset": "<string>",
"accent": "<string>",
"font": "<string>",
"radius": "<string>",
"align": "<string>",
"tileStyle": "<string>",
"effect": "<string>",
"avatar": "<string>",
"motion": True,
"ambient": True,
"background": {
"style": "<string>",
"image": "<string>",
"dim": 123,
"blur": 123,
"grain": True,
"color": "<string>"
}
}
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({
preset: '<string>',
accent: '<string>',
font: '<string>',
radius: '<string>',
align: '<string>',
tileStyle: '<string>',
effect: '<string>',
avatar: '<string>',
motion: true,
ambient: true,
background: {
style: '<string>',
image: '<string>',
dim: 123,
blur: 123,
grain: true,
color: '<string>'
}
})
};
fetch('https://posy.page/api/v1/page/theme', 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://posy.page/api/v1/page/theme",
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([
'preset' => '<string>',
'accent' => '<string>',
'font' => '<string>',
'radius' => '<string>',
'align' => '<string>',
'tileStyle' => '<string>',
'effect' => '<string>',
'avatar' => '<string>',
'motion' => true,
'ambient' => true,
'background' => [
'style' => '<string>',
'image' => '<string>',
'dim' => 123,
'blur' => 123,
'grain' => true,
'color' => '<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://posy.page/api/v1/page/theme"
payload := strings.NewReader("{\n \"preset\": \"<string>\",\n \"accent\": \"<string>\",\n \"font\": \"<string>\",\n \"radius\": \"<string>\",\n \"align\": \"<string>\",\n \"tileStyle\": \"<string>\",\n \"effect\": \"<string>\",\n \"avatar\": \"<string>\",\n \"motion\": true,\n \"ambient\": true,\n \"background\": {\n \"style\": \"<string>\",\n \"image\": \"<string>\",\n \"dim\": 123,\n \"blur\": 123,\n \"grain\": true,\n \"color\": \"<string>\"\n }\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://posy.page/api/v1/page/theme")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"preset\": \"<string>\",\n \"accent\": \"<string>\",\n \"font\": \"<string>\",\n \"radius\": \"<string>\",\n \"align\": \"<string>\",\n \"tileStyle\": \"<string>\",\n \"effect\": \"<string>\",\n \"avatar\": \"<string>\",\n \"motion\": true,\n \"ambient\": true,\n \"background\": {\n \"style\": \"<string>\",\n \"image\": \"<string>\",\n \"dim\": 123,\n \"blur\": 123,\n \"grain\": true,\n \"color\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posy.page/api/v1/page/theme")
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 \"preset\": \"<string>\",\n \"accent\": \"<string>\",\n \"font\": \"<string>\",\n \"radius\": \"<string>\",\n \"align\": \"<string>\",\n \"tileStyle\": \"<string>\",\n \"effect\": \"<string>\",\n \"avatar\": \"<string>\",\n \"motion\": true,\n \"ambient\": true,\n \"background\": {\n \"style\": \"<string>\",\n \"image\": \"<string>\",\n \"dim\": 123,\n \"blur\": 123,\n \"grain\": true,\n \"color\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Change the theme
Change theme settings (same fields as the MCP set_theme tool); send only what should change
Looks (style): cozy, washi, lofi, painted, cobalt, night. Returns the whole theme.
PATCH
/
api
/
v1
/
page
/
theme
Change the theme
curl --request PATCH \
--url https://posy.page/api/v1/page/theme \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"preset": "<string>",
"accent": "<string>",
"font": "<string>",
"radius": "<string>",
"align": "<string>",
"tileStyle": "<string>",
"effect": "<string>",
"avatar": "<string>",
"motion": true,
"ambient": true,
"background": {
"style": "<string>",
"image": "<string>",
"dim": 123,
"blur": 123,
"grain": true,
"color": "<string>"
}
}
'import requests
url = "https://posy.page/api/v1/page/theme"
payload = {
"preset": "<string>",
"accent": "<string>",
"font": "<string>",
"radius": "<string>",
"align": "<string>",
"tileStyle": "<string>",
"effect": "<string>",
"avatar": "<string>",
"motion": True,
"ambient": True,
"background": {
"style": "<string>",
"image": "<string>",
"dim": 123,
"blur": 123,
"grain": True,
"color": "<string>"
}
}
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({
preset: '<string>',
accent: '<string>',
font: '<string>',
radius: '<string>',
align: '<string>',
tileStyle: '<string>',
effect: '<string>',
avatar: '<string>',
motion: true,
ambient: true,
background: {
style: '<string>',
image: '<string>',
dim: 123,
blur: 123,
grain: true,
color: '<string>'
}
})
};
fetch('https://posy.page/api/v1/page/theme', 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://posy.page/api/v1/page/theme",
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([
'preset' => '<string>',
'accent' => '<string>',
'font' => '<string>',
'radius' => '<string>',
'align' => '<string>',
'tileStyle' => '<string>',
'effect' => '<string>',
'avatar' => '<string>',
'motion' => true,
'ambient' => true,
'background' => [
'style' => '<string>',
'image' => '<string>',
'dim' => 123,
'blur' => 123,
'grain' => true,
'color' => '<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://posy.page/api/v1/page/theme"
payload := strings.NewReader("{\n \"preset\": \"<string>\",\n \"accent\": \"<string>\",\n \"font\": \"<string>\",\n \"radius\": \"<string>\",\n \"align\": \"<string>\",\n \"tileStyle\": \"<string>\",\n \"effect\": \"<string>\",\n \"avatar\": \"<string>\",\n \"motion\": true,\n \"ambient\": true,\n \"background\": {\n \"style\": \"<string>\",\n \"image\": \"<string>\",\n \"dim\": 123,\n \"blur\": 123,\n \"grain\": true,\n \"color\": \"<string>\"\n }\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://posy.page/api/v1/page/theme")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"preset\": \"<string>\",\n \"accent\": \"<string>\",\n \"font\": \"<string>\",\n \"radius\": \"<string>\",\n \"align\": \"<string>\",\n \"tileStyle\": \"<string>\",\n \"effect\": \"<string>\",\n \"avatar\": \"<string>\",\n \"motion\": true,\n \"ambient\": true,\n \"background\": {\n \"style\": \"<string>\",\n \"image\": \"<string>\",\n \"dim\": 123,\n \"blur\": 123,\n \"grain\": true,\n \"color\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posy.page/api/v1/page/theme")
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 \"preset\": \"<string>\",\n \"accent\": \"<string>\",\n \"font\": \"<string>\",\n \"radius\": \"<string>\",\n \"align\": \"<string>\",\n \"tileStyle\": \"<string>\",\n \"effect\": \"<string>\",\n \"avatar\": \"<string>\",\n \"motion\": true,\n \"ambient\": true,\n \"background\": {\n \"style\": \"<string>\",\n \"image\": \"<string>\",\n \"dim\": 123,\n \"blur\": 123,\n \"grain\": true,\n \"color\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
beareroauth
A "posy_…" API key from the dashboard
Body
application/json
Available options:
cozy, washi, lofi, painted, cobalt, night Pattern:
^#[0-9a-fA-F]{6}$Available options:
bento, list, canvas Available options:
natural, mono, dither, ascii Show child attributes
Show child attributes
Response
{ theme }
⌘I