Create a blog theme version
curl --request POST \
--url https://{notifuseDomain}/api/blogThemes.create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": {
"home.liquid": "<string>",
"category.liquid": "<string>",
"post.liquid": "<string>",
"header.liquid": "<string>",
"footer.liquid": "<string>",
"shared.liquid": "<string>",
"styles.css": "<string>",
"scripts.js": "<string>"
},
"notes": "Darker header, larger body text."
}
'import requests
url = "https://{notifuseDomain}/api/blogThemes.create"
payload = {
"files": {
"home.liquid": "<string>",
"category.liquid": "<string>",
"post.liquid": "<string>",
"header.liquid": "<string>",
"footer.liquid": "<string>",
"shared.liquid": "<string>",
"styles.css": "<string>",
"scripts.js": "<string>"
},
"notes": "Darker header, larger body text."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
files: {
'home.liquid': '<string>',
'category.liquid': '<string>',
'post.liquid': '<string>',
'header.liquid': '<string>',
'footer.liquid': '<string>',
'shared.liquid': '<string>',
'styles.css': '<string>',
'scripts.js': '<string>'
},
notes: 'Darker header, larger body text.'
})
};
fetch('https://{notifuseDomain}/api/blogThemes.create', 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://{notifuseDomain}/api/blogThemes.create",
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([
'files' => [
'home.liquid' => '<string>',
'category.liquid' => '<string>',
'post.liquid' => '<string>',
'header.liquid' => '<string>',
'footer.liquid' => '<string>',
'shared.liquid' => '<string>',
'styles.css' => '<string>',
'scripts.js' => '<string>'
],
'notes' => 'Darker header, larger body text.'
]),
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://{notifuseDomain}/api/blogThemes.create"
payload := strings.NewReader("{\n \"files\": {\n \"home.liquid\": \"<string>\",\n \"category.liquid\": \"<string>\",\n \"post.liquid\": \"<string>\",\n \"header.liquid\": \"<string>\",\n \"footer.liquid\": \"<string>\",\n \"shared.liquid\": \"<string>\",\n \"styles.css\": \"<string>\",\n \"scripts.js\": \"<string>\"\n },\n \"notes\": \"Darker header, larger body text.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{notifuseDomain}/api/blogThemes.create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": {\n \"home.liquid\": \"<string>\",\n \"category.liquid\": \"<string>\",\n \"post.liquid\": \"<string>\",\n \"header.liquid\": \"<string>\",\n \"footer.liquid\": \"<string>\",\n \"shared.liquid\": \"<string>\",\n \"styles.css\": \"<string>\",\n \"scripts.js\": \"<string>\"\n },\n \"notes\": \"Darker header, larger body text.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogThemes.create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": {\n \"home.liquid\": \"<string>\",\n \"category.liquid\": \"<string>\",\n \"post.liquid\": \"<string>\",\n \"header.liquid\": \"<string>\",\n \"footer.liquid\": \"<string>\",\n \"shared.liquid\": \"<string>\",\n \"styles.css\": \"<string>\",\n \"scripts.js\": \"<string>\"\n },\n \"notes\": \"Darker header, larger body text.\"\n}"
response = http.request(request)
puts response.read_body{
"theme": {
"version": 4,
"files": {
"home.liquid": "<string>",
"category.liquid": "<string>",
"post.liquid": "<string>",
"header.liquid": "<string>",
"footer.liquid": "<string>",
"shared.liquid": "<string>",
"styles.css": "<string>",
"scripts.js": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"published_by_user_id": "<string>",
"notes": "Darker header, larger body text."
}
}{
"error": "Invalid request body"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: write access to blog required",
"resource": "blog",
"permission": "write"
}{
"error": "<string>"
}Blog
Create a blog theme version
Saves a new, unpublished theme version, numbered one above the highest existing version. Files left out are stored empty. Nothing changes on the blog until the version is published. Requires the blog write permission.
POST
/
api
/
blogThemes.create
Create a blog theme version
curl --request POST \
--url https://{notifuseDomain}/api/blogThemes.create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": {
"home.liquid": "<string>",
"category.liquid": "<string>",
"post.liquid": "<string>",
"header.liquid": "<string>",
"footer.liquid": "<string>",
"shared.liquid": "<string>",
"styles.css": "<string>",
"scripts.js": "<string>"
},
"notes": "Darker header, larger body text."
}
'import requests
url = "https://{notifuseDomain}/api/blogThemes.create"
payload = {
"files": {
"home.liquid": "<string>",
"category.liquid": "<string>",
"post.liquid": "<string>",
"header.liquid": "<string>",
"footer.liquid": "<string>",
"shared.liquid": "<string>",
"styles.css": "<string>",
"scripts.js": "<string>"
},
"notes": "Darker header, larger body text."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
files: {
'home.liquid': '<string>',
'category.liquid': '<string>',
'post.liquid': '<string>',
'header.liquid': '<string>',
'footer.liquid': '<string>',
'shared.liquid': '<string>',
'styles.css': '<string>',
'scripts.js': '<string>'
},
notes: 'Darker header, larger body text.'
})
};
fetch('https://{notifuseDomain}/api/blogThemes.create', 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://{notifuseDomain}/api/blogThemes.create",
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([
'files' => [
'home.liquid' => '<string>',
'category.liquid' => '<string>',
'post.liquid' => '<string>',
'header.liquid' => '<string>',
'footer.liquid' => '<string>',
'shared.liquid' => '<string>',
'styles.css' => '<string>',
'scripts.js' => '<string>'
],
'notes' => 'Darker header, larger body text.'
]),
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://{notifuseDomain}/api/blogThemes.create"
payload := strings.NewReader("{\n \"files\": {\n \"home.liquid\": \"<string>\",\n \"category.liquid\": \"<string>\",\n \"post.liquid\": \"<string>\",\n \"header.liquid\": \"<string>\",\n \"footer.liquid\": \"<string>\",\n \"shared.liquid\": \"<string>\",\n \"styles.css\": \"<string>\",\n \"scripts.js\": \"<string>\"\n },\n \"notes\": \"Darker header, larger body text.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://{notifuseDomain}/api/blogThemes.create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"files\": {\n \"home.liquid\": \"<string>\",\n \"category.liquid\": \"<string>\",\n \"post.liquid\": \"<string>\",\n \"header.liquid\": \"<string>\",\n \"footer.liquid\": \"<string>\",\n \"shared.liquid\": \"<string>\",\n \"styles.css\": \"<string>\",\n \"scripts.js\": \"<string>\"\n },\n \"notes\": \"Darker header, larger body text.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{notifuseDomain}/api/blogThemes.create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"files\": {\n \"home.liquid\": \"<string>\",\n \"category.liquid\": \"<string>\",\n \"post.liquid\": \"<string>\",\n \"header.liquid\": \"<string>\",\n \"footer.liquid\": \"<string>\",\n \"shared.liquid\": \"<string>\",\n \"styles.css\": \"<string>\",\n \"scripts.js\": \"<string>\"\n },\n \"notes\": \"Darker header, larger body text.\"\n}"
response = http.request(request)
puts response.read_body{
"theme": {
"version": 4,
"files": {
"home.liquid": "<string>",
"category.liquid": "<string>",
"post.liquid": "<string>",
"header.liquid": "<string>",
"footer.liquid": "<string>",
"shared.liquid": "<string>",
"styles.css": "<string>",
"scripts.js": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"published_by_user_id": "<string>",
"notes": "Darker header, larger body text."
}
}{
"error": "Invalid request body"
}{
"error": "<string>"
}{
"error": "Insufficient permissions: write access to blog required",
"resource": "blog",
"permission": "write"
}{
"error": "<string>"
}Authorizations
API token for authentication
Query Parameters
The ID of the workspace. Passed in the query string, not the body.
Body
application/json
Response
Theme version created
Show child attributes
Show child attributes
