Listar conversaciones en un cubo
curl --request GET \
--url https://api.zelto.ai/v1/buckets/{id}/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zelto.ai/v1/buckets/{id}/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zelto.ai/v1/buckets/{id}/conversations', 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.zelto.ai/v1/buckets/{id}/conversations",
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://api.zelto.ai/v1/buckets/{id}/conversations"
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://api.zelto.ai/v1/buckets/{id}/conversations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zelto.ai/v1/buckets/{id}/conversations")
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{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"source": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"receiverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referenceId": "<string>",
"endedReason": "<string>",
"cost": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"durationSeconds": 123,
"analysisStatus": "analyzed"
}
],
"nextCursor": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {},
"feedback": {
"endpoint": "<string>",
"method": "POST",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {},
"feedback": {
"endpoint": "<string>",
"method": "POST",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Buckets
Listar conversaciones en un cubo
GET
/
v1
/
buckets
/
{id}
/
conversations
Listar conversaciones en un cubo
curl --request GET \
--url https://api.zelto.ai/v1/buckets/{id}/conversations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.zelto.ai/v1/buckets/{id}/conversations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.zelto.ai/v1/buckets/{id}/conversations', 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.zelto.ai/v1/buckets/{id}/conversations",
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://api.zelto.ai/v1/buckets/{id}/conversations"
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://api.zelto.ai/v1/buckets/{id}/conversations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zelto.ai/v1/buckets/{id}/conversations")
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{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"source": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"receiverId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"referenceId": "<string>",
"endedReason": "<string>",
"cost": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"durationSeconds": 123,
"analysisStatus": "analyzed"
}
],
"nextCursor": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {},
"feedback": {
"endpoint": "<string>",
"method": "POST",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {},
"feedback": {
"endpoint": "<string>",
"method": "POST",
"message": "<string>"
},
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Autorizaciones
Parámetros de consulta
Cursor de paginación opaco. Envía el nextCursor devuelto por la página anterior, sin modificar. Un cursor que esta API no emitió se rechaza con un 400 invalid_parameter. Los endpoints de listado también responden 400 unknown_query_parameter (con los nombres válidos) ante cualquier parámetro de consulta que no aceptan, así que un filtro mal escrito como agent_id nunca se ignora en silencio.

