Update theme configuration
curl --request PATCH \
--url https://{subdomain}.nudj.cx/api/v2/admin/themes \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"themeAssets": {
"light": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
},
"dark": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
}
},
"theme": {
"font": {
"family": "<string>",
"sizes": {
"xs": "<string>",
"sm": "<string>",
"base": "<string>",
"lg": "<string>",
"xl": "<string>",
"2xl": "<string>",
"3xl": "<string>",
"4xl": "<string>",
"5xl": "<string>",
"6xl": "<string>"
}
},
"borderRadius": "<string>",
"colors": {
"light": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
},
"dark": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
}
},
"disableCardGradients": true,
"hideCommunityDetailsOnCards": true,
"postCardVersion": "<string>",
"achievementCardVersion": "<string>",
"challengeCardVersion": "<string>",
"mobileNav": {
"iconOnly": true,
"fontSize": "<string>"
},
"homeButtonOverrideUrl": "<string>",
"orgLogoOverrideUrl": "<string>",
"icons": {},
"backgroundImage": "<string>"
}
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/themes"
payload = {
"themeAssets": {
"light": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
},
"dark": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
}
},
"theme": {
"font": {
"family": "<string>",
"sizes": {
"xs": "<string>",
"sm": "<string>",
"base": "<string>",
"lg": "<string>",
"xl": "<string>",
"2xl": "<string>",
"3xl": "<string>",
"4xl": "<string>",
"5xl": "<string>",
"6xl": "<string>"
}
},
"borderRadius": "<string>",
"colors": {
"light": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
},
"dark": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
}
},
"disableCardGradients": True,
"hideCommunityDetailsOnCards": True,
"postCardVersion": "<string>",
"achievementCardVersion": "<string>",
"challengeCardVersion": "<string>",
"mobileNav": {
"iconOnly": True,
"fontSize": "<string>"
},
"homeButtonOverrideUrl": "<string>",
"orgLogoOverrideUrl": "<string>",
"icons": {},
"backgroundImage": "<string>"
}
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
themeAssets: {
light: {
logo: '<string>',
navbarLogo: '<string>',
favicon: '<string>',
appleTouchIcon: '<string>'
},
dark: {
logo: '<string>',
navbarLogo: '<string>',
favicon: '<string>',
appleTouchIcon: '<string>'
}
},
theme: {
font: {
family: '<string>',
sizes: {
xs: '<string>',
sm: '<string>',
base: '<string>',
lg: '<string>',
xl: '<string>',
'2xl': '<string>',
'3xl': '<string>',
'4xl': '<string>',
'5xl': '<string>',
'6xl': '<string>'
}
},
borderRadius: '<string>',
colors: {
light: {
background: '<string>',
card: '<string>',
cardForeground: '<string>',
foreground: '<string>',
popover: '<string>',
popoverForeground: '<string>',
primary: '<string>',
primaryForeground: '<string>',
secondary: '<string>',
secondaryForeground: '<string>',
muted: '<string>',
mutedForeground: '<string>',
accent: '<string>',
accentForeground: '<string>',
destructive: '<string>',
destructiveForeground: '<string>',
border: '<string>',
input: '<string>',
ring: '<string>',
success: '<string>',
successForeground: '<string>'
},
dark: {
background: '<string>',
card: '<string>',
cardForeground: '<string>',
foreground: '<string>',
popover: '<string>',
popoverForeground: '<string>',
primary: '<string>',
primaryForeground: '<string>',
secondary: '<string>',
secondaryForeground: '<string>',
muted: '<string>',
mutedForeground: '<string>',
accent: '<string>',
accentForeground: '<string>',
destructive: '<string>',
destructiveForeground: '<string>',
border: '<string>',
input: '<string>',
ring: '<string>',
success: '<string>',
successForeground: '<string>'
}
},
disableCardGradients: true,
hideCommunityDetailsOnCards: true,
postCardVersion: '<string>',
achievementCardVersion: '<string>',
challengeCardVersion: '<string>',
mobileNav: {iconOnly: true, fontSize: '<string>'},
homeButtonOverrideUrl: '<string>',
orgLogoOverrideUrl: '<string>',
icons: {},
backgroundImage: '<string>'
}
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/themes', 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://{subdomain}.nudj.cx/api/v2/admin/themes",
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([
'themeAssets' => [
'light' => [
'logo' => '<string>',
'navbarLogo' => '<string>',
'favicon' => '<string>',
'appleTouchIcon' => '<string>'
],
'dark' => [
'logo' => '<string>',
'navbarLogo' => '<string>',
'favicon' => '<string>',
'appleTouchIcon' => '<string>'
]
],
'theme' => [
'font' => [
'family' => '<string>',
'sizes' => [
'xs' => '<string>',
'sm' => '<string>',
'base' => '<string>',
'lg' => '<string>',
'xl' => '<string>',
'2xl' => '<string>',
'3xl' => '<string>',
'4xl' => '<string>',
'5xl' => '<string>',
'6xl' => '<string>'
]
],
'borderRadius' => '<string>',
'colors' => [
'light' => [
'background' => '<string>',
'card' => '<string>',
'cardForeground' => '<string>',
'foreground' => '<string>',
'popover' => '<string>',
'popoverForeground' => '<string>',
'primary' => '<string>',
'primaryForeground' => '<string>',
'secondary' => '<string>',
'secondaryForeground' => '<string>',
'muted' => '<string>',
'mutedForeground' => '<string>',
'accent' => '<string>',
'accentForeground' => '<string>',
'destructive' => '<string>',
'destructiveForeground' => '<string>',
'border' => '<string>',
'input' => '<string>',
'ring' => '<string>',
'success' => '<string>',
'successForeground' => '<string>'
],
'dark' => [
'background' => '<string>',
'card' => '<string>',
'cardForeground' => '<string>',
'foreground' => '<string>',
'popover' => '<string>',
'popoverForeground' => '<string>',
'primary' => '<string>',
'primaryForeground' => '<string>',
'secondary' => '<string>',
'secondaryForeground' => '<string>',
'muted' => '<string>',
'mutedForeground' => '<string>',
'accent' => '<string>',
'accentForeground' => '<string>',
'destructive' => '<string>',
'destructiveForeground' => '<string>',
'border' => '<string>',
'input' => '<string>',
'ring' => '<string>',
'success' => '<string>',
'successForeground' => '<string>'
]
],
'disableCardGradients' => true,
'hideCommunityDetailsOnCards' => true,
'postCardVersion' => '<string>',
'achievementCardVersion' => '<string>',
'challengeCardVersion' => '<string>',
'mobileNav' => [
'iconOnly' => true,
'fontSize' => '<string>'
],
'homeButtonOverrideUrl' => '<string>',
'orgLogoOverrideUrl' => '<string>',
'icons' => [
],
'backgroundImage' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-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://{subdomain}.nudj.cx/api/v2/admin/themes"
payload := strings.NewReader("{\n \"themeAssets\": {\n \"light\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n },\n \"dark\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n }\n },\n \"theme\": {\n \"font\": {\n \"family\": \"<string>\",\n \"sizes\": {\n \"xs\": \"<string>\",\n \"sm\": \"<string>\",\n \"base\": \"<string>\",\n \"lg\": \"<string>\",\n \"xl\": \"<string>\",\n \"2xl\": \"<string>\",\n \"3xl\": \"<string>\",\n \"4xl\": \"<string>\",\n \"5xl\": \"<string>\",\n \"6xl\": \"<string>\"\n }\n },\n \"borderRadius\": \"<string>\",\n \"colors\": {\n \"light\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n },\n \"dark\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n }\n },\n \"disableCardGradients\": true,\n \"hideCommunityDetailsOnCards\": true,\n \"postCardVersion\": \"<string>\",\n \"achievementCardVersion\": \"<string>\",\n \"challengeCardVersion\": \"<string>\",\n \"mobileNav\": {\n \"iconOnly\": true,\n \"fontSize\": \"<string>\"\n },\n \"homeButtonOverrideUrl\": \"<string>\",\n \"orgLogoOverrideUrl\": \"<string>\",\n \"icons\": {},\n \"backgroundImage\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-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.patch("https://{subdomain}.nudj.cx/api/v2/admin/themes")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"themeAssets\": {\n \"light\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n },\n \"dark\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n }\n },\n \"theme\": {\n \"font\": {\n \"family\": \"<string>\",\n \"sizes\": {\n \"xs\": \"<string>\",\n \"sm\": \"<string>\",\n \"base\": \"<string>\",\n \"lg\": \"<string>\",\n \"xl\": \"<string>\",\n \"2xl\": \"<string>\",\n \"3xl\": \"<string>\",\n \"4xl\": \"<string>\",\n \"5xl\": \"<string>\",\n \"6xl\": \"<string>\"\n }\n },\n \"borderRadius\": \"<string>\",\n \"colors\": {\n \"light\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n },\n \"dark\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n }\n },\n \"disableCardGradients\": true,\n \"hideCommunityDetailsOnCards\": true,\n \"postCardVersion\": \"<string>\",\n \"achievementCardVersion\": \"<string>\",\n \"challengeCardVersion\": \"<string>\",\n \"mobileNav\": {\n \"iconOnly\": true,\n \"fontSize\": \"<string>\"\n },\n \"homeButtonOverrideUrl\": \"<string>\",\n \"orgLogoOverrideUrl\": \"<string>\",\n \"icons\": {},\n \"backgroundImage\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"themeAssets\": {\n \"light\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n },\n \"dark\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n }\n },\n \"theme\": {\n \"font\": {\n \"family\": \"<string>\",\n \"sizes\": {\n \"xs\": \"<string>\",\n \"sm\": \"<string>\",\n \"base\": \"<string>\",\n \"lg\": \"<string>\",\n \"xl\": \"<string>\",\n \"2xl\": \"<string>\",\n \"3xl\": \"<string>\",\n \"4xl\": \"<string>\",\n \"5xl\": \"<string>\",\n \"6xl\": \"<string>\"\n }\n },\n \"borderRadius\": \"<string>\",\n \"colors\": {\n \"light\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n },\n \"dark\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n }\n },\n \"disableCardGradients\": true,\n \"hideCommunityDetailsOnCards\": true,\n \"postCardVersion\": \"<string>\",\n \"achievementCardVersion\": \"<string>\",\n \"challengeCardVersion\": \"<string>\",\n \"mobileNav\": {\n \"iconOnly\": true,\n \"fontSize\": \"<string>\"\n },\n \"homeButtonOverrideUrl\": \"<string>\",\n \"orgLogoOverrideUrl\": \"<string>\",\n \"icons\": {},\n \"backgroundImage\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"themeAssets": {
"light": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
},
"dark": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
}
},
"theme": {
"font": {
"family": "<string>",
"sizes": {
"xs": "<string>",
"sm": "<string>",
"base": "<string>",
"lg": "<string>",
"xl": "<string>",
"2xl": "<string>",
"3xl": "<string>",
"4xl": "<string>",
"5xl": "<string>",
"6xl": "<string>"
}
},
"borderRadius": "<string>",
"colors": {
"light": {},
"dark": {}
},
"disableCardGradients": true,
"hideCommunityDetailsOnCards": true,
"postCardVersion": "<string>",
"achievementCardVersion": "<string>",
"challengeCardVersion": "<string>",
"mobileNav": {
"iconOnly": true,
"fontSize": "<string>"
},
"homeButtonOverrideUrl": "<string>",
"orgLogoOverrideUrl": "<string>",
"icons": {},
"backgroundImage": "<string>"
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Themes
Update theme configuration
Update the theme and styling configuration.
PATCH
/
themes
Update theme configuration
curl --request PATCH \
--url https://{subdomain}.nudj.cx/api/v2/admin/themes \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"themeAssets": {
"light": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
},
"dark": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
}
},
"theme": {
"font": {
"family": "<string>",
"sizes": {
"xs": "<string>",
"sm": "<string>",
"base": "<string>",
"lg": "<string>",
"xl": "<string>",
"2xl": "<string>",
"3xl": "<string>",
"4xl": "<string>",
"5xl": "<string>",
"6xl": "<string>"
}
},
"borderRadius": "<string>",
"colors": {
"light": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
},
"dark": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
}
},
"disableCardGradients": true,
"hideCommunityDetailsOnCards": true,
"postCardVersion": "<string>",
"achievementCardVersion": "<string>",
"challengeCardVersion": "<string>",
"mobileNav": {
"iconOnly": true,
"fontSize": "<string>"
},
"homeButtonOverrideUrl": "<string>",
"orgLogoOverrideUrl": "<string>",
"icons": {},
"backgroundImage": "<string>"
}
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/themes"
payload = {
"themeAssets": {
"light": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
},
"dark": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
}
},
"theme": {
"font": {
"family": "<string>",
"sizes": {
"xs": "<string>",
"sm": "<string>",
"base": "<string>",
"lg": "<string>",
"xl": "<string>",
"2xl": "<string>",
"3xl": "<string>",
"4xl": "<string>",
"5xl": "<string>",
"6xl": "<string>"
}
},
"borderRadius": "<string>",
"colors": {
"light": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
},
"dark": {
"background": "<string>",
"card": "<string>",
"cardForeground": "<string>",
"foreground": "<string>",
"popover": "<string>",
"popoverForeground": "<string>",
"primary": "<string>",
"primaryForeground": "<string>",
"secondary": "<string>",
"secondaryForeground": "<string>",
"muted": "<string>",
"mutedForeground": "<string>",
"accent": "<string>",
"accentForeground": "<string>",
"destructive": "<string>",
"destructiveForeground": "<string>",
"border": "<string>",
"input": "<string>",
"ring": "<string>",
"success": "<string>",
"successForeground": "<string>"
}
},
"disableCardGradients": True,
"hideCommunityDetailsOnCards": True,
"postCardVersion": "<string>",
"achievementCardVersion": "<string>",
"challengeCardVersion": "<string>",
"mobileNav": {
"iconOnly": True,
"fontSize": "<string>"
},
"homeButtonOverrideUrl": "<string>",
"orgLogoOverrideUrl": "<string>",
"icons": {},
"backgroundImage": "<string>"
}
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
themeAssets: {
light: {
logo: '<string>',
navbarLogo: '<string>',
favicon: '<string>',
appleTouchIcon: '<string>'
},
dark: {
logo: '<string>',
navbarLogo: '<string>',
favicon: '<string>',
appleTouchIcon: '<string>'
}
},
theme: {
font: {
family: '<string>',
sizes: {
xs: '<string>',
sm: '<string>',
base: '<string>',
lg: '<string>',
xl: '<string>',
'2xl': '<string>',
'3xl': '<string>',
'4xl': '<string>',
'5xl': '<string>',
'6xl': '<string>'
}
},
borderRadius: '<string>',
colors: {
light: {
background: '<string>',
card: '<string>',
cardForeground: '<string>',
foreground: '<string>',
popover: '<string>',
popoverForeground: '<string>',
primary: '<string>',
primaryForeground: '<string>',
secondary: '<string>',
secondaryForeground: '<string>',
muted: '<string>',
mutedForeground: '<string>',
accent: '<string>',
accentForeground: '<string>',
destructive: '<string>',
destructiveForeground: '<string>',
border: '<string>',
input: '<string>',
ring: '<string>',
success: '<string>',
successForeground: '<string>'
},
dark: {
background: '<string>',
card: '<string>',
cardForeground: '<string>',
foreground: '<string>',
popover: '<string>',
popoverForeground: '<string>',
primary: '<string>',
primaryForeground: '<string>',
secondary: '<string>',
secondaryForeground: '<string>',
muted: '<string>',
mutedForeground: '<string>',
accent: '<string>',
accentForeground: '<string>',
destructive: '<string>',
destructiveForeground: '<string>',
border: '<string>',
input: '<string>',
ring: '<string>',
success: '<string>',
successForeground: '<string>'
}
},
disableCardGradients: true,
hideCommunityDetailsOnCards: true,
postCardVersion: '<string>',
achievementCardVersion: '<string>',
challengeCardVersion: '<string>',
mobileNav: {iconOnly: true, fontSize: '<string>'},
homeButtonOverrideUrl: '<string>',
orgLogoOverrideUrl: '<string>',
icons: {},
backgroundImage: '<string>'
}
})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/themes', 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://{subdomain}.nudj.cx/api/v2/admin/themes",
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([
'themeAssets' => [
'light' => [
'logo' => '<string>',
'navbarLogo' => '<string>',
'favicon' => '<string>',
'appleTouchIcon' => '<string>'
],
'dark' => [
'logo' => '<string>',
'navbarLogo' => '<string>',
'favicon' => '<string>',
'appleTouchIcon' => '<string>'
]
],
'theme' => [
'font' => [
'family' => '<string>',
'sizes' => [
'xs' => '<string>',
'sm' => '<string>',
'base' => '<string>',
'lg' => '<string>',
'xl' => '<string>',
'2xl' => '<string>',
'3xl' => '<string>',
'4xl' => '<string>',
'5xl' => '<string>',
'6xl' => '<string>'
]
],
'borderRadius' => '<string>',
'colors' => [
'light' => [
'background' => '<string>',
'card' => '<string>',
'cardForeground' => '<string>',
'foreground' => '<string>',
'popover' => '<string>',
'popoverForeground' => '<string>',
'primary' => '<string>',
'primaryForeground' => '<string>',
'secondary' => '<string>',
'secondaryForeground' => '<string>',
'muted' => '<string>',
'mutedForeground' => '<string>',
'accent' => '<string>',
'accentForeground' => '<string>',
'destructive' => '<string>',
'destructiveForeground' => '<string>',
'border' => '<string>',
'input' => '<string>',
'ring' => '<string>',
'success' => '<string>',
'successForeground' => '<string>'
],
'dark' => [
'background' => '<string>',
'card' => '<string>',
'cardForeground' => '<string>',
'foreground' => '<string>',
'popover' => '<string>',
'popoverForeground' => '<string>',
'primary' => '<string>',
'primaryForeground' => '<string>',
'secondary' => '<string>',
'secondaryForeground' => '<string>',
'muted' => '<string>',
'mutedForeground' => '<string>',
'accent' => '<string>',
'accentForeground' => '<string>',
'destructive' => '<string>',
'destructiveForeground' => '<string>',
'border' => '<string>',
'input' => '<string>',
'ring' => '<string>',
'success' => '<string>',
'successForeground' => '<string>'
]
],
'disableCardGradients' => true,
'hideCommunityDetailsOnCards' => true,
'postCardVersion' => '<string>',
'achievementCardVersion' => '<string>',
'challengeCardVersion' => '<string>',
'mobileNav' => [
'iconOnly' => true,
'fontSize' => '<string>'
],
'homeButtonOverrideUrl' => '<string>',
'orgLogoOverrideUrl' => '<string>',
'icons' => [
],
'backgroundImage' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-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://{subdomain}.nudj.cx/api/v2/admin/themes"
payload := strings.NewReader("{\n \"themeAssets\": {\n \"light\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n },\n \"dark\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n }\n },\n \"theme\": {\n \"font\": {\n \"family\": \"<string>\",\n \"sizes\": {\n \"xs\": \"<string>\",\n \"sm\": \"<string>\",\n \"base\": \"<string>\",\n \"lg\": \"<string>\",\n \"xl\": \"<string>\",\n \"2xl\": \"<string>\",\n \"3xl\": \"<string>\",\n \"4xl\": \"<string>\",\n \"5xl\": \"<string>\",\n \"6xl\": \"<string>\"\n }\n },\n \"borderRadius\": \"<string>\",\n \"colors\": {\n \"light\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n },\n \"dark\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n }\n },\n \"disableCardGradients\": true,\n \"hideCommunityDetailsOnCards\": true,\n \"postCardVersion\": \"<string>\",\n \"achievementCardVersion\": \"<string>\",\n \"challengeCardVersion\": \"<string>\",\n \"mobileNav\": {\n \"iconOnly\": true,\n \"fontSize\": \"<string>\"\n },\n \"homeButtonOverrideUrl\": \"<string>\",\n \"orgLogoOverrideUrl\": \"<string>\",\n \"icons\": {},\n \"backgroundImage\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-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.patch("https://{subdomain}.nudj.cx/api/v2/admin/themes")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"themeAssets\": {\n \"light\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n },\n \"dark\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n }\n },\n \"theme\": {\n \"font\": {\n \"family\": \"<string>\",\n \"sizes\": {\n \"xs\": \"<string>\",\n \"sm\": \"<string>\",\n \"base\": \"<string>\",\n \"lg\": \"<string>\",\n \"xl\": \"<string>\",\n \"2xl\": \"<string>\",\n \"3xl\": \"<string>\",\n \"4xl\": \"<string>\",\n \"5xl\": \"<string>\",\n \"6xl\": \"<string>\"\n }\n },\n \"borderRadius\": \"<string>\",\n \"colors\": {\n \"light\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n },\n \"dark\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n }\n },\n \"disableCardGradients\": true,\n \"hideCommunityDetailsOnCards\": true,\n \"postCardVersion\": \"<string>\",\n \"achievementCardVersion\": \"<string>\",\n \"challengeCardVersion\": \"<string>\",\n \"mobileNav\": {\n \"iconOnly\": true,\n \"fontSize\": \"<string>\"\n },\n \"homeButtonOverrideUrl\": \"<string>\",\n \"orgLogoOverrideUrl\": \"<string>\",\n \"icons\": {},\n \"backgroundImage\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/themes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"themeAssets\": {\n \"light\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n },\n \"dark\": {\n \"logo\": \"<string>\",\n \"navbarLogo\": \"<string>\",\n \"favicon\": \"<string>\",\n \"appleTouchIcon\": \"<string>\"\n }\n },\n \"theme\": {\n \"font\": {\n \"family\": \"<string>\",\n \"sizes\": {\n \"xs\": \"<string>\",\n \"sm\": \"<string>\",\n \"base\": \"<string>\",\n \"lg\": \"<string>\",\n \"xl\": \"<string>\",\n \"2xl\": \"<string>\",\n \"3xl\": \"<string>\",\n \"4xl\": \"<string>\",\n \"5xl\": \"<string>\",\n \"6xl\": \"<string>\"\n }\n },\n \"borderRadius\": \"<string>\",\n \"colors\": {\n \"light\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n },\n \"dark\": {\n \"background\": \"<string>\",\n \"card\": \"<string>\",\n \"cardForeground\": \"<string>\",\n \"foreground\": \"<string>\",\n \"popover\": \"<string>\",\n \"popoverForeground\": \"<string>\",\n \"primary\": \"<string>\",\n \"primaryForeground\": \"<string>\",\n \"secondary\": \"<string>\",\n \"secondaryForeground\": \"<string>\",\n \"muted\": \"<string>\",\n \"mutedForeground\": \"<string>\",\n \"accent\": \"<string>\",\n \"accentForeground\": \"<string>\",\n \"destructive\": \"<string>\",\n \"destructiveForeground\": \"<string>\",\n \"border\": \"<string>\",\n \"input\": \"<string>\",\n \"ring\": \"<string>\",\n \"success\": \"<string>\",\n \"successForeground\": \"<string>\"\n }\n },\n \"disableCardGradients\": true,\n \"hideCommunityDetailsOnCards\": true,\n \"postCardVersion\": \"<string>\",\n \"achievementCardVersion\": \"<string>\",\n \"challengeCardVersion\": \"<string>\",\n \"mobileNav\": {\n \"iconOnly\": true,\n \"fontSize\": \"<string>\"\n },\n \"homeButtonOverrideUrl\": \"<string>\",\n \"orgLogoOverrideUrl\": \"<string>\",\n \"icons\": {},\n \"backgroundImage\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"themeAssets": {
"light": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
},
"dark": {
"logo": "<string>",
"navbarLogo": "<string>",
"favicon": "<string>",
"appleTouchIcon": "<string>"
}
},
"theme": {
"font": {
"family": "<string>",
"sizes": {
"xs": "<string>",
"sm": "<string>",
"base": "<string>",
"lg": "<string>",
"xl": "<string>",
"2xl": "<string>",
"3xl": "<string>",
"4xl": "<string>",
"5xl": "<string>",
"6xl": "<string>"
}
},
"borderRadius": "<string>",
"colors": {
"light": {},
"dark": {}
},
"disableCardGradients": true,
"hideCommunityDetailsOnCards": true,
"postCardVersion": "<string>",
"achievementCardVersion": "<string>",
"challengeCardVersion": "<string>",
"mobileNav": {
"iconOnly": true,
"fontSize": "<string>"
},
"homeButtonOverrideUrl": "<string>",
"orgLogoOverrideUrl": "<string>",
"icons": {},
"backgroundImage": "<string>"
}
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Body
application/json
Was this page helpful?
⌘I

