Update a help center
curl --request PUT \
--url http://localhost:8080/hc/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"primary_language_code": "<string>",
"translation_prompt": "<string>",
"custom_css": "<string>",
"custom_head_scripts": "<string>",
"robots_txt": "<string>",
"localizations": {},
"page_rankings": {},
"moves_apply_to_all_languages": true
}
'import requests
url = "http://localhost:8080/hc/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"primary_language_code": "<string>",
"translation_prompt": "<string>",
"custom_css": "<string>",
"custom_head_scripts": "<string>",
"robots_txt": "<string>",
"localizations": {},
"page_rankings": {},
"moves_apply_to_all_languages": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
domain: '<string>',
logo_url: '<string>',
primary_language_code: '<string>',
translation_prompt: '<string>',
custom_css: '<string>',
custom_head_scripts: '<string>',
robots_txt: '<string>',
localizations: {},
page_rankings: {},
moves_apply_to_all_languages: true
})
};
fetch('http://localhost:8080/hc/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'domain' => '<string>',
'logo_url' => '<string>',
'primary_language_code' => '<string>',
'translation_prompt' => '<string>',
'custom_css' => '<string>',
'custom_head_scripts' => '<string>',
'robots_txt' => '<string>',
'localizations' => [
],
'page_rankings' => [
],
'moves_apply_to_all_languages' => true
]),
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}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"domain\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"primary_language_code\": \"<string>\",\n \"translation_prompt\": \"<string>\",\n \"custom_css\": \"<string>\",\n \"custom_head_scripts\": \"<string>\",\n \"robots_txt\": \"<string>\",\n \"localizations\": {},\n \"page_rankings\": {},\n \"moves_apply_to_all_languages\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:8080/hc/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"domain\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"primary_language_code\": \"<string>\",\n \"translation_prompt\": \"<string>\",\n \"custom_css\": \"<string>\",\n \"custom_head_scripts\": \"<string>\",\n \"robots_txt\": \"<string>\",\n \"localizations\": {},\n \"page_rankings\": {},\n \"moves_apply_to_all_languages\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/hc/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"domain\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"primary_language_code\": \"<string>\",\n \"translation_prompt\": \"<string>\",\n \"custom_css\": \"<string>\",\n \"custom_head_scripts\": \"<string>\",\n \"robots_txt\": \"<string>\",\n \"localizations\": {},\n \"page_rankings\": {},\n \"moves_apply_to_all_languages\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"primary_language_code": "<string>",
"enabled_languages": [
"<string>"
],
"auto_translate": "on_publish",
"translation_prompt": "<string>",
"custom_css": "<string>",
"custom_head_scripts": "<string>",
"robots_txt": "<string>",
"default_robots_txt": "<string>",
"sidebar_variant": "sidebar",
"theme": "default",
"localizations": {},
"page_rankings": {},
"updated_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Help Center
Update a help center
Change a help center: name, description, domain, logo, custom CSS and head scripts, robots.txt, sidebar layout, translation prompt, per-language overrides, and home page popular searches and articles.
PUT
/
hc
/
{id}
Update a help center
curl --request PUT \
--url http://localhost:8080/hc/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"primary_language_code": "<string>",
"translation_prompt": "<string>",
"custom_css": "<string>",
"custom_head_scripts": "<string>",
"robots_txt": "<string>",
"localizations": {},
"page_rankings": {},
"moves_apply_to_all_languages": true
}
'import requests
url = "http://localhost:8080/hc/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"primary_language_code": "<string>",
"translation_prompt": "<string>",
"custom_css": "<string>",
"custom_head_scripts": "<string>",
"robots_txt": "<string>",
"localizations": {},
"page_rankings": {},
"moves_apply_to_all_languages": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
domain: '<string>',
logo_url: '<string>',
primary_language_code: '<string>',
translation_prompt: '<string>',
custom_css: '<string>',
custom_head_scripts: '<string>',
robots_txt: '<string>',
localizations: {},
page_rankings: {},
moves_apply_to_all_languages: true
})
};
fetch('http://localhost:8080/hc/{id}', 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}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'domain' => '<string>',
'logo_url' => '<string>',
'primary_language_code' => '<string>',
'translation_prompt' => '<string>',
'custom_css' => '<string>',
'custom_head_scripts' => '<string>',
'robots_txt' => '<string>',
'localizations' => [
],
'page_rankings' => [
],
'moves_apply_to_all_languages' => true
]),
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}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"domain\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"primary_language_code\": \"<string>\",\n \"translation_prompt\": \"<string>\",\n \"custom_css\": \"<string>\",\n \"custom_head_scripts\": \"<string>\",\n \"robots_txt\": \"<string>\",\n \"localizations\": {},\n \"page_rankings\": {},\n \"moves_apply_to_all_languages\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:8080/hc/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"domain\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"primary_language_code\": \"<string>\",\n \"translation_prompt\": \"<string>\",\n \"custom_css\": \"<string>\",\n \"custom_head_scripts\": \"<string>\",\n \"robots_txt\": \"<string>\",\n \"localizations\": {},\n \"page_rankings\": {},\n \"moves_apply_to_all_languages\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/hc/{id}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"domain\": \"<string>\",\n \"logo_url\": \"<string>\",\n \"primary_language_code\": \"<string>\",\n \"translation_prompt\": \"<string>\",\n \"custom_css\": \"<string>\",\n \"custom_head_scripts\": \"<string>\",\n \"robots_txt\": \"<string>\",\n \"localizations\": {},\n \"page_rankings\": {},\n \"moves_apply_to_all_languages\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"domain": "<string>",
"logo_url": "<string>",
"primary_language_code": "<string>",
"enabled_languages": [
"<string>"
],
"auto_translate": "on_publish",
"translation_prompt": "<string>",
"custom_css": "<string>",
"custom_head_scripts": "<string>",
"robots_txt": "<string>",
"default_robots_txt": "<string>",
"sidebar_variant": "sidebar",
"theme": "default",
"localizations": {},
"page_rankings": {},
"updated_at": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Omitted fields stay unchanged.
localizations and page_rankings are the exceptions: each replaces the whole stored map, so read the help center first and send every language back.
page_rankings sets the home page’s popular searches and popular articles per language, keyed by language code. A language you leave out, or an empty list, goes back to the site’s automatic picks: the first topics as searches and the first articles. The request is rejected with 400 when it names a language the help center doesn’t serve, an article that isn’t a live article of this help center, more than 3 searches or 6 articles, a blank search term or one longer than 60 characters, or the same search term (ignoring case) or article twice. Articles not published in a language are skipped on the site rather than rejected. A read returns only the languages the help center serves and the articles it still has, so the map you read can be sent back as is. The default home page shows both lists. A published Studio design can display them wherever its layout includes popular articles or popular searches.
robots_txt replaces the robots.txt served at https://<domain>/robots.txt. It is served exactly as sent, up to 16,384 characters; anything longer is rejected with 400. Send null or a blank string to go back to the default, which Get returns as default_robots_txt. Crawlers only read robots.txt at the root of a domain, so it takes effect once the help center has a custom domain.Authorizations
Body
application/json
Response
Default Response
Was this page helpful?