Update Chatbot Settings - Localization
curl --request PATCH \
--url https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"locale": "da",
"chatHome": {
"home": "Home",
"addDetails": "Add details",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessages": {
"messages": "Messages",
"noMessages": "No Messages",
"loginToSeeHistory": "Verify your email to save your conversation history.",
"historyShowsUpHere": "Your conversation history shows up here.",
"verifyEmail": "Verify your email",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessage": {
"botName": "Bot",
"yourName": "You",
"agentName": "Agent",
"escalationHeading": "Are you sure you want to escalate the chat to human support?",
"escalationSubHeading": "This conversation will be shared with the human support and they will get back to you as soon as they can.",
"yesContinue": "Yes, continue",
"cancel": "Cancel",
"conversationEscalated": "👨💼 Conversation changed to human mode"
},
"chatAccount": {
"account": "Account",
"verifyEmail": "Verify your email",
"loginToSeeHistory": "Verify your email to save your chat history.",
"emailLabel": "Email",
"nameLabel": "Name",
"phoneLabel": "Phone Number",
"sendingOtp": "Sending OTP...",
"verifyOtp": "Verify OTP",
"sentOtpToEmail": "We sent the OTP to your email address",
"otp": "OTP",
"verifyAndContinue": "Verify & Continue",
"notReceivedOtpYet": "Didn't receive OTP yet?",
"resend": "Resend",
"editDetails": "Edit Details",
"resetting": "Resetting...",
"verifying": "Verifying...",
"logout": "Logout",
"loggingOut": "Logging out...",
"verified": "Verified",
"edit": "Edit",
"update": "Update",
"updating": "Updating..."
}
}
EOFimport requests
url = "https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization"
payload = {
"locale": "da",
"chatHome": {
"home": "Home",
"addDetails": "Add details",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessages": {
"messages": "Messages",
"noMessages": "No Messages",
"loginToSeeHistory": "Verify your email to save your conversation history.",
"historyShowsUpHere": "Your conversation history shows up here.",
"verifyEmail": "Verify your email",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessage": {
"botName": "Bot",
"yourName": "You",
"agentName": "Agent",
"escalationHeading": "Are you sure you want to escalate the chat to human support?",
"escalationSubHeading": "This conversation will be shared with the human support and they will get back to you as soon as they can.",
"yesContinue": "Yes, continue",
"cancel": "Cancel",
"conversationEscalated": "👨💼 Conversation changed to human mode"
},
"chatAccount": {
"account": "Account",
"verifyEmail": "Verify your email",
"loginToSeeHistory": "Verify your email to save your chat history.",
"emailLabel": "Email",
"nameLabel": "Name",
"phoneLabel": "Phone Number",
"sendingOtp": "Sending OTP...",
"verifyOtp": "Verify OTP",
"sentOtpToEmail": "We sent the OTP to your email address",
"otp": "OTP",
"verifyAndContinue": "Verify & Continue",
"notReceivedOtpYet": "Didn't receive OTP yet?",
"resend": "Resend",
"editDetails": "Edit Details",
"resetting": "Resetting...",
"verifying": "Verifying...",
"logout": "Logout",
"loggingOut": "Logging out...",
"verified": "Verified",
"edit": "Edit",
"update": "Update",
"updating": "Updating..."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locale: 'da',
chatHome: {
home: 'Home',
addDetails: 'Add details',
startConversation: 'Start a conversation',
starting: 'Starting...'
},
chatMessages: {
messages: 'Messages',
noMessages: 'No Messages',
loginToSeeHistory: 'Verify your email to save your conversation history.',
historyShowsUpHere: 'Your conversation history shows up here.',
verifyEmail: 'Verify your email',
startConversation: 'Start a conversation',
starting: 'Starting...'
},
chatMessage: {
botName: 'Bot',
yourName: 'You',
agentName: 'Agent',
escalationHeading: 'Are you sure you want to escalate the chat to human support?',
escalationSubHeading: 'This conversation will be shared with the human support and they will get back to you as soon as they can.',
yesContinue: 'Yes, continue',
cancel: 'Cancel',
conversationEscalated: '👨💼 Conversation changed to human mode'
},
chatAccount: {
account: 'Account',
verifyEmail: 'Verify your email',
loginToSeeHistory: 'Verify your email to save your chat history.',
emailLabel: 'Email',
nameLabel: 'Name',
phoneLabel: 'Phone Number',
sendingOtp: 'Sending OTP...',
verifyOtp: 'Verify OTP',
sentOtpToEmail: 'We sent the OTP to your email address',
otp: 'OTP',
verifyAndContinue: 'Verify & Continue',
notReceivedOtpYet: 'Didn\'t receive OTP yet?',
resend: 'Resend',
editDetails: 'Edit Details',
resetting: 'Resetting...',
verifying: 'Verifying...',
logout: 'Logout',
loggingOut: 'Logging out...',
verified: 'Verified',
edit: 'Edit',
update: 'Update',
updating: 'Updating...'
}
})
};
fetch('https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization', 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://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization",
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([
'locale' => 'da',
'chatHome' => [
'home' => 'Home',
'addDetails' => 'Add details',
'startConversation' => 'Start a conversation',
'starting' => 'Starting...'
],
'chatMessages' => [
'messages' => 'Messages',
'noMessages' => 'No Messages',
'loginToSeeHistory' => 'Verify your email to save your conversation history.',
'historyShowsUpHere' => 'Your conversation history shows up here.',
'verifyEmail' => 'Verify your email',
'startConversation' => 'Start a conversation',
'starting' => 'Starting...'
],
'chatMessage' => [
'botName' => 'Bot',
'yourName' => 'You',
'agentName' => 'Agent',
'escalationHeading' => 'Are you sure you want to escalate the chat to human support?',
'escalationSubHeading' => 'This conversation will be shared with the human support and they will get back to you as soon as they can.',
'yesContinue' => 'Yes, continue',
'cancel' => 'Cancel',
'conversationEscalated' => '👨💼 Conversation changed to human mode'
],
'chatAccount' => [
'account' => 'Account',
'verifyEmail' => 'Verify your email',
'loginToSeeHistory' => 'Verify your email to save your chat history.',
'emailLabel' => 'Email',
'nameLabel' => 'Name',
'phoneLabel' => 'Phone Number',
'sendingOtp' => 'Sending OTP...',
'verifyOtp' => 'Verify OTP',
'sentOtpToEmail' => 'We sent the OTP to your email address',
'otp' => 'OTP',
'verifyAndContinue' => 'Verify & Continue',
'notReceivedOtpYet' => 'Didn\'t receive OTP yet?',
'resend' => 'Resend',
'editDetails' => 'Edit Details',
'resetting' => 'Resetting...',
'verifying' => 'Verifying...',
'logout' => 'Logout',
'loggingOut' => 'Logging out...',
'verified' => 'Verified',
'edit' => 'Edit',
'update' => 'Update',
'updating' => 'Updating...'
]
]),
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://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization"
payload := strings.NewReader("{\n \"locale\": \"da\",\n \"chatHome\": {\n \"home\": \"Home\",\n \"addDetails\": \"Add details\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessages\": {\n \"messages\": \"Messages\",\n \"noMessages\": \"No Messages\",\n \"loginToSeeHistory\": \"Verify your email to save your conversation history.\",\n \"historyShowsUpHere\": \"Your conversation history shows up here.\",\n \"verifyEmail\": \"Verify your email\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessage\": {\n \"botName\": \"Bot\",\n \"yourName\": \"You\",\n \"agentName\": \"Agent\",\n \"escalationHeading\": \"Are you sure you want to escalate the chat to human support?\",\n \"escalationSubHeading\": \"This conversation will be shared with the human support and they will get back to you as soon as they can.\",\n \"yesContinue\": \"Yes, continue\",\n \"cancel\": \"Cancel\",\n \"conversationEscalated\": \"👨💼 Conversation changed to human mode\"\n },\n \"chatAccount\": {\n \"account\": \"Account\",\n \"verifyEmail\": \"Verify your email\",\n \"loginToSeeHistory\": \"Verify your email to save your chat history.\",\n \"emailLabel\": \"Email\",\n \"nameLabel\": \"Name\",\n \"phoneLabel\": \"Phone Number\",\n \"sendingOtp\": \"Sending OTP...\",\n \"verifyOtp\": \"Verify OTP\",\n \"sentOtpToEmail\": \"We sent the OTP to your email address\",\n \"otp\": \"OTP\",\n \"verifyAndContinue\": \"Verify & Continue\",\n \"notReceivedOtpYet\": \"Didn't receive OTP yet?\",\n \"resend\": \"Resend\",\n \"editDetails\": \"Edit Details\",\n \"resetting\": \"Resetting...\",\n \"verifying\": \"Verifying...\",\n \"logout\": \"Logout\",\n \"loggingOut\": \"Logging out...\",\n \"verified\": \"Verified\",\n \"edit\": \"Edit\",\n \"update\": \"Update\",\n \"updating\": \"Updating...\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"da\",\n \"chatHome\": {\n \"home\": \"Home\",\n \"addDetails\": \"Add details\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessages\": {\n \"messages\": \"Messages\",\n \"noMessages\": \"No Messages\",\n \"loginToSeeHistory\": \"Verify your email to save your conversation history.\",\n \"historyShowsUpHere\": \"Your conversation history shows up here.\",\n \"verifyEmail\": \"Verify your email\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessage\": {\n \"botName\": \"Bot\",\n \"yourName\": \"You\",\n \"agentName\": \"Agent\",\n \"escalationHeading\": \"Are you sure you want to escalate the chat to human support?\",\n \"escalationSubHeading\": \"This conversation will be shared with the human support and they will get back to you as soon as they can.\",\n \"yesContinue\": \"Yes, continue\",\n \"cancel\": \"Cancel\",\n \"conversationEscalated\": \"👨💼 Conversation changed to human mode\"\n },\n \"chatAccount\": {\n \"account\": \"Account\",\n \"verifyEmail\": \"Verify your email\",\n \"loginToSeeHistory\": \"Verify your email to save your chat history.\",\n \"emailLabel\": \"Email\",\n \"nameLabel\": \"Name\",\n \"phoneLabel\": \"Phone Number\",\n \"sendingOtp\": \"Sending OTP...\",\n \"verifyOtp\": \"Verify OTP\",\n \"sentOtpToEmail\": \"We sent the OTP to your email address\",\n \"otp\": \"OTP\",\n \"verifyAndContinue\": \"Verify & Continue\",\n \"notReceivedOtpYet\": \"Didn't receive OTP yet?\",\n \"resend\": \"Resend\",\n \"editDetails\": \"Edit Details\",\n \"resetting\": \"Resetting...\",\n \"verifying\": \"Verifying...\",\n \"logout\": \"Logout\",\n \"loggingOut\": \"Logging out...\",\n \"verified\": \"Verified\",\n \"edit\": \"Edit\",\n \"update\": \"Update\",\n \"updating\": \"Updating...\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"da\",\n \"chatHome\": {\n \"home\": \"Home\",\n \"addDetails\": \"Add details\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessages\": {\n \"messages\": \"Messages\",\n \"noMessages\": \"No Messages\",\n \"loginToSeeHistory\": \"Verify your email to save your conversation history.\",\n \"historyShowsUpHere\": \"Your conversation history shows up here.\",\n \"verifyEmail\": \"Verify your email\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessage\": {\n \"botName\": \"Bot\",\n \"yourName\": \"You\",\n \"agentName\": \"Agent\",\n \"escalationHeading\": \"Are you sure you want to escalate the chat to human support?\",\n \"escalationSubHeading\": \"This conversation will be shared with the human support and they will get back to you as soon as they can.\",\n \"yesContinue\": \"Yes, continue\",\n \"cancel\": \"Cancel\",\n \"conversationEscalated\": \"👨💼 Conversation changed to human mode\"\n },\n \"chatAccount\": {\n \"account\": \"Account\",\n \"verifyEmail\": \"Verify your email\",\n \"loginToSeeHistory\": \"Verify your email to save your chat history.\",\n \"emailLabel\": \"Email\",\n \"nameLabel\": \"Name\",\n \"phoneLabel\": \"Phone Number\",\n \"sendingOtp\": \"Sending OTP...\",\n \"verifyOtp\": \"Verify OTP\",\n \"sentOtpToEmail\": \"We sent the OTP to your email address\",\n \"otp\": \"OTP\",\n \"verifyAndContinue\": \"Verify & Continue\",\n \"notReceivedOtpYet\": \"Didn't receive OTP yet?\",\n \"resend\": \"Resend\",\n \"editDetails\": \"Edit Details\",\n \"resetting\": \"Resetting...\",\n \"verifying\": \"Verifying...\",\n \"logout\": \"Logout\",\n \"loggingOut\": \"Logging out...\",\n \"verified\": \"Verified\",\n \"edit\": \"Edit\",\n \"update\": \"Update\",\n \"updating\": \"Updating...\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Updated localization settings of the chatbot successfully",
"data": {}
}Settings
Update Chatbot Settings - Localization
Update localization settings of the chatbot
PATCH
/
v0
/
chatbots
/
{chatbotId}
/
settings
/
localization
Update Chatbot Settings - Localization
curl --request PATCH \
--url https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"locale": "da",
"chatHome": {
"home": "Home",
"addDetails": "Add details",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessages": {
"messages": "Messages",
"noMessages": "No Messages",
"loginToSeeHistory": "Verify your email to save your conversation history.",
"historyShowsUpHere": "Your conversation history shows up here.",
"verifyEmail": "Verify your email",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessage": {
"botName": "Bot",
"yourName": "You",
"agentName": "Agent",
"escalationHeading": "Are you sure you want to escalate the chat to human support?",
"escalationSubHeading": "This conversation will be shared with the human support and they will get back to you as soon as they can.",
"yesContinue": "Yes, continue",
"cancel": "Cancel",
"conversationEscalated": "👨💼 Conversation changed to human mode"
},
"chatAccount": {
"account": "Account",
"verifyEmail": "Verify your email",
"loginToSeeHistory": "Verify your email to save your chat history.",
"emailLabel": "Email",
"nameLabel": "Name",
"phoneLabel": "Phone Number",
"sendingOtp": "Sending OTP...",
"verifyOtp": "Verify OTP",
"sentOtpToEmail": "We sent the OTP to your email address",
"otp": "OTP",
"verifyAndContinue": "Verify & Continue",
"notReceivedOtpYet": "Didn't receive OTP yet?",
"resend": "Resend",
"editDetails": "Edit Details",
"resetting": "Resetting...",
"verifying": "Verifying...",
"logout": "Logout",
"loggingOut": "Logging out...",
"verified": "Verified",
"edit": "Edit",
"update": "Update",
"updating": "Updating..."
}
}
EOFimport requests
url = "https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization"
payload = {
"locale": "da",
"chatHome": {
"home": "Home",
"addDetails": "Add details",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessages": {
"messages": "Messages",
"noMessages": "No Messages",
"loginToSeeHistory": "Verify your email to save your conversation history.",
"historyShowsUpHere": "Your conversation history shows up here.",
"verifyEmail": "Verify your email",
"startConversation": "Start a conversation",
"starting": "Starting..."
},
"chatMessage": {
"botName": "Bot",
"yourName": "You",
"agentName": "Agent",
"escalationHeading": "Are you sure you want to escalate the chat to human support?",
"escalationSubHeading": "This conversation will be shared with the human support and they will get back to you as soon as they can.",
"yesContinue": "Yes, continue",
"cancel": "Cancel",
"conversationEscalated": "👨💼 Conversation changed to human mode"
},
"chatAccount": {
"account": "Account",
"verifyEmail": "Verify your email",
"loginToSeeHistory": "Verify your email to save your chat history.",
"emailLabel": "Email",
"nameLabel": "Name",
"phoneLabel": "Phone Number",
"sendingOtp": "Sending OTP...",
"verifyOtp": "Verify OTP",
"sentOtpToEmail": "We sent the OTP to your email address",
"otp": "OTP",
"verifyAndContinue": "Verify & Continue",
"notReceivedOtpYet": "Didn't receive OTP yet?",
"resend": "Resend",
"editDetails": "Edit Details",
"resetting": "Resetting...",
"verifying": "Verifying...",
"logout": "Logout",
"loggingOut": "Logging out...",
"verified": "Verified",
"edit": "Edit",
"update": "Update",
"updating": "Updating..."
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locale: 'da',
chatHome: {
home: 'Home',
addDetails: 'Add details',
startConversation: 'Start a conversation',
starting: 'Starting...'
},
chatMessages: {
messages: 'Messages',
noMessages: 'No Messages',
loginToSeeHistory: 'Verify your email to save your conversation history.',
historyShowsUpHere: 'Your conversation history shows up here.',
verifyEmail: 'Verify your email',
startConversation: 'Start a conversation',
starting: 'Starting...'
},
chatMessage: {
botName: 'Bot',
yourName: 'You',
agentName: 'Agent',
escalationHeading: 'Are you sure you want to escalate the chat to human support?',
escalationSubHeading: 'This conversation will be shared with the human support and they will get back to you as soon as they can.',
yesContinue: 'Yes, continue',
cancel: 'Cancel',
conversationEscalated: '👨💼 Conversation changed to human mode'
},
chatAccount: {
account: 'Account',
verifyEmail: 'Verify your email',
loginToSeeHistory: 'Verify your email to save your chat history.',
emailLabel: 'Email',
nameLabel: 'Name',
phoneLabel: 'Phone Number',
sendingOtp: 'Sending OTP...',
verifyOtp: 'Verify OTP',
sentOtpToEmail: 'We sent the OTP to your email address',
otp: 'OTP',
verifyAndContinue: 'Verify & Continue',
notReceivedOtpYet: 'Didn\'t receive OTP yet?',
resend: 'Resend',
editDetails: 'Edit Details',
resetting: 'Resetting...',
verifying: 'Verifying...',
logout: 'Logout',
loggingOut: 'Logging out...',
verified: 'Verified',
edit: 'Edit',
update: 'Update',
updating: 'Updating...'
}
})
};
fetch('https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization', 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://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization",
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([
'locale' => 'da',
'chatHome' => [
'home' => 'Home',
'addDetails' => 'Add details',
'startConversation' => 'Start a conversation',
'starting' => 'Starting...'
],
'chatMessages' => [
'messages' => 'Messages',
'noMessages' => 'No Messages',
'loginToSeeHistory' => 'Verify your email to save your conversation history.',
'historyShowsUpHere' => 'Your conversation history shows up here.',
'verifyEmail' => 'Verify your email',
'startConversation' => 'Start a conversation',
'starting' => 'Starting...'
],
'chatMessage' => [
'botName' => 'Bot',
'yourName' => 'You',
'agentName' => 'Agent',
'escalationHeading' => 'Are you sure you want to escalate the chat to human support?',
'escalationSubHeading' => 'This conversation will be shared with the human support and they will get back to you as soon as they can.',
'yesContinue' => 'Yes, continue',
'cancel' => 'Cancel',
'conversationEscalated' => '👨💼 Conversation changed to human mode'
],
'chatAccount' => [
'account' => 'Account',
'verifyEmail' => 'Verify your email',
'loginToSeeHistory' => 'Verify your email to save your chat history.',
'emailLabel' => 'Email',
'nameLabel' => 'Name',
'phoneLabel' => 'Phone Number',
'sendingOtp' => 'Sending OTP...',
'verifyOtp' => 'Verify OTP',
'sentOtpToEmail' => 'We sent the OTP to your email address',
'otp' => 'OTP',
'verifyAndContinue' => 'Verify & Continue',
'notReceivedOtpYet' => 'Didn\'t receive OTP yet?',
'resend' => 'Resend',
'editDetails' => 'Edit Details',
'resetting' => 'Resetting...',
'verifying' => 'Verifying...',
'logout' => 'Logout',
'loggingOut' => 'Logging out...',
'verified' => 'Verified',
'edit' => 'Edit',
'update' => 'Update',
'updating' => 'Updating...'
]
]),
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://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization"
payload := strings.NewReader("{\n \"locale\": \"da\",\n \"chatHome\": {\n \"home\": \"Home\",\n \"addDetails\": \"Add details\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessages\": {\n \"messages\": \"Messages\",\n \"noMessages\": \"No Messages\",\n \"loginToSeeHistory\": \"Verify your email to save your conversation history.\",\n \"historyShowsUpHere\": \"Your conversation history shows up here.\",\n \"verifyEmail\": \"Verify your email\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessage\": {\n \"botName\": \"Bot\",\n \"yourName\": \"You\",\n \"agentName\": \"Agent\",\n \"escalationHeading\": \"Are you sure you want to escalate the chat to human support?\",\n \"escalationSubHeading\": \"This conversation will be shared with the human support and they will get back to you as soon as they can.\",\n \"yesContinue\": \"Yes, continue\",\n \"cancel\": \"Cancel\",\n \"conversationEscalated\": \"👨💼 Conversation changed to human mode\"\n },\n \"chatAccount\": {\n \"account\": \"Account\",\n \"verifyEmail\": \"Verify your email\",\n \"loginToSeeHistory\": \"Verify your email to save your chat history.\",\n \"emailLabel\": \"Email\",\n \"nameLabel\": \"Name\",\n \"phoneLabel\": \"Phone Number\",\n \"sendingOtp\": \"Sending OTP...\",\n \"verifyOtp\": \"Verify OTP\",\n \"sentOtpToEmail\": \"We sent the OTP to your email address\",\n \"otp\": \"OTP\",\n \"verifyAndContinue\": \"Verify & Continue\",\n \"notReceivedOtpYet\": \"Didn't receive OTP yet?\",\n \"resend\": \"Resend\",\n \"editDetails\": \"Edit Details\",\n \"resetting\": \"Resetting...\",\n \"verifying\": \"Verifying...\",\n \"logout\": \"Logout\",\n \"loggingOut\": \"Logging out...\",\n \"verified\": \"Verified\",\n \"edit\": \"Edit\",\n \"update\": \"Update\",\n \"updating\": \"Updating...\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"da\",\n \"chatHome\": {\n \"home\": \"Home\",\n \"addDetails\": \"Add details\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessages\": {\n \"messages\": \"Messages\",\n \"noMessages\": \"No Messages\",\n \"loginToSeeHistory\": \"Verify your email to save your conversation history.\",\n \"historyShowsUpHere\": \"Your conversation history shows up here.\",\n \"verifyEmail\": \"Verify your email\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessage\": {\n \"botName\": \"Bot\",\n \"yourName\": \"You\",\n \"agentName\": \"Agent\",\n \"escalationHeading\": \"Are you sure you want to escalate the chat to human support?\",\n \"escalationSubHeading\": \"This conversation will be shared with the human support and they will get back to you as soon as they can.\",\n \"yesContinue\": \"Yes, continue\",\n \"cancel\": \"Cancel\",\n \"conversationEscalated\": \"👨💼 Conversation changed to human mode\"\n },\n \"chatAccount\": {\n \"account\": \"Account\",\n \"verifyEmail\": \"Verify your email\",\n \"loginToSeeHistory\": \"Verify your email to save your chat history.\",\n \"emailLabel\": \"Email\",\n \"nameLabel\": \"Name\",\n \"phoneLabel\": \"Phone Number\",\n \"sendingOtp\": \"Sending OTP...\",\n \"verifyOtp\": \"Verify OTP\",\n \"sentOtpToEmail\": \"We sent the OTP to your email address\",\n \"otp\": \"OTP\",\n \"verifyAndContinue\": \"Verify & Continue\",\n \"notReceivedOtpYet\": \"Didn't receive OTP yet?\",\n \"resend\": \"Resend\",\n \"editDetails\": \"Edit Details\",\n \"resetting\": \"Resetting...\",\n \"verifying\": \"Verifying...\",\n \"logout\": \"Logout\",\n \"loggingOut\": \"Logging out...\",\n \"verified\": \"Verified\",\n \"edit\": \"Edit\",\n \"update\": \"Update\",\n \"updating\": \"Updating...\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitegpt.ai/api/v0/chatbots/{chatbotId}/settings/localization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"da\",\n \"chatHome\": {\n \"home\": \"Home\",\n \"addDetails\": \"Add details\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessages\": {\n \"messages\": \"Messages\",\n \"noMessages\": \"No Messages\",\n \"loginToSeeHistory\": \"Verify your email to save your conversation history.\",\n \"historyShowsUpHere\": \"Your conversation history shows up here.\",\n \"verifyEmail\": \"Verify your email\",\n \"startConversation\": \"Start a conversation\",\n \"starting\": \"Starting...\"\n },\n \"chatMessage\": {\n \"botName\": \"Bot\",\n \"yourName\": \"You\",\n \"agentName\": \"Agent\",\n \"escalationHeading\": \"Are you sure you want to escalate the chat to human support?\",\n \"escalationSubHeading\": \"This conversation will be shared with the human support and they will get back to you as soon as they can.\",\n \"yesContinue\": \"Yes, continue\",\n \"cancel\": \"Cancel\",\n \"conversationEscalated\": \"👨💼 Conversation changed to human mode\"\n },\n \"chatAccount\": {\n \"account\": \"Account\",\n \"verifyEmail\": \"Verify your email\",\n \"loginToSeeHistory\": \"Verify your email to save your chat history.\",\n \"emailLabel\": \"Email\",\n \"nameLabel\": \"Name\",\n \"phoneLabel\": \"Phone Number\",\n \"sendingOtp\": \"Sending OTP...\",\n \"verifyOtp\": \"Verify OTP\",\n \"sentOtpToEmail\": \"We sent the OTP to your email address\",\n \"otp\": \"OTP\",\n \"verifyAndContinue\": \"Verify & Continue\",\n \"notReceivedOtpYet\": \"Didn't receive OTP yet?\",\n \"resend\": \"Resend\",\n \"editDetails\": \"Edit Details\",\n \"resetting\": \"Resetting...\",\n \"verifying\": \"Verifying...\",\n \"logout\": \"Logout\",\n \"loggingOut\": \"Logging out...\",\n \"verified\": \"Verified\",\n \"edit\": \"Edit\",\n \"update\": \"Update\",\n \"updating\": \"Updating...\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Updated localization settings of the chatbot successfully",
"data": {}
}Authorizations
Body
application/json
Request body to update localization settings of the chatbot
Request Body. A group omitted from the body is reset to its defaults; a group that is present is merged key-by-key into the stored group. locale omitted or null resets to English.
Was this page helpful?