Change the brand voice
curl --request PATCH \
--url https://www.getsurfaced.ai/api/v1/settings/brand-voice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Id: <x-workspace-id>' \
--data '
{
"emotionalTones": [],
"personalities": [],
"persuasionStyles": [],
"syntaxPatterns": [
"<string>"
],
"forbiddenCategories": [],
"customBlacklist": [
"<string>"
]
}
'import requests
url = "https://www.getsurfaced.ai/api/v1/settings/brand-voice"
payload = {
"emotionalTones": [],
"personalities": [],
"persuasionStyles": [],
"syntaxPatterns": ["<string>"],
"forbiddenCategories": [],
"customBlacklist": ["<string>"]
}
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Workspace-Id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
emotionalTones: [],
personalities: [],
persuasionStyles: [],
syntaxPatterns: ['<string>'],
forbiddenCategories: [],
customBlacklist: ['<string>']
})
};
fetch('https://www.getsurfaced.ai/api/v1/settings/brand-voice', 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://www.getsurfaced.ai/api/v1/settings/brand-voice",
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([
'emotionalTones' => [
],
'personalities' => [
],
'persuasionStyles' => [
],
'syntaxPatterns' => [
'<string>'
],
'forbiddenCategories' => [
],
'customBlacklist' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/settings/brand-voice"
payload := strings.NewReader("{\n \"emotionalTones\": [],\n \"personalities\": [],\n \"persuasionStyles\": [],\n \"syntaxPatterns\": [\n \"<string>\"\n ],\n \"forbiddenCategories\": [],\n \"customBlacklist\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
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.patch("https://www.getsurfaced.ai/api/v1/settings/brand-voice")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emotionalTones\": [],\n \"personalities\": [],\n \"persuasionStyles\": [],\n \"syntaxPatterns\": [\n \"<string>\"\n ],\n \"forbiddenCategories\": [],\n \"customBlacklist\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/settings/brand-voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emotionalTones\": [],\n \"personalities\": [],\n \"persuasionStyles\": [],\n \"syntaxPatterns\": [\n \"<string>\"\n ],\n \"forbiddenCategories\": [],\n \"customBlacklist\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"formality": "casual",
"emotionalTones": [
"warm"
],
"energyLevel": "calm",
"sentenceStyle": "short",
"pointOfView": "first-singular",
"audienceExpertise": "beginner",
"jargonLevel": "plain",
"personalities": [
"friendly"
],
"persuasionStyles": [
"educational"
],
"addressFormality": "informal",
"syntaxPatterns": [
"<string>"
],
"forbiddenCategories": [
"hyperbole"
],
"customBlacklist": [
"<string>"
]
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Settings
Change the brand voice
Partial update: send only the fields to change; omitted fields keep their value. Send at least one field, and nothing the schema does not list. Arrays (emotionalTones, customBlacklist, …) replace the stored array whole. At most 2 emotional tones, personalities and persuasion styles; at most 20 blacklist entries of up to 3 words. The change applies to content generated afterwards, not to existing pages. Needs the manage_settings permission (workspace owner or manager).
PATCH
/
settings
/
brand-voice
Change the brand voice
curl --request PATCH \
--url https://www.getsurfaced.ai/api/v1/settings/brand-voice \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Id: <x-workspace-id>' \
--data '
{
"emotionalTones": [],
"personalities": [],
"persuasionStyles": [],
"syntaxPatterns": [
"<string>"
],
"forbiddenCategories": [],
"customBlacklist": [
"<string>"
]
}
'import requests
url = "https://www.getsurfaced.ai/api/v1/settings/brand-voice"
payload = {
"emotionalTones": [],
"personalities": [],
"persuasionStyles": [],
"syntaxPatterns": ["<string>"],
"forbiddenCategories": [],
"customBlacklist": ["<string>"]
}
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'X-Workspace-Id': '<x-workspace-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
emotionalTones: [],
personalities: [],
persuasionStyles: [],
syntaxPatterns: ['<string>'],
forbiddenCategories: [],
customBlacklist: ['<string>']
})
};
fetch('https://www.getsurfaced.ai/api/v1/settings/brand-voice', 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://www.getsurfaced.ai/api/v1/settings/brand-voice",
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([
'emotionalTones' => [
],
'personalities' => [
],
'persuasionStyles' => [
],
'syntaxPatterns' => [
'<string>'
],
'forbiddenCategories' => [
],
'customBlacklist' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/settings/brand-voice"
payload := strings.NewReader("{\n \"emotionalTones\": [],\n \"personalities\": [],\n \"persuasionStyles\": [],\n \"syntaxPatterns\": [\n \"<string>\"\n ],\n \"forbiddenCategories\": [],\n \"customBlacklist\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
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.patch("https://www.getsurfaced.ai/api/v1/settings/brand-voice")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"emotionalTones\": [],\n \"personalities\": [],\n \"persuasionStyles\": [],\n \"syntaxPatterns\": [\n \"<string>\"\n ],\n \"forbiddenCategories\": [],\n \"customBlacklist\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/settings/brand-voice")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emotionalTones\": [],\n \"personalities\": [],\n \"persuasionStyles\": [],\n \"syntaxPatterns\": [\n \"<string>\"\n ],\n \"forbiddenCategories\": [],\n \"customBlacklist\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"formality": "casual",
"emotionalTones": [
"warm"
],
"energyLevel": "calm",
"sentenceStyle": "short",
"pointOfView": "first-singular",
"audienceExpertise": "beginner",
"jargonLevel": "plain",
"personalities": [
"friendly"
],
"persuasionStyles": [
"educational"
],
"addressFormality": "informal",
"syntaxPatterns": [
"<string>"
],
"forbiddenCategories": [
"hyperbole"
],
"customBlacklist": [
"<string>"
]
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Authorizations
API key (sk_live_...) created at https://www.getsurfaced.ai/app/settings/account/api-keys
Headers
Body
application/json