Retrieve an existing call by its unique identifier
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);{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"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",
"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": {
"customerId": "cust_123",
"department": "sales"
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Call retrieved successfully
Response containing call information
Show child attributes
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);{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"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",
"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": {
"customerId": "cust_123",
"department": "sales"
}
}
}