Publish a help center theme design
curl --request POST \
--url http://localhost:8080/hc/{id}/themes/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"design_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_live_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_tracking_losses": []
}
'import requests
url = "http://localhost:8080/hc/{id}/themes/publish"
payload = {
"design_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_live_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_tracking_losses": []
}
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({
design_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expected_live_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
confirmed_tracking_losses: []
})
};
fetch('http://localhost:8080/hc/{id}/themes/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/hc/{id}/themes/publish",
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([
'design_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revision_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expected_live_revision_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'confirmed_tracking_losses' => [
]
]),
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 := "http://localhost:8080/hc/{id}/themes/publish"
payload := strings.NewReader("{\n \"design_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_live_revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confirmed_tracking_losses\": []\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("http://localhost:8080/hc/{id}/themes/publish")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"design_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_live_revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confirmed_tracking_losses\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/hc/{id}/themes/publish")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"design_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_live_revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confirmed_tracking_losses\": []\n}"
response = http.request(request)
puts response.read_body{
"live_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"statusCode": 400,
"code": "theme_page_check_failed",
"message": "<string>",
"issue": {
"reason": "missing_article_body",
"template": "<string>",
"page": "<string>",
"locale": "<string>",
"title": "<string>"
}
}{
"statusCode": 422,
"code": "theme_tracking_confirmation_required",
"message": "<string>",
"tracking_losses": [
"search_results"
]
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Theme designs
Publish
Make the reviewed revision of a Help Center design live. Supply the current live revision and the latest saved revision of the selected design.
POST
/
hc
/
{id}
/
themes
/
publish
Publish a help center theme design
curl --request POST \
--url http://localhost:8080/hc/{id}/themes/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"design_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_live_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_tracking_losses": []
}
'import requests
url = "http://localhost:8080/hc/{id}/themes/publish"
payload = {
"design_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_live_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmed_tracking_losses": []
}
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({
design_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expected_live_revision_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
confirmed_tracking_losses: []
})
};
fetch('http://localhost:8080/hc/{id}/themes/publish', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/hc/{id}/themes/publish",
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([
'design_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'revision_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expected_live_revision_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'confirmed_tracking_losses' => [
]
]),
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 := "http://localhost:8080/hc/{id}/themes/publish"
payload := strings.NewReader("{\n \"design_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_live_revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confirmed_tracking_losses\": []\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("http://localhost:8080/hc/{id}/themes/publish")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"design_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_live_revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confirmed_tracking_losses\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/hc/{id}/themes/publish")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"design_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_live_revision_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"confirmed_tracking_losses\": []\n}"
response = http.request(request)
puts response.read_body{
"live_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"statusCode": 400,
"code": "theme_page_check_failed",
"message": "<string>",
"issue": {
"reason": "missing_article_body",
"template": "<string>",
"page": "<string>",
"locale": "<string>",
"title": "<string>"
}
}{
"statusCode": 422,
"code": "theme_tracking_confirmation_required",
"message": "<string>",
"tracking_losses": [
"search_results"
]
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Omit
confirmed_tracking_losses on the first call. A 422 with code theme_tracking_confirmation_required leaves the current version live and lists the affected features in tracking_losses. Values are search_results for submitted search results and their clicks, and article_feedback for helpfulness votes. After the editor explicitly accepts the losses, repeat the request for the same revisions with that exact list in confirmed_tracking_losses.
A 400 naming a conditional search or feedback control means the comparison could not determine whether tracking is preserved. Simplify the condition around that control in the named template, preview the draft, and publish the new revision.
Publishing checks sample pages against the site’s current content in each language. A 400 with code theme_page_check_failed includes the page title, language (locale), localized preview path (page), template, and reason in issue. The reason is missing_article_body or render_failed. Correct the draft, preview that path, then publish the new revision.Authorizations
Path Parameters
Body
application/json
Was this page helpful?