Listar bots disponibles
curl --request GET \
--url https://admintest.inceptia.ai/api/v2/bots/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://admintest.inceptia.ai/api/v2/bots/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://admintest.inceptia.ai/api/v2/bots/', 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://admintest.inceptia.ai/api/v2/bots/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admintest.inceptia.ai/api/v2/bots/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admintest.inceptia.ai/api/v2/bots/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admintest.inceptia.ai/api/v2/bots/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 101,
"name": "Demo_Bot_Voz",
"alias": "Demo_Bot_Voz",
"business_group_name": "Grupo_Test",
"internal_tags": [],
"external_tags": [],
"bot_type": "OUTBOUND",
"conversation_type": "VOICE",
"last_campaign": {
"name": "Campaña Test Octubre",
"status": "CLOSED",
"percentage_completed": 100,
"percentage_called": 100,
"q_final_cases": 15,
"q_loaded_cases": 15,
"contactability": 90,
"max_calls_per_case": 3,
"phone_priority": 2,
"dialing_type": "HORIZONTAL_VERTICAL",
"call_from": "09:00:00",
"call_to": "21:00:00",
"start_date": "2024-10-15",
"workers": 120
},
"bot_status_last": {},
"error": 0,
"active_wks": 0,
"inactive_wks": 0
},
{
"id": 102,
"name": "Demo_Bot_Whatsapp",
"alias": "Demo_Bot_Whatsapp",
"business_group_name": "",
"internal_tags": [],
"external_tags": [],
"bot_type": "INBOUND",
"conversation_type": "WHATSAPP",
"last_campaign": {},
"bot_status_last": {
"cases_in_progress": 0,
"total_cases": 0,
"case_distribution": {
"ended_without_error": 0,
"ended_with_error": 0
}
},
"error": 0,
"active_wks": 0,
"inactive_wks": 0
}
]{
"token": "El token es inválido o ha expirado"
}Bots
Listar bots disponibles
Devuelve un listado de todos los bots disponibles asociados al usuario autenticado. Incluye información del tipo de bot, tipo de conversación y su última campaña conocida.
GET
/
api
/
v2
/
bots
/
Listar bots disponibles
curl --request GET \
--url https://admintest.inceptia.ai/api/v2/bots/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://admintest.inceptia.ai/api/v2/bots/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://admintest.inceptia.ai/api/v2/bots/', 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://admintest.inceptia.ai/api/v2/bots/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admintest.inceptia.ai/api/v2/bots/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://admintest.inceptia.ai/api/v2/bots/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://admintest.inceptia.ai/api/v2/bots/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 101,
"name": "Demo_Bot_Voz",
"alias": "Demo_Bot_Voz",
"business_group_name": "Grupo_Test",
"internal_tags": [],
"external_tags": [],
"bot_type": "OUTBOUND",
"conversation_type": "VOICE",
"last_campaign": {
"name": "Campaña Test Octubre",
"status": "CLOSED",
"percentage_completed": 100,
"percentage_called": 100,
"q_final_cases": 15,
"q_loaded_cases": 15,
"contactability": 90,
"max_calls_per_case": 3,
"phone_priority": 2,
"dialing_type": "HORIZONTAL_VERTICAL",
"call_from": "09:00:00",
"call_to": "21:00:00",
"start_date": "2024-10-15",
"workers": 120
},
"bot_status_last": {},
"error": 0,
"active_wks": 0,
"inactive_wks": 0
},
{
"id": 102,
"name": "Demo_Bot_Whatsapp",
"alias": "Demo_Bot_Whatsapp",
"business_group_name": "",
"internal_tags": [],
"external_tags": [],
"bot_type": "INBOUND",
"conversation_type": "WHATSAPP",
"last_campaign": {},
"bot_status_last": {
"cases_in_progress": 0,
"total_cases": 0,
"case_distribution": {
"ended_without_error": 0,
"ended_with_error": 0
}
},
"error": 0,
"active_wks": 0,
"inactive_wks": 0
}
]{
"token": "El token es inválido o ha expirado"
}Autorizaciones
Token de acceso JWT. Debe ser enviado como 'Bearer {token}'.
Respuesta
Lista de bots obtenida exitosamente.
Opciones disponibles:
INBOUND, OUTBOUND Opciones disponibles:
VOICE, WHATSAPP Última campaña asociada al bot (si existe).
Show child attributes
Show child attributes
Ejemplo:
{
"name": "Campaña Test Octubre",
"status": "CLOSED",
"percentage_completed": 100,
"percentage_called": 100,
"q_final_cases": 15,
"q_loaded_cases": 15,
"contactability": 90,
"max_calls_per_case": 3,
"phone_priority": 2,
"dialing_type": "HORIZONTAL_VERTICAL",
"call_from": "09:00:00",
"call_to": "21:00:00",
"start_date": "2024-10-15",
"workers": 120
}
Estado operativo reciente del bot (solo para bots activos o inbound).
Show child attributes
Show child attributes
Ejemplo:
{
"cases_in_progress": 1,
"total_cases": 10,
"case_distribution": {
"ended_without_error": 9,
"ended_with_error": 1
}
}
⌘I