Call
Get a call by ID
Retrieve an existing call by its unique identifier
GET
/
v1
/
call
/
{callId}
JavaScript
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.call.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
response = client.call.get_by_id(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.data)curl --request GET \
--url https://api.roark.ai/v1/call/{callId} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/call/{callId}",
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.roark.ai/v1/call/{callId}"
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.roark.ai/v1/call/{callId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/call/{callId}")
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": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"recordingUrlAccess": "AVAILABLE",
"title": "Customer support inquiry",
"summary": "Customer inquired about billing and payment options",
"status": "ENDED",
"endedAt": "2024-01-15T10:30:00Z",
"durationMs": 1800000,
"endedStatus": "AGENT_ENDED_CALL",
"recordingUrl": "https://s3.amazonaws.com/bucket/recording.mp3?...",
"simulationJobId": "880e8400-e29b-41d4-a716-446655440003",
"supersededByCallId": "990e8400-e29b-41d4-a716-446655440004",
"externalId": "session-abc-123",
"agents": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"endpoint": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"environment": "Production",
"phoneNumberE164": "+1234567890"
}
}
],
"customers": [
{
"phoneNumberE164": "+1234567891",
"label": "customer-01"
}
],
"createdAt": "2024-01-15T10:31:00Z",
"updatedAt": "2024-01-15T10:31:00Z",
"properties": {
"ticketId": "TCK-123",
"department": "sales"
},
"policyIds": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "not_found",
"code": "resource_not_found",
"message": "The requested resource could not be found"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Call retrieved successfully
Response containing call information
Show child attributes
Show child attributes
⌘I
JavaScript
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.call.getByID('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');
console.log(response.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
response = client.call.get_by_id(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.data)curl --request GET \
--url https://api.roark.ai/v1/call/{callId} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/call/{callId}",
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.roark.ai/v1/call/{callId}"
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.roark.ai/v1/call/{callId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/call/{callId}")
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": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"recordingUrlAccess": "AVAILABLE",
"title": "Customer support inquiry",
"summary": "Customer inquired about billing and payment options",
"status": "ENDED",
"endedAt": "2024-01-15T10:30:00Z",
"durationMs": 1800000,
"endedStatus": "AGENT_ENDED_CALL",
"recordingUrl": "https://s3.amazonaws.com/bucket/recording.mp3?...",
"simulationJobId": "880e8400-e29b-41d4-a716-446655440003",
"supersededByCallId": "990e8400-e29b-41d4-a716-446655440004",
"externalId": "session-abc-123",
"agents": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"endpoint": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"environment": "Production",
"phoneNumberE164": "+1234567890"
}
}
],
"customers": [
{
"phoneNumberE164": "+1234567891",
"label": "customer-01"
}
],
"createdAt": "2024-01-15T10:31:00Z",
"updatedAt": "2024-01-15T10:31:00Z",
"properties": {
"ticketId": "TCK-123",
"department": "sales"
},
"policyIds": [
"550e8400-e29b-41d4-a716-446655440000"
]
}
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "not_found",
"code": "resource_not_found",
"message": "The requested resource could not be found"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}