Criar Widget
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/widget/ \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"subTitle": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>",
"primaryAIColor": "<string>",
"secondaryAIColor": "<string>",
"aiFirstMessage": "<string>",
"primaryUserColor": "<string>",
"secondaryUserColor": "<string>"
}
'import requests
url = "https://chat.api.toolzz.com.br/api/v1/widget/"
payload = {
"title": "<string>",
"subTitle": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>",
"primaryAIColor": "<string>",
"secondaryAIColor": "<string>",
"aiFirstMessage": "<string>",
"primaryUserColor": "<string>",
"secondaryUserColor": "<string>"
}
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({
title: '<string>',
subTitle: '<string>',
primaryColor: '<string>',
secondaryColor: '<string>',
primaryAIColor: '<string>',
secondaryAIColor: '<string>',
aiFirstMessage: '<string>',
primaryUserColor: '<string>',
secondaryUserColor: '<string>'
})
};
fetch('https://chat.api.toolzz.com.br/api/v1/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://chat.api.toolzz.com.br/api/v1/widget/",
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([
'title' => '<string>',
'subTitle' => '<string>',
'primaryColor' => '<string>',
'secondaryColor' => '<string>',
'primaryAIColor' => '<string>',
'secondaryAIColor' => '<string>',
'aiFirstMessage' => '<string>',
'primaryUserColor' => '<string>',
'secondaryUserColor' => '<string>'
]),
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://chat.api.toolzz.com.br/api/v1/widget/"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"subTitle\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"secondaryColor\": \"<string>\",\n \"primaryAIColor\": \"<string>\",\n \"secondaryAIColor\": \"<string>\",\n \"aiFirstMessage\": \"<string>\",\n \"primaryUserColor\": \"<string>\",\n \"secondaryUserColor\": \"<string>\"\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://chat.api.toolzz.com.br/api/v1/widget/")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"subTitle\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"secondaryColor\": \"<string>\",\n \"primaryAIColor\": \"<string>\",\n \"secondaryAIColor\": \"<string>\",\n \"aiFirstMessage\": \"<string>\",\n \"primaryUserColor\": \"<string>\",\n \"secondaryUserColor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.api.toolzz.com.br/api/v1/widget/")
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 \"title\": \"<string>\",\n \"subTitle\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"secondaryColor\": \"<string>\",\n \"primaryAIColor\": \"<string>\",\n \"secondaryAIColor\": \"<string>\",\n \"aiFirstMessage\": \"<string>\",\n \"primaryUserColor\": \"<string>\",\n \"secondaryUserColor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"institutionId": "<string>",
"title": "<string>",
"subTitle": "<string>",
"headerIconFileId": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>"
}Widget
Criar Widget
Endpoint para criar um Widget
POST
/
api
/
v1
/
widget
/
Criar Widget
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/widget/ \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"subTitle": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>",
"primaryAIColor": "<string>",
"secondaryAIColor": "<string>",
"aiFirstMessage": "<string>",
"primaryUserColor": "<string>",
"secondaryUserColor": "<string>"
}
'import requests
url = "https://chat.api.toolzz.com.br/api/v1/widget/"
payload = {
"title": "<string>",
"subTitle": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>",
"primaryAIColor": "<string>",
"secondaryAIColor": "<string>",
"aiFirstMessage": "<string>",
"primaryUserColor": "<string>",
"secondaryUserColor": "<string>"
}
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({
title: '<string>',
subTitle: '<string>',
primaryColor: '<string>',
secondaryColor: '<string>',
primaryAIColor: '<string>',
secondaryAIColor: '<string>',
aiFirstMessage: '<string>',
primaryUserColor: '<string>',
secondaryUserColor: '<string>'
})
};
fetch('https://chat.api.toolzz.com.br/api/v1/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://chat.api.toolzz.com.br/api/v1/widget/",
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([
'title' => '<string>',
'subTitle' => '<string>',
'primaryColor' => '<string>',
'secondaryColor' => '<string>',
'primaryAIColor' => '<string>',
'secondaryAIColor' => '<string>',
'aiFirstMessage' => '<string>',
'primaryUserColor' => '<string>',
'secondaryUserColor' => '<string>'
]),
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://chat.api.toolzz.com.br/api/v1/widget/"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"subTitle\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"secondaryColor\": \"<string>\",\n \"primaryAIColor\": \"<string>\",\n \"secondaryAIColor\": \"<string>\",\n \"aiFirstMessage\": \"<string>\",\n \"primaryUserColor\": \"<string>\",\n \"secondaryUserColor\": \"<string>\"\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://chat.api.toolzz.com.br/api/v1/widget/")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"subTitle\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"secondaryColor\": \"<string>\",\n \"primaryAIColor\": \"<string>\",\n \"secondaryAIColor\": \"<string>\",\n \"aiFirstMessage\": \"<string>\",\n \"primaryUserColor\": \"<string>\",\n \"secondaryUserColor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.api.toolzz.com.br/api/v1/widget/")
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 \"title\": \"<string>\",\n \"subTitle\": \"<string>\",\n \"primaryColor\": \"<string>\",\n \"secondaryColor\": \"<string>\",\n \"primaryAIColor\": \"<string>\",\n \"secondaryAIColor\": \"<string>\",\n \"aiFirstMessage\": \"<string>\",\n \"primaryUserColor\": \"<string>\",\n \"secondaryUserColor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"institutionId": "<string>",
"title": "<string>",
"subTitle": "<string>",
"headerIconFileId": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>"
}Token de Acesso
string
Token de acesso (“Bearer” deve estar antes do token)
Descrição do Body
string
O título é obrigatório
string
O subtítulo é obrigatório
string
A cor primária é obrigatória
string
A cor secundária é obrigatória
string
A cor primária da IA é obrigatória
string
A cor secundária da IA é obrigatória
string
A primeira mensagem da IA é obrigatória
string
A cor primária do usuário é obrigatória
string
A cor secundária do usuário é obrigatória
Descrição da Resposta
Abaixo você verá a descrição da resposta do widgetstring
required
Identificador único do widget.
string
required
ID da instituição associada.
string
required
Título do widget.
string
required
Subtítulo do widget.
string
ID opcional do ícone do cabeçalho.
string
required
Configuração da cor primária do widget.
string
required
Configuração da cor secundária do widget.

