Skip to main content
GET
/
handoff-analytics
Get handoff analytics
curl --request GET \
  --url https://api.open.cx/handoff-analytics \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.open.cx/handoff-analytics"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.open.cx/handoff-analytics', 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.open.cx/handoff-analytics",
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.open.cx/handoff-analytics"

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.open.cx/handoff-analytics")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.open.cx/handoff-analytics")

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
{
  "summary": "<string>",
  "total_handoffs": 123,
  "total_sessions": 123,
  "start_date": "<string>",
  "end_date": "<string>",
  "reasons": [
    {
      "count": 123,
      "percentage": 123
    }
  ],
  "reason_combinations": [
    {
      "reasons": [],
      "session_count": 123,
      "percentage": 123
    }
  ],
  "sentiments": [
    {
      "sentiment": "<string>",
      "count": 123,
      "percentage": 123
    }
  ],
  "trends": [
    {
      "date": "<string>",
      "count": 123
    }
  ],
  "knowledge_references": [
    {
      "id": "<string>",
      "count": 123
    }
  ],
  "tool_references": [
    {
      "id": "<string>",
      "count": 123
    }
  ],
  "instruction_references": [
    {
      "id": "<string>",
      "count": 123
    }
  ],
  "prohibited_topic_references": [
    {
      "id": "<string>",
      "count": 123
    }
  ]
}
{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

start_date
string

Start date in ISO 8601 format (defaults to 30 days ago)

end_date
string

End date in ISO 8601 format (defaults to now)

instruction_id
string

Filter to only handoffs referencing this instruction ID

Response

Default Response

summary
string
required
total_handoffs
number
required
total_sessions
number
required
start_date
string
required
end_date
string
required
reasons
object[]
required
reason_combinations
object[]
required
sentiments
object[]
required
knowledge_references
object[]
required
tool_references
object[]
required
instruction_references
object[]
required
prohibited_topic_references
object[]
required