Create theme font
curl --request POST \
--url https://{your-subdomain}.neetokb.com/api/external/v2/themes/{theme_id}/fonts \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"font": {
"name": "Roboto",
"weights": "400,700"
}
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({font: {name: 'Roboto', weights: '400,700'}})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/themes/{theme_id}/fonts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetokb.com/api/external/v2/themes/{theme_id}/fonts"
payload = { "font": {
"name": "Roboto",
"weights": "400,700"
} }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"font": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Roboto",
"weights": "400,700"
}
}{
"error": "Not found."
}{
"error": "Name can't be blank."
}Themes
Create theme font
This API adds a Google font to a custom theme. name is required. Built-in themes return 422. For CLI sessions, this needs the Manage themes permission.
POST
/
themes
/
{theme_id}
/
fonts
Create theme font
curl --request POST \
--url https://{your-subdomain}.neetokb.com/api/external/v2/themes/{theme_id}/fonts \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"font": {
"name": "Roboto",
"weights": "400,700"
}
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({font: {name: 'Roboto', weights: '400,700'}})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/themes/{theme_id}/fonts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetokb.com/api/external/v2/themes/{theme_id}/fonts"
payload = { "font": {
"name": "Roboto",
"weights": "400,700"
} }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"font": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Roboto",
"weights": "400,700"
}
}{
"error": "Not found."
}{
"error": "Name can't be blank."
}Replace
Learn how to find your subdomain in Workspace subdomain.
{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Unique identifier of the theme. Get it from List themes.
Body
application/json