curl --request PUT \
--url https://app.flextell.ai/api/v1/channels/{id}/widget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"primary_color": "<string>",
"secondary_color": "<string>",
"background_color": "<string>",
"border_radius": 25,
"title": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"header_padding": 22,
"show_header_gradient": true,
"welcome_message": "<string>",
"auto_open_delay": 30,
"allow_message_editing": true,
"allow_message_deletion": true,
"base_font_size": 40,
"header_font_size": 40,
"message_font_size": 40,
"header_font_weight": 500,
"message_font_weight": 500,
"send_button_font_weight": 500,
"user_msg_bg_color": "<string>",
"user_msg_text_color": "<string>",
"agent_msg_bg_color": "<string>",
"agent_msg_text_color": "<string>",
"message_border_radius": 20,
"message_padding": 18,
"message_spacing": 16,
"input_placeholder": "<string>",
"input_bg_color": "<string>",
"input_text_color": "<string>",
"input_border_color": "<string>",
"input_border_radius": 15,
"send_button_color": "<string>",
"send_button_icon_color": "<string>",
"fab_size": 60,
"fab_bg_color": "<string>",
"fab_icon_color": "<string>",
"fab_border_radius": 4999,
"fab_pulse_animation": true,
"position_bottom": 50,
"position_side": 50,
"widget_width": 390,
"widget_height": 600,
"custom_css": "<string>"
}
'import requests
url = "https://app.flextell.ai/api/v1/channels/{id}/widget"
payload = {
"primary_color": "<string>",
"secondary_color": "<string>",
"background_color": "<string>",
"border_radius": 25,
"title": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"header_padding": 22,
"show_header_gradient": True,
"welcome_message": "<string>",
"auto_open_delay": 30,
"allow_message_editing": True,
"allow_message_deletion": True,
"base_font_size": 40,
"header_font_size": 40,
"message_font_size": 40,
"header_font_weight": 500,
"message_font_weight": 500,
"send_button_font_weight": 500,
"user_msg_bg_color": "<string>",
"user_msg_text_color": "<string>",
"agent_msg_bg_color": "<string>",
"agent_msg_text_color": "<string>",
"message_border_radius": 20,
"message_padding": 18,
"message_spacing": 16,
"input_placeholder": "<string>",
"input_bg_color": "<string>",
"input_text_color": "<string>",
"input_border_color": "<string>",
"input_border_radius": 15,
"send_button_color": "<string>",
"send_button_icon_color": "<string>",
"fab_size": 60,
"fab_bg_color": "<string>",
"fab_icon_color": "<string>",
"fab_border_radius": 4999,
"fab_pulse_animation": True,
"position_bottom": 50,
"position_side": 50,
"widget_width": 390,
"widget_height": 600,
"custom_css": "<string>"
}
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
primary_color: '<string>',
secondary_color: '<string>',
background_color: '<string>',
border_radius: 25,
title: '<string>',
header_bg_color: '<string>',
header_text_color: '<string>',
header_padding: 22,
show_header_gradient: true,
welcome_message: '<string>',
auto_open_delay: 30,
allow_message_editing: true,
allow_message_deletion: true,
base_font_size: 40,
header_font_size: 40,
message_font_size: 40,
header_font_weight: 500,
message_font_weight: 500,
send_button_font_weight: 500,
user_msg_bg_color: '<string>',
user_msg_text_color: '<string>',
agent_msg_bg_color: '<string>',
agent_msg_text_color: '<string>',
message_border_radius: 20,
message_padding: 18,
message_spacing: 16,
input_placeholder: '<string>',
input_bg_color: '<string>',
input_text_color: '<string>',
input_border_color: '<string>',
input_border_radius: 15,
send_button_color: '<string>',
send_button_icon_color: '<string>',
fab_size: 60,
fab_bg_color: '<string>',
fab_icon_color: '<string>',
fab_border_radius: 4999,
fab_pulse_animation: true,
position_bottom: 50,
position_side: 50,
widget_width: 390,
widget_height: 600,
custom_css: '<string>'
})
};
fetch('https://app.flextell.ai/api/v1/channels/{id}/widget', 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.flextell.ai/api/v1/channels/{id}/widget",
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([
'primary_color' => '<string>',
'secondary_color' => '<string>',
'background_color' => '<string>',
'border_radius' => 25,
'title' => '<string>',
'header_bg_color' => '<string>',
'header_text_color' => '<string>',
'header_padding' => 22,
'show_header_gradient' => true,
'welcome_message' => '<string>',
'auto_open_delay' => 30,
'allow_message_editing' => true,
'allow_message_deletion' => true,
'base_font_size' => 40,
'header_font_size' => 40,
'message_font_size' => 40,
'header_font_weight' => 500,
'message_font_weight' => 500,
'send_button_font_weight' => 500,
'user_msg_bg_color' => '<string>',
'user_msg_text_color' => '<string>',
'agent_msg_bg_color' => '<string>',
'agent_msg_text_color' => '<string>',
'message_border_radius' => 20,
'message_padding' => 18,
'message_spacing' => 16,
'input_placeholder' => '<string>',
'input_bg_color' => '<string>',
'input_text_color' => '<string>',
'input_border_color' => '<string>',
'input_border_radius' => 15,
'send_button_color' => '<string>',
'send_button_icon_color' => '<string>',
'fab_size' => 60,
'fab_bg_color' => '<string>',
'fab_icon_color' => '<string>',
'fab_border_radius' => 4999,
'fab_pulse_animation' => true,
'position_bottom' => 50,
'position_side' => 50,
'widget_width' => 390,
'widget_height' => 600,
'custom_css' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Tenant: <x-tenant>"
],
]);
$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.flextell.ai/api/v1/channels/{id}/widget"
payload := strings.NewReader("{\n \"primary_color\": \"<string>\",\n \"secondary_color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"border_radius\": 25,\n \"title\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"header_padding\": 22,\n \"show_header_gradient\": true,\n \"welcome_message\": \"<string>\",\n \"auto_open_delay\": 30,\n \"allow_message_editing\": true,\n \"allow_message_deletion\": true,\n \"base_font_size\": 40,\n \"header_font_size\": 40,\n \"message_font_size\": 40,\n \"header_font_weight\": 500,\n \"message_font_weight\": 500,\n \"send_button_font_weight\": 500,\n \"user_msg_bg_color\": \"<string>\",\n \"user_msg_text_color\": \"<string>\",\n \"agent_msg_bg_color\": \"<string>\",\n \"agent_msg_text_color\": \"<string>\",\n \"message_border_radius\": 20,\n \"message_padding\": 18,\n \"message_spacing\": 16,\n \"input_placeholder\": \"<string>\",\n \"input_bg_color\": \"<string>\",\n \"input_text_color\": \"<string>\",\n \"input_border_color\": \"<string>\",\n \"input_border_radius\": 15,\n \"send_button_color\": \"<string>\",\n \"send_button_icon_color\": \"<string>\",\n \"fab_size\": 60,\n \"fab_bg_color\": \"<string>\",\n \"fab_icon_color\": \"<string>\",\n \"fab_border_radius\": 4999,\n \"fab_pulse_animation\": true,\n \"position_bottom\": 50,\n \"position_side\": 50,\n \"widget_width\": 390,\n \"widget_height\": 600,\n \"custom_css\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Tenant", "<x-tenant>")
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("https://app.flextell.ai/api/v1/channels/{id}/widget")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"primary_color\": \"<string>\",\n \"secondary_color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"border_radius\": 25,\n \"title\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"header_padding\": 22,\n \"show_header_gradient\": true,\n \"welcome_message\": \"<string>\",\n \"auto_open_delay\": 30,\n \"allow_message_editing\": true,\n \"allow_message_deletion\": true,\n \"base_font_size\": 40,\n \"header_font_size\": 40,\n \"message_font_size\": 40,\n \"header_font_weight\": 500,\n \"message_font_weight\": 500,\n \"send_button_font_weight\": 500,\n \"user_msg_bg_color\": \"<string>\",\n \"user_msg_text_color\": \"<string>\",\n \"agent_msg_bg_color\": \"<string>\",\n \"agent_msg_text_color\": \"<string>\",\n \"message_border_radius\": 20,\n \"message_padding\": 18,\n \"message_spacing\": 16,\n \"input_placeholder\": \"<string>\",\n \"input_bg_color\": \"<string>\",\n \"input_text_color\": \"<string>\",\n \"input_border_color\": \"<string>\",\n \"input_border_radius\": 15,\n \"send_button_color\": \"<string>\",\n \"send_button_icon_color\": \"<string>\",\n \"fab_size\": 60,\n \"fab_bg_color\": \"<string>\",\n \"fab_icon_color\": \"<string>\",\n \"fab_border_radius\": 4999,\n \"fab_pulse_animation\": true,\n \"position_bottom\": 50,\n \"position_side\": 50,\n \"widget_width\": 390,\n \"widget_height\": 600,\n \"custom_css\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/channels/{id}/widget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"primary_color\": \"<string>\",\n \"secondary_color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"border_radius\": 25,\n \"title\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"header_padding\": 22,\n \"show_header_gradient\": true,\n \"welcome_message\": \"<string>\",\n \"auto_open_delay\": 30,\n \"allow_message_editing\": true,\n \"allow_message_deletion\": true,\n \"base_font_size\": 40,\n \"header_font_size\": 40,\n \"message_font_size\": 40,\n \"header_font_weight\": 500,\n \"message_font_weight\": 500,\n \"send_button_font_weight\": 500,\n \"user_msg_bg_color\": \"<string>\",\n \"user_msg_text_color\": \"<string>\",\n \"agent_msg_bg_color\": \"<string>\",\n \"agent_msg_text_color\": \"<string>\",\n \"message_border_radius\": 20,\n \"message_padding\": 18,\n \"message_spacing\": 16,\n \"input_placeholder\": \"<string>\",\n \"input_bg_color\": \"<string>\",\n \"input_text_color\": \"<string>\",\n \"input_border_color\": \"<string>\",\n \"input_border_radius\": 15,\n \"send_button_color\": \"<string>\",\n \"send_button_icon_color\": \"<string>\",\n \"fab_size\": 60,\n \"fab_bg_color\": \"<string>\",\n \"fab_icon_color\": \"<string>\",\n \"fab_border_radius\": 4999,\n \"fab_pulse_animation\": true,\n \"position_bottom\": 50,\n \"position_side\": 50,\n \"widget_width\": 390,\n \"widget_height\": 600,\n \"custom_css\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Update the widget configuration of a website channel
curl --request PUT \
--url https://app.flextell.ai/api/v1/channels/{id}/widget \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"primary_color": "<string>",
"secondary_color": "<string>",
"background_color": "<string>",
"border_radius": 25,
"title": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"header_padding": 22,
"show_header_gradient": true,
"welcome_message": "<string>",
"auto_open_delay": 30,
"allow_message_editing": true,
"allow_message_deletion": true,
"base_font_size": 40,
"header_font_size": 40,
"message_font_size": 40,
"header_font_weight": 500,
"message_font_weight": 500,
"send_button_font_weight": 500,
"user_msg_bg_color": "<string>",
"user_msg_text_color": "<string>",
"agent_msg_bg_color": "<string>",
"agent_msg_text_color": "<string>",
"message_border_radius": 20,
"message_padding": 18,
"message_spacing": 16,
"input_placeholder": "<string>",
"input_bg_color": "<string>",
"input_text_color": "<string>",
"input_border_color": "<string>",
"input_border_radius": 15,
"send_button_color": "<string>",
"send_button_icon_color": "<string>",
"fab_size": 60,
"fab_bg_color": "<string>",
"fab_icon_color": "<string>",
"fab_border_radius": 4999,
"fab_pulse_animation": true,
"position_bottom": 50,
"position_side": 50,
"widget_width": 390,
"widget_height": 600,
"custom_css": "<string>"
}
'import requests
url = "https://app.flextell.ai/api/v1/channels/{id}/widget"
payload = {
"primary_color": "<string>",
"secondary_color": "<string>",
"background_color": "<string>",
"border_radius": 25,
"title": "<string>",
"header_bg_color": "<string>",
"header_text_color": "<string>",
"header_padding": 22,
"show_header_gradient": True,
"welcome_message": "<string>",
"auto_open_delay": 30,
"allow_message_editing": True,
"allow_message_deletion": True,
"base_font_size": 40,
"header_font_size": 40,
"message_font_size": 40,
"header_font_weight": 500,
"message_font_weight": 500,
"send_button_font_weight": 500,
"user_msg_bg_color": "<string>",
"user_msg_text_color": "<string>",
"agent_msg_bg_color": "<string>",
"agent_msg_text_color": "<string>",
"message_border_radius": 20,
"message_padding": 18,
"message_spacing": 16,
"input_placeholder": "<string>",
"input_bg_color": "<string>",
"input_text_color": "<string>",
"input_border_color": "<string>",
"input_border_radius": 15,
"send_button_color": "<string>",
"send_button_icon_color": "<string>",
"fab_size": 60,
"fab_bg_color": "<string>",
"fab_icon_color": "<string>",
"fab_border_radius": 4999,
"fab_pulse_animation": True,
"position_bottom": 50,
"position_side": 50,
"widget_width": 390,
"widget_height": 600,
"custom_css": "<string>"
}
headers = {
"X-Tenant": "<x-tenant>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Tenant': '<x-tenant>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
primary_color: '<string>',
secondary_color: '<string>',
background_color: '<string>',
border_radius: 25,
title: '<string>',
header_bg_color: '<string>',
header_text_color: '<string>',
header_padding: 22,
show_header_gradient: true,
welcome_message: '<string>',
auto_open_delay: 30,
allow_message_editing: true,
allow_message_deletion: true,
base_font_size: 40,
header_font_size: 40,
message_font_size: 40,
header_font_weight: 500,
message_font_weight: 500,
send_button_font_weight: 500,
user_msg_bg_color: '<string>',
user_msg_text_color: '<string>',
agent_msg_bg_color: '<string>',
agent_msg_text_color: '<string>',
message_border_radius: 20,
message_padding: 18,
message_spacing: 16,
input_placeholder: '<string>',
input_bg_color: '<string>',
input_text_color: '<string>',
input_border_color: '<string>',
input_border_radius: 15,
send_button_color: '<string>',
send_button_icon_color: '<string>',
fab_size: 60,
fab_bg_color: '<string>',
fab_icon_color: '<string>',
fab_border_radius: 4999,
fab_pulse_animation: true,
position_bottom: 50,
position_side: 50,
widget_width: 390,
widget_height: 600,
custom_css: '<string>'
})
};
fetch('https://app.flextell.ai/api/v1/channels/{id}/widget', 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.flextell.ai/api/v1/channels/{id}/widget",
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([
'primary_color' => '<string>',
'secondary_color' => '<string>',
'background_color' => '<string>',
'border_radius' => 25,
'title' => '<string>',
'header_bg_color' => '<string>',
'header_text_color' => '<string>',
'header_padding' => 22,
'show_header_gradient' => true,
'welcome_message' => '<string>',
'auto_open_delay' => 30,
'allow_message_editing' => true,
'allow_message_deletion' => true,
'base_font_size' => 40,
'header_font_size' => 40,
'message_font_size' => 40,
'header_font_weight' => 500,
'message_font_weight' => 500,
'send_button_font_weight' => 500,
'user_msg_bg_color' => '<string>',
'user_msg_text_color' => '<string>',
'agent_msg_bg_color' => '<string>',
'agent_msg_text_color' => '<string>',
'message_border_radius' => 20,
'message_padding' => 18,
'message_spacing' => 16,
'input_placeholder' => '<string>',
'input_bg_color' => '<string>',
'input_text_color' => '<string>',
'input_border_color' => '<string>',
'input_border_radius' => 15,
'send_button_color' => '<string>',
'send_button_icon_color' => '<string>',
'fab_size' => 60,
'fab_bg_color' => '<string>',
'fab_icon_color' => '<string>',
'fab_border_radius' => 4999,
'fab_pulse_animation' => true,
'position_bottom' => 50,
'position_side' => 50,
'widget_width' => 390,
'widget_height' => 600,
'custom_css' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-Tenant: <x-tenant>"
],
]);
$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.flextell.ai/api/v1/channels/{id}/widget"
payload := strings.NewReader("{\n \"primary_color\": \"<string>\",\n \"secondary_color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"border_radius\": 25,\n \"title\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"header_padding\": 22,\n \"show_header_gradient\": true,\n \"welcome_message\": \"<string>\",\n \"auto_open_delay\": 30,\n \"allow_message_editing\": true,\n \"allow_message_deletion\": true,\n \"base_font_size\": 40,\n \"header_font_size\": 40,\n \"message_font_size\": 40,\n \"header_font_weight\": 500,\n \"message_font_weight\": 500,\n \"send_button_font_weight\": 500,\n \"user_msg_bg_color\": \"<string>\",\n \"user_msg_text_color\": \"<string>\",\n \"agent_msg_bg_color\": \"<string>\",\n \"agent_msg_text_color\": \"<string>\",\n \"message_border_radius\": 20,\n \"message_padding\": 18,\n \"message_spacing\": 16,\n \"input_placeholder\": \"<string>\",\n \"input_bg_color\": \"<string>\",\n \"input_text_color\": \"<string>\",\n \"input_border_color\": \"<string>\",\n \"input_border_radius\": 15,\n \"send_button_color\": \"<string>\",\n \"send_button_icon_color\": \"<string>\",\n \"fab_size\": 60,\n \"fab_bg_color\": \"<string>\",\n \"fab_icon_color\": \"<string>\",\n \"fab_border_radius\": 4999,\n \"fab_pulse_animation\": true,\n \"position_bottom\": 50,\n \"position_side\": 50,\n \"widget_width\": 390,\n \"widget_height\": 600,\n \"custom_css\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Tenant", "<x-tenant>")
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("https://app.flextell.ai/api/v1/channels/{id}/widget")
.header("X-Tenant", "<x-tenant>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"primary_color\": \"<string>\",\n \"secondary_color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"border_radius\": 25,\n \"title\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"header_padding\": 22,\n \"show_header_gradient\": true,\n \"welcome_message\": \"<string>\",\n \"auto_open_delay\": 30,\n \"allow_message_editing\": true,\n \"allow_message_deletion\": true,\n \"base_font_size\": 40,\n \"header_font_size\": 40,\n \"message_font_size\": 40,\n \"header_font_weight\": 500,\n \"message_font_weight\": 500,\n \"send_button_font_weight\": 500,\n \"user_msg_bg_color\": \"<string>\",\n \"user_msg_text_color\": \"<string>\",\n \"agent_msg_bg_color\": \"<string>\",\n \"agent_msg_text_color\": \"<string>\",\n \"message_border_radius\": 20,\n \"message_padding\": 18,\n \"message_spacing\": 16,\n \"input_placeholder\": \"<string>\",\n \"input_bg_color\": \"<string>\",\n \"input_text_color\": \"<string>\",\n \"input_border_color\": \"<string>\",\n \"input_border_radius\": 15,\n \"send_button_color\": \"<string>\",\n \"send_button_icon_color\": \"<string>\",\n \"fab_size\": 60,\n \"fab_bg_color\": \"<string>\",\n \"fab_icon_color\": \"<string>\",\n \"fab_border_radius\": 4999,\n \"fab_pulse_animation\": true,\n \"position_bottom\": 50,\n \"position_side\": 50,\n \"widget_width\": 390,\n \"widget_height\": 600,\n \"custom_css\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flextell.ai/api/v1/channels/{id}/widget")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Tenant"] = '<x-tenant>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"primary_color\": \"<string>\",\n \"secondary_color\": \"<string>\",\n \"background_color\": \"<string>\",\n \"border_radius\": 25,\n \"title\": \"<string>\",\n \"header_bg_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"header_padding\": 22,\n \"show_header_gradient\": true,\n \"welcome_message\": \"<string>\",\n \"auto_open_delay\": 30,\n \"allow_message_editing\": true,\n \"allow_message_deletion\": true,\n \"base_font_size\": 40,\n \"header_font_size\": 40,\n \"message_font_size\": 40,\n \"header_font_weight\": 500,\n \"message_font_weight\": 500,\n \"send_button_font_weight\": 500,\n \"user_msg_bg_color\": \"<string>\",\n \"user_msg_text_color\": \"<string>\",\n \"agent_msg_bg_color\": \"<string>\",\n \"agent_msg_text_color\": \"<string>\",\n \"message_border_radius\": 20,\n \"message_padding\": 18,\n \"message_spacing\": 16,\n \"input_placeholder\": \"<string>\",\n \"input_bg_color\": \"<string>\",\n \"input_text_color\": \"<string>\",\n \"input_border_color\": \"<string>\",\n \"input_border_radius\": 15,\n \"send_button_color\": \"<string>\",\n \"send_button_icon_color\": \"<string>\",\n \"fab_size\": 60,\n \"fab_bg_color\": \"<string>\",\n \"fab_icon_color\": \"<string>\",\n \"fab_border_radius\": 4999,\n \"fab_pulse_animation\": true,\n \"position_bottom\": 50,\n \"position_side\": 50,\n \"widget_width\": 390,\n \"widget_height\": 600,\n \"custom_css\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Yetkilendirmeler
The access token received from the authorization server in the OAuth 2.0 flow.
Başlıklar
Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.
Yol Parametreleri
The channel identifier
Gövde
Mirrors the field set of the Filament "Widget Ayarları" page. Every key is optional so a client can patch a single colour without resending the whole theme; omitted keys keep their stored value.
The main brand colour of the widget.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The secondary colour used in the header gradient.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The background colour of the widget panel.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The corner radius of the widget panel in pixels.
0 <= x <= 50The drop shadow of the widget panel (none, small, medium, large).
none, small, medium, large The title shown in the widget header.
100The background colour of the header.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The text colour of the header.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The inner spacing of the header in pixels.
4 <= x <= 40Whether the header is filled with a gradient.
The greeting shown before the visitor writes anything.
500Seconds before the widget opens itself. Send null to disable auto-open.
1 <= x <= 60Whether authorized staff can edit outbound website text messages.
Whether authorized staff can delete outbound website messages and attachments.
The font family slug used by the widget.
system, inter, roboto, open-sans, nunito, lato, poppins, montserrat, raleway, dm-sans, plus-jakarta-sans, manrope, outfit, work-sans, source-sans-3, rubik, figtree, ubuntu, playfair-display, merriweather, lora, pt-serif, noto-serif, libre-baskerville, fira-code, jetbrains-mono, source-code-pro, bebas-neue, righteous, space-grotesk The base font size in pixels.
8 <= x <= 72The header font size in pixels.
8 <= x <= 72The message font size in pixels.
8 <= x <= 72The header font weight.
100 <= x <= 900The message font weight.
100 <= x <= 900The send button font weight.
100 <= x <= 900The background colour of the visitor's own messages.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The text colour of the visitor's own messages.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The background colour of the assistant's messages.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The text colour of the assistant's messages.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The corner radius of message bubbles in pixels.
0 <= x <= 40The inner spacing of message bubbles in pixels.
4 <= x <= 32The vertical gap between messages in pixels.
0 <= x <= 32The placeholder text of the message input.
100The background colour of the message input.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The text colour of the message input.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The border colour of the message input.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The corner radius of the message input in pixels.
0 <= x <= 30The background colour of the send button.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The icon colour of the send button.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The icon shown on the floating button (chat, headset, help, wave).
chat, headset, help, wave The diameter of the floating button in pixels.
40 <= x <= 80The background colour of the floating button.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The icon colour of the floating button.
^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$The corner radius of the floating button in pixels.
0 <= x <= 9999The drop shadow of the floating button (none, small, medium, large).
none, small, medium, large Whether the floating button pulses to draw attention.
The corner the widget sits in (bottom-right, bottom-left).
bottom-right, bottom-left The gap from the bottom of the page in pixels.
0 <= x <= 100The gap from the side of the page in pixels.
0 <= x <= 100The width of the widget panel in pixels.
280 <= x <= 500The height of the widget panel in pixels.
400 <= x <= 800Extra CSS injected into the widget.
10000Yanıt
The response is of type object.