Create Widget
curl --request POST \
--url 'https://api.example.com/api/v1/widget?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"user_opening_messages": [
"<string>"
],
"action_buttons": [
"<unknown>"
],
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"attributes": {},
"display_name": "<string>",
"intro_message": "<string>",
"header_color": "<string>",
"user_message_color": "<string>",
"bot_message_color": "<string>",
"bot_icon_color": "<string>",
"remove_branding": false,
"ice_break_color": "<string>",
"bubble_color": "<string>",
"bubble_text": "<string>",
"bot_text_message_color": "<string>",
"user_text_message_color": "<string>",
"header_text_color": "<string>",
"textbox_default_text": "<string>",
"action_buttons_color": "<string>",
"style_params": {}
}
'import requests
url = "https://api.example.com/api/v1/widget?api_key="
payload = {
"user_opening_messages": ["<string>"],
"action_buttons": ["<unknown>"],
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"attributes": {},
"display_name": "<string>",
"intro_message": "<string>",
"header_color": "<string>",
"user_message_color": "<string>",
"bot_message_color": "<string>",
"bot_icon_color": "<string>",
"remove_branding": False,
"ice_break_color": "<string>",
"bubble_color": "<string>",
"bubble_text": "<string>",
"bot_text_message_color": "<string>",
"user_text_message_color": "<string>",
"header_text_color": "<string>",
"textbox_default_text": "<string>",
"action_buttons_color": "<string>",
"style_params": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
user_opening_messages: ['<string>'],
action_buttons: ['<unknown>'],
org_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assistant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
attributes: {},
display_name: '<string>',
intro_message: '<string>',
header_color: '<string>',
user_message_color: '<string>',
bot_message_color: '<string>',
bot_icon_color: '<string>',
remove_branding: false,
ice_break_color: '<string>',
bubble_color: '<string>',
bubble_text: '<string>',
bot_text_message_color: '<string>',
user_text_message_color: '<string>',
header_text_color: '<string>',
textbox_default_text: '<string>',
action_buttons_color: '<string>',
style_params: {}
})
};
fetch('https://api.example.com/api/v1/widget?api_key=', 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://api.example.com/api/v1/widget?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_opening_messages' => [
'<string>'
],
'action_buttons' => [
'<unknown>'
],
'org_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assistant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'attributes' => [
],
'display_name' => '<string>',
'intro_message' => '<string>',
'header_color' => '<string>',
'user_message_color' => '<string>',
'bot_message_color' => '<string>',
'bot_icon_color' => '<string>',
'remove_branding' => false,
'ice_break_color' => '<string>',
'bubble_color' => '<string>',
'bubble_text' => '<string>',
'bot_text_message_color' => '<string>',
'user_text_message_color' => '<string>',
'header_text_color' => '<string>',
'textbox_default_text' => '<string>',
'action_buttons_color' => '<string>',
'style_params' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/api/v1/widget?api_key="
payload := strings.NewReader("{\n \"user_opening_messages\": [\n \"<string>\"\n ],\n \"action_buttons\": [\n \"<unknown>\"\n ],\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"attributes\": {},\n \"display_name\": \"<string>\",\n \"intro_message\": \"<string>\",\n \"header_color\": \"<string>\",\n \"user_message_color\": \"<string>\",\n \"bot_message_color\": \"<string>\",\n \"bot_icon_color\": \"<string>\",\n \"remove_branding\": false,\n \"ice_break_color\": \"<string>\",\n \"bubble_color\": \"<string>\",\n \"bubble_text\": \"<string>\",\n \"bot_text_message_color\": \"<string>\",\n \"user_text_message_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"textbox_default_text\": \"<string>\",\n \"action_buttons_color\": \"<string>\",\n \"style_params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.example.com/api/v1/widget?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"user_opening_messages\": [\n \"<string>\"\n ],\n \"action_buttons\": [\n \"<unknown>\"\n ],\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"attributes\": {},\n \"display_name\": \"<string>\",\n \"intro_message\": \"<string>\",\n \"header_color\": \"<string>\",\n \"user_message_color\": \"<string>\",\n \"bot_message_color\": \"<string>\",\n \"bot_icon_color\": \"<string>\",\n \"remove_branding\": false,\n \"ice_break_color\": \"<string>\",\n \"bubble_color\": \"<string>\",\n \"bubble_text\": \"<string>\",\n \"bot_text_message_color\": \"<string>\",\n \"user_text_message_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"textbox_default_text\": \"<string>\",\n \"action_buttons_color\": \"<string>\",\n \"style_params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/widget?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_opening_messages\": [\n \"<string>\"\n ],\n \"action_buttons\": [\n \"<unknown>\"\n ],\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"attributes\": {},\n \"display_name\": \"<string>\",\n \"intro_message\": \"<string>\",\n \"header_color\": \"<string>\",\n \"user_message_color\": \"<string>\",\n \"bot_message_color\": \"<string>\",\n \"bot_icon_color\": \"<string>\",\n \"remove_branding\": false,\n \"ice_break_color\": \"<string>\",\n \"bubble_color\": \"<string>\",\n \"bubble_text\": \"<string>\",\n \"bot_text_message_color\": \"<string>\",\n \"user_text_message_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"textbox_default_text\": \"<string>\",\n \"action_buttons_color\": \"<string>\",\n \"style_params\": {}\n}"
response = http.request(request)
puts response.read_body{
"message": "Data created successfully",
"meta": {},
"data": {
"widget_type": "chat",
"user_opening_messages": [
"<string>"
],
"action_buttons": [
"<unknown>"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_bot_icon": "<string>",
"bubble_bot_icon": "<string>",
"provider_user_friendly_label": "<string>",
"widget_provider": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"attributes": {},
"display_name": "<string>",
"intro_message": "<string>",
"header_color": "<string>",
"user_message_color": "<string>",
"bot_message_color": "<string>",
"bot_icon_color": "<string>",
"remove_branding": false,
"ice_break_color": "<string>",
"bubble_color": "<string>",
"bubble_text": "<string>",
"bot_text_message_color": "<string>",
"user_text_message_color": "<string>",
"header_text_color": "<string>",
"textbox_default_text": "<string>",
"action_buttons_color": "<string>",
"style_params": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Widget
Create Widget
Create a new assistant
POST
/
api
/
v1
/
widget
Create Widget
curl --request POST \
--url 'https://api.example.com/api/v1/widget?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"user_opening_messages": [
"<string>"
],
"action_buttons": [
"<unknown>"
],
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"attributes": {},
"display_name": "<string>",
"intro_message": "<string>",
"header_color": "<string>",
"user_message_color": "<string>",
"bot_message_color": "<string>",
"bot_icon_color": "<string>",
"remove_branding": false,
"ice_break_color": "<string>",
"bubble_color": "<string>",
"bubble_text": "<string>",
"bot_text_message_color": "<string>",
"user_text_message_color": "<string>",
"header_text_color": "<string>",
"textbox_default_text": "<string>",
"action_buttons_color": "<string>",
"style_params": {}
}
'import requests
url = "https://api.example.com/api/v1/widget?api_key="
payload = {
"user_opening_messages": ["<string>"],
"action_buttons": ["<unknown>"],
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"attributes": {},
"display_name": "<string>",
"intro_message": "<string>",
"header_color": "<string>",
"user_message_color": "<string>",
"bot_message_color": "<string>",
"bot_icon_color": "<string>",
"remove_branding": False,
"ice_break_color": "<string>",
"bubble_color": "<string>",
"bubble_text": "<string>",
"bot_text_message_color": "<string>",
"user_text_message_color": "<string>",
"header_text_color": "<string>",
"textbox_default_text": "<string>",
"action_buttons_color": "<string>",
"style_params": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
user_opening_messages: ['<string>'],
action_buttons: ['<unknown>'],
org_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assistant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
attributes: {},
display_name: '<string>',
intro_message: '<string>',
header_color: '<string>',
user_message_color: '<string>',
bot_message_color: '<string>',
bot_icon_color: '<string>',
remove_branding: false,
ice_break_color: '<string>',
bubble_color: '<string>',
bubble_text: '<string>',
bot_text_message_color: '<string>',
user_text_message_color: '<string>',
header_text_color: '<string>',
textbox_default_text: '<string>',
action_buttons_color: '<string>',
style_params: {}
})
};
fetch('https://api.example.com/api/v1/widget?api_key=', 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://api.example.com/api/v1/widget?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_opening_messages' => [
'<string>'
],
'action_buttons' => [
'<unknown>'
],
'org_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assistant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'attributes' => [
],
'display_name' => '<string>',
'intro_message' => '<string>',
'header_color' => '<string>',
'user_message_color' => '<string>',
'bot_message_color' => '<string>',
'bot_icon_color' => '<string>',
'remove_branding' => false,
'ice_break_color' => '<string>',
'bubble_color' => '<string>',
'bubble_text' => '<string>',
'bot_text_message_color' => '<string>',
'user_text_message_color' => '<string>',
'header_text_color' => '<string>',
'textbox_default_text' => '<string>',
'action_buttons_color' => '<string>',
'style_params' => [
]
]),
CURLOPT_HTTPHEADER => [
"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://api.example.com/api/v1/widget?api_key="
payload := strings.NewReader("{\n \"user_opening_messages\": [\n \"<string>\"\n ],\n \"action_buttons\": [\n \"<unknown>\"\n ],\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"attributes\": {},\n \"display_name\": \"<string>\",\n \"intro_message\": \"<string>\",\n \"header_color\": \"<string>\",\n \"user_message_color\": \"<string>\",\n \"bot_message_color\": \"<string>\",\n \"bot_icon_color\": \"<string>\",\n \"remove_branding\": false,\n \"ice_break_color\": \"<string>\",\n \"bubble_color\": \"<string>\",\n \"bubble_text\": \"<string>\",\n \"bot_text_message_color\": \"<string>\",\n \"user_text_message_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"textbox_default_text\": \"<string>\",\n \"action_buttons_color\": \"<string>\",\n \"style_params\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.example.com/api/v1/widget?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"user_opening_messages\": [\n \"<string>\"\n ],\n \"action_buttons\": [\n \"<unknown>\"\n ],\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"attributes\": {},\n \"display_name\": \"<string>\",\n \"intro_message\": \"<string>\",\n \"header_color\": \"<string>\",\n \"user_message_color\": \"<string>\",\n \"bot_message_color\": \"<string>\",\n \"bot_icon_color\": \"<string>\",\n \"remove_branding\": false,\n \"ice_break_color\": \"<string>\",\n \"bubble_color\": \"<string>\",\n \"bubble_text\": \"<string>\",\n \"bot_text_message_color\": \"<string>\",\n \"user_text_message_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"textbox_default_text\": \"<string>\",\n \"action_buttons_color\": \"<string>\",\n \"style_params\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/widget?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_opening_messages\": [\n \"<string>\"\n ],\n \"action_buttons\": [\n \"<unknown>\"\n ],\n \"org_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"attributes\": {},\n \"display_name\": \"<string>\",\n \"intro_message\": \"<string>\",\n \"header_color\": \"<string>\",\n \"user_message_color\": \"<string>\",\n \"bot_message_color\": \"<string>\",\n \"bot_icon_color\": \"<string>\",\n \"remove_branding\": false,\n \"ice_break_color\": \"<string>\",\n \"bubble_color\": \"<string>\",\n \"bubble_text\": \"<string>\",\n \"bot_text_message_color\": \"<string>\",\n \"user_text_message_color\": \"<string>\",\n \"header_text_color\": \"<string>\",\n \"textbox_default_text\": \"<string>\",\n \"action_buttons_color\": \"<string>\",\n \"style_params\": {}\n}"
response = http.request(request)
puts response.read_body{
"message": "Data created successfully",
"meta": {},
"data": {
"widget_type": "chat",
"user_opening_messages": [
"<string>"
],
"action_buttons": [
"<unknown>"
],
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_bot_icon": "<string>",
"bubble_bot_icon": "<string>",
"provider_user_friendly_label": "<string>",
"widget_provider": "<string>",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"attributes": {},
"display_name": "<string>",
"intro_message": "<string>",
"header_color": "<string>",
"user_message_color": "<string>",
"bot_message_color": "<string>",
"bot_icon_color": "<string>",
"remove_branding": false,
"ice_break_color": "<string>",
"bubble_color": "<string>",
"bubble_text": "<string>",
"bot_text_message_color": "<string>",
"user_text_message_color": "<string>",
"header_text_color": "<string>",
"textbox_default_text": "<string>",
"action_buttons_color": "<string>",
"style_params": {}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Your API KeyHTTPBearer
Your API key for authentication. You can generate it from the Settings page. Format: starts with in-.
Body
application/json
Available options:
chat, html, whatsapp, phone, html_call, leadconnector, leadconnector_call, sms, fb_messenger, instagram, web_call, plivo_call, telnyx_call, telegram, render_form, sip Was this page helpful?

