Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Agent Studio has a new look. See what changed
Returns all conversations matching filters.
cURL
curl --request GET \ --url https://api.us-1.platform.polyai.app/v1/{account_id}/{project_id}/conversations \ --header 'x-api-key: <api-key>'
import requests url = "https://api.us-1.platform.polyai.app/v1/{account_id}/{project_id}/conversations" headers = {"x-api-key": "<api-key>"} response = requests.get(url, headers=headers) print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}}; fetch('https://api.us-1.platform.polyai.app/v1/{account_id}/{project_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.us-1.platform.polyai.app/v1/{account_id}/{project_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 => [ "x-api-key: <api-key>" ], ]); $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.us-1.platform.polyai.app/v1/{account_id}/{project_id}/conversations" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-api-key", "<api-key>") 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.us-1.platform.polyai.app/v1/{account_id}/{project_id}/conversations") .header("x-api-key", "<api-key>") .asString();
require 'uri' require 'net/http' url = URI("https://api.us-1.platform.polyai.app/v1/{account_id}/{project_id}/conversations") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-api-key"] = '<api-key>' response = http.request(request) puts response.read_body
{ "conversations": [ { "id": "CAabcd1234567abcdef1250065d4fc7389", "account_id": "<string>", "project_id": "<string>", "environment": "<string>", "started_at": "2023-11-07T05:31:56Z", "channel": "<string>", "in_progress": true, "variant_id": "<string>", "variant_name": "<string>", "from_number": "<string>", "to_number": "<string>", "num_turns": 123, "total_duration": 123, "polyai_duration": 123, "handoff": true, "handoff_reason": "<string>", "handoff_destination": "<string>", "num_silences": 123, "num_ood": 123, "metrics": { "CALL_DURATION": "30", "CALL_TURN": [ "2022-02-18T12:09:05.12677Z", "2022-02-18T12:09:17.90602Z", "2022-02-18T12:09:29.57732Z", "2022-02-18T12:09:35.36996Z" ] }, "state": {}, "turns": [ { "user_input": "<string>", "user_input_dtmf": "<string>", "user_input_datetime": "2023-11-07T05:31:56Z", "agent_response": "<string>", "agent_response_datetime": "2023-11-07T05:31:56Z", "latency": 123, "translated_user_input": "<string>", "english_agent_response": "<string>", "intents": [ "<string>" ], "entities": [ {} ], "is_ood": true, "is_silence": true } ] } ], "descriptions": { "conversations": {} }, "next_offset": 123 }
{ "error_message": "<string>" }
Account ID.
Project ID.
Client environment – sandbox, pre-release or live.
sandbox
pre-release
live
Start of the time range of the conversations to get, in ISO8601 format.
End of the time range of the conversations to get, in ISO8601 format.
Max number of conversations to return per API call. If the result set is larger than this, it will be paginated.
1 <= x <= 5000
Offset within the result set to fetch.
x >= 0
Return all conversations under this variant_id. You may specify either variant_id or variant_name, not both.
Return all conversations under this variant_name. You may specify either variant_id or variant_name. Encode spaces as "%20".
If false, only return finished conversations. If true, only return conversations still in progress. If omitted, return all conversations.
OK.
Array of conversations returned in ascending chronological order.
Show child attributes
Dictionary of response keys and their descriptions.
If present, the result is paginated. Pass this value as offset in the next request to fetch the next page.
offset
Was this page helpful?