List All Agents Linked to a Specific Product
curl --request GET \
--url https://api.trata.ai/v1/products/{product_id}/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trata.ai/v1/products/{product_id}/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trata.ai/v1/products/{product_id}/agents', 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.trata.ai/v1/products/{product_id}/agents",
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.trata.ai/v1/products/{product_id}/agents"
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.trata.ai/v1/products/{product_id}/agents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trata.ai/v1/products/{product_id}/agents")
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": "<string>",
"orgId": "<string>",
"name": "<string>",
"imageUrl": "<string>",
"mission": {
"greeting": "Hello! Thank you for taking the time to speak with me today.",
"prompt": "Check Trata AI docs on the specifics of prompting.",
"objective": "This is a more easier version where the user dont have to given the entire prompt but just share the objective of the call and rest will be handled by Trata.",
"sequence": [
{
"stageName": "Introduction",
"description": "This stage involves introducing the AI agent to the user and explaining the purpose of the call.",
"otherNotes": "Ensure the user understands the privacy policy."
}
],
"farewell": "<string>"
},
"role": "<string>",
"roleDescription": "<string>",
"transcriber": {
"providerName": "<string>",
"transcriberModel": "<string>",
"providerProps": {}
},
"intelligenceProvider": {
"providerName": "<string>",
"model": "<string>",
"providerProps": {}
},
"voice": {
"gender": "Male",
"languageAccent": {
"language": "English",
"accent": "American"
},
"modelId": "<string>"
},
"status": "<string>",
"timezone": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Products
List All Agents Linked to a Specific Product
List All Agents Linked to a Specific Product
GET
/
v1
/
products
/
{product_id}
/
agents
List All Agents Linked to a Specific Product
curl --request GET \
--url https://api.trata.ai/v1/products/{product_id}/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.trata.ai/v1/products/{product_id}/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.trata.ai/v1/products/{product_id}/agents', 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.trata.ai/v1/products/{product_id}/agents",
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.trata.ai/v1/products/{product_id}/agents"
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.trata.ai/v1/products/{product_id}/agents")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trata.ai/v1/products/{product_id}/agents")
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": "<string>",
"orgId": "<string>",
"name": "<string>",
"imageUrl": "<string>",
"mission": {
"greeting": "Hello! Thank you for taking the time to speak with me today.",
"prompt": "Check Trata AI docs on the specifics of prompting.",
"objective": "This is a more easier version where the user dont have to given the entire prompt but just share the objective of the call and rest will be handled by Trata.",
"sequence": [
{
"stageName": "Introduction",
"description": "This stage involves introducing the AI agent to the user and explaining the purpose of the call.",
"otherNotes": "Ensure the user understands the privacy policy."
}
],
"farewell": "<string>"
},
"role": "<string>",
"roleDescription": "<string>",
"transcriber": {
"providerName": "<string>",
"transcriberModel": "<string>",
"providerProps": {}
},
"intelligenceProvider": {
"providerName": "<string>",
"model": "<string>",
"providerProps": {}
},
"voice": {
"gender": "Male",
"languageAccent": {
"language": "English",
"accent": "American"
},
"modelId": "<string>"
},
"status": "<string>",
"timezone": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Response
Successful Response
