Chamada de API
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id} \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"language": "<string>",
"voiceId": "<string>",
"credentialId": "<string>",
"model": "<string>",
"firstMessage": "<string>",
"prompt": "<string>"
}
'import requests
url = "https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id}"
payload = {
"phone": "<string>",
"language": "<string>",
"voiceId": "<string>",
"credentialId": "<string>",
"model": "<string>",
"firstMessage": "<string>",
"prompt": "<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({
phone: '<string>',
language: '<string>',
voiceId: '<string>',
credentialId: '<string>',
model: '<string>',
firstMessage: '<string>',
prompt: '<string>'
})
};
fetch('https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id}', 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/bot/call-phone/{bot-id}",
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([
'phone' => '<string>',
'language' => '<string>',
'voiceId' => '<string>',
'credentialId' => '<string>',
'model' => '<string>',
'firstMessage' => '<string>',
'prompt' => '<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/bot/call-phone/{bot-id}"
payload := strings.NewReader("{\n \"phone\": \"<string>\",\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"model\": \"<string>\",\n \"firstMessage\": \"<string>\",\n \"prompt\": \"<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/bot/call-phone/{bot-id}")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"<string>\",\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"model\": \"<string>\",\n \"firstMessage\": \"<string>\",\n \"prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id}")
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 \"phone\": \"<string>\",\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"model\": \"<string>\",\n \"firstMessage\": \"<string>\",\n \"prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"response": {
"message": "<string>",
"roomName": "<string>",
"participantIdentity": "<string>",
"status": true
}
}Voice
Chamada de API
POST
/
api
/
v1
/
bot
/
call-phone
/
{bot-id}
Chamada de API
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id} \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"language": "<string>",
"voiceId": "<string>",
"credentialId": "<string>",
"model": "<string>",
"firstMessage": "<string>",
"prompt": "<string>"
}
'import requests
url = "https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id}"
payload = {
"phone": "<string>",
"language": "<string>",
"voiceId": "<string>",
"credentialId": "<string>",
"model": "<string>",
"firstMessage": "<string>",
"prompt": "<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({
phone: '<string>',
language: '<string>',
voiceId: '<string>',
credentialId: '<string>',
model: '<string>',
firstMessage: '<string>',
prompt: '<string>'
})
};
fetch('https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id}', 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/bot/call-phone/{bot-id}",
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([
'phone' => '<string>',
'language' => '<string>',
'voiceId' => '<string>',
'credentialId' => '<string>',
'model' => '<string>',
'firstMessage' => '<string>',
'prompt' => '<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/bot/call-phone/{bot-id}"
payload := strings.NewReader("{\n \"phone\": \"<string>\",\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"model\": \"<string>\",\n \"firstMessage\": \"<string>\",\n \"prompt\": \"<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/bot/call-phone/{bot-id}")
.header("Content-Type", "application/json")
.body("{\n \"phone\": \"<string>\",\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"model\": \"<string>\",\n \"firstMessage\": \"<string>\",\n \"prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://chat.api.toolzz.com.br/api/v1/bot/call-phone/{bot-id}")
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 \"phone\": \"<string>\",\n \"language\": \"<string>\",\n \"voiceId\": \"<string>\",\n \"credentialId\": \"<string>\",\n \"model\": \"<string>\",\n \"firstMessage\": \"<string>\",\n \"prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"response": {
"message": "<string>",
"roomName": "<string>",
"participantIdentity": "<string>",
"status": true
}
}Token de Acesso
string
Token de acesso (“Bearer” deve estar antes do token)
string
ID do Agente
string
required
Telefone para chamada
string
Idioma do agente
string
ID da voz
string
ID da credencial de voz
string
Modelo do provedor de voz
string
Primeira interação da voz com o usuário
string
Prompt simples da voz
Descrição da Resposta
Abaixo você verá a descrição da resposta da chamada de vozstring
required
Mensagem de status da resposta da API.
object
required

