Download a call recording
curl --request GET \
--url https://api.classet.ai/v2/calls/{callId}/recording \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.classet.ai/v2/calls/{callId}/recording"
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.classet.ai/v2/calls/{callId}/recording', 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.classet.ai/v2/calls/{callId}/recording",
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.classet.ai/v2/calls/{callId}/recording"
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.classet.ai/v2/calls/{callId}/recording")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.classet.ai/v2/calls/{callId}/recording")
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"<string>"{
"error": "Resource not found",
"code": "not_found",
"request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f"
}{
"error": "Resource not found",
"code": "not_found",
"request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f"
}{
"error": "Resource not found",
"code": "not_found",
"request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f"
}Calls
Download Call Recording
Stream the audio for a completed call. recording_url on the call and candidate endpoints points at the storage provider and the link behind it expires, so it cannot be stored and replayed later. This endpoint is authenticated with your API key, does not expire, and returns the bytes — fetch it whenever you need the audio, or pipe it straight into your own storage. Responds 404 while a call is still in progress or was never recorded.
GET
/
v2
/
calls
/
{callId}
/
recording
Download a call recording
curl --request GET \
--url https://api.classet.ai/v2/calls/{callId}/recording \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.classet.ai/v2/calls/{callId}/recording"
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.classet.ai/v2/calls/{callId}/recording', 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.classet.ai/v2/calls/{callId}/recording",
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.classet.ai/v2/calls/{callId}/recording"
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.classet.ai/v2/calls/{callId}/recording")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.classet.ai/v2/calls/{callId}/recording")
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"<string>"{
"error": "Resource not found",
"code": "not_found",
"request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f"
}{
"error": "Resource not found",
"code": "not_found",
"request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f"
}{
"error": "Resource not found",
"code": "not_found",
"request_id": "9f2c1d7e-4a3b-4c8d-9e0f-1a2b3c4d5e6f"
}Was this page helpful?