Update an agent's widget settings
curl --request PATCH \
--url https://app.pepline.ai/api/v1/agents/{slug}/widget_setting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"consent_text": "<string>",
"offline_message": "<string>",
"offline_cta": {},
"locale_default": "<string>",
"allowed_domains": [
"<string>"
],
"theme": {},
"hosted_page": {},
"translations": {},
"chrome": {},
"daily_credit_budget": 123
}
'import requests
url = "https://app.pepline.ai/api/v1/agents/{slug}/widget_setting"
payload = {
"consent_text": "<string>",
"offline_message": "<string>",
"offline_cta": {},
"locale_default": "<string>",
"allowed_domains": ["<string>"],
"theme": {},
"hosted_page": {},
"translations": {},
"chrome": {},
"daily_credit_budget": 123
}
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({
consent_text: '<string>',
offline_message: '<string>',
offline_cta: {},
locale_default: '<string>',
allowed_domains: ['<string>'],
theme: {},
hosted_page: {},
translations: {},
chrome: {},
daily_credit_budget: 123
})
};
fetch('https://app.pepline.ai/api/v1/agents/{slug}/widget_setting', 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://app.pepline.ai/api/v1/agents/{slug}/widget_setting",
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([
'consent_text' => '<string>',
'offline_message' => '<string>',
'offline_cta' => [
],
'locale_default' => '<string>',
'allowed_domains' => [
'<string>'
],
'theme' => [
],
'hosted_page' => [
],
'translations' => [
],
'chrome' => [
],
'daily_credit_budget' => 123
]),
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://app.pepline.ai/api/v1/agents/{slug}/widget_setting"
payload := strings.NewReader("{\n \"consent_text\": \"<string>\",\n \"offline_message\": \"<string>\",\n \"offline_cta\": {},\n \"locale_default\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"theme\": {},\n \"hosted_page\": {},\n \"translations\": {},\n \"chrome\": {},\n \"daily_credit_budget\": 123\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://app.pepline.ai/api/v1/agents/{slug}/widget_setting")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"consent_text\": \"<string>\",\n \"offline_message\": \"<string>\",\n \"offline_cta\": {},\n \"locale_default\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"theme\": {},\n \"hosted_page\": {},\n \"translations\": {},\n \"chrome\": {},\n \"daily_credit_budget\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/agents/{slug}/widget_setting")
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 \"consent_text\": \"<string>\",\n \"offline_message\": \"<string>\",\n \"offline_cta\": {},\n \"locale_default\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"theme\": {},\n \"hosted_page\": {},\n \"translations\": {},\n \"chrome\": {},\n \"daily_credit_budget\": 123\n}"
response = http.request(request)
puts response.read_body{
"object": "<string>",
"agent": "<string>",
"locale_default": "<string>",
"consent_text": "<string>",
"offline_message": "<string>",
"offline_cta": {},
"allowed_domains": [
"<string>"
],
"theme": {},
"hosted_page": {},
"translations": {},
"chrome": {},
"daily_credit_budget": 123
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}Agents
Update an agent's widget settings
Runtime knobs — changes serve immediately. translations merges field-by-field per locale (partial payloads never clobber sibling fields); everything else replaces what it names.
PATCH
/
agents
/
{slug}
/
widget_setting
Update an agent's widget settings
curl --request PATCH \
--url https://app.pepline.ai/api/v1/agents/{slug}/widget_setting \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"consent_text": "<string>",
"offline_message": "<string>",
"offline_cta": {},
"locale_default": "<string>",
"allowed_domains": [
"<string>"
],
"theme": {},
"hosted_page": {},
"translations": {},
"chrome": {},
"daily_credit_budget": 123
}
'import requests
url = "https://app.pepline.ai/api/v1/agents/{slug}/widget_setting"
payload = {
"consent_text": "<string>",
"offline_message": "<string>",
"offline_cta": {},
"locale_default": "<string>",
"allowed_domains": ["<string>"],
"theme": {},
"hosted_page": {},
"translations": {},
"chrome": {},
"daily_credit_budget": 123
}
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({
consent_text: '<string>',
offline_message: '<string>',
offline_cta: {},
locale_default: '<string>',
allowed_domains: ['<string>'],
theme: {},
hosted_page: {},
translations: {},
chrome: {},
daily_credit_budget: 123
})
};
fetch('https://app.pepline.ai/api/v1/agents/{slug}/widget_setting', 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://app.pepline.ai/api/v1/agents/{slug}/widget_setting",
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([
'consent_text' => '<string>',
'offline_message' => '<string>',
'offline_cta' => [
],
'locale_default' => '<string>',
'allowed_domains' => [
'<string>'
],
'theme' => [
],
'hosted_page' => [
],
'translations' => [
],
'chrome' => [
],
'daily_credit_budget' => 123
]),
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://app.pepline.ai/api/v1/agents/{slug}/widget_setting"
payload := strings.NewReader("{\n \"consent_text\": \"<string>\",\n \"offline_message\": \"<string>\",\n \"offline_cta\": {},\n \"locale_default\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"theme\": {},\n \"hosted_page\": {},\n \"translations\": {},\n \"chrome\": {},\n \"daily_credit_budget\": 123\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://app.pepline.ai/api/v1/agents/{slug}/widget_setting")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"consent_text\": \"<string>\",\n \"offline_message\": \"<string>\",\n \"offline_cta\": {},\n \"locale_default\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"theme\": {},\n \"hosted_page\": {},\n \"translations\": {},\n \"chrome\": {},\n \"daily_credit_budget\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/agents/{slug}/widget_setting")
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 \"consent_text\": \"<string>\",\n \"offline_message\": \"<string>\",\n \"offline_cta\": {},\n \"locale_default\": \"<string>\",\n \"allowed_domains\": [\n \"<string>\"\n ],\n \"theme\": {},\n \"hosted_page\": {},\n \"translations\": {},\n \"chrome\": {},\n \"daily_credit_budget\": 123\n}"
response = http.request(request)
puts response.read_body{
"object": "<string>",
"agent": "<string>",
"locale_default": "<string>",
"consent_text": "<string>",
"offline_message": "<string>",
"offline_cta": {},
"allowed_domains": [
"<string>"
],
"theme": {},
"hosted_page": {},
"translations": {},
"chrome": {},
"daily_credit_budget": 123
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Path Parameters
Body
application/json
Widget interface texts keyed by locale ({en: {placeholder: …}, fr: {…}}); merges per key, blank clears to the built-in wording.
Per-agent daily budget in credits (visitor-facing spend cap).
Response
The updated settings.
Allowed value:
"widget_setting"The agent's slug.
Per-agent daily budget in credits (visitor-facing spend cap).
⌘I

