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",
"createdAt": "2024-01-15T10:31:00Z",
"updatedAt": "2024-01-15T10:31:00Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Call retrieved successfully
Response containing call information
Show child attributes
Unique identifier for the call
"550e8400-e29b-41d4-a716-446655440000"
ID of the project this call belongs to
"660e8400-e29b-41d4-a716-446655440001"
Direction of the call (inbound or outbound)
INBOUND, OUTBOUND "INBOUND"
Timestamp when the call started
"2024-01-15T10:00:00Z"
Auto-generated title for the call based on content
"Customer support inquiry"
Auto-generated summary of the call conversation
"Customer inquired about billing and payment options"
Current status of the call
RINGING, IN_PROGRESS, ENDED "ENDED"
Timestamp when the call ended
"2024-01-15T10:30:00Z"
Duration of the call in milliseconds
1800000
Status indicating how the call ended
PARTICIPANTS_DID_NOT_SPEAK, AGENT_DID_NOT_ANSWER, AGENT_DID_NOT_SPEAK, AGENT_STOPPED_SPEAKING, AGENT_ENDED_CALL, AGENT_TRANSFERRED_CALL, AGENT_BUSY, AGENT_ERROR, CUSTOMER_ENDED_CALL, VOICE_MAIL_REACHED, SILENCE_TIME_OUT, PHONE_CALL_PROVIDER_CONNECTION_ERROR, CUSTOMER_DID_NOT_ANSWER, CUSTOMER_DID_NOT_SPEAK, CUSTOMER_STOPPED_SPEAKING, CUSTOMER_BUSY, DIAL_ERROR, MAX_DURATION_REACHED, UNKNOWN "AGENT_ENDED_CALL"
Pre-signed URL to the call recording (expires in 1 hour)
"https://s3.amazonaws.com/bucket/recording.mp3?..."
ID of the simulation job if this call was generated by a simulation
"880e8400-e29b-41d4-a716-446655440003"
ID of the call that superseded this one (if applicable)
"990e8400-e29b-41d4-a716-446655440004"
Timestamp when the call record was created
"2024-01-15T10:31:00Z"
Timestamp when the call record was last updated
"2024-01-15T10:31:00Z"
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",
"createdAt": "2024-01-15T10:31:00Z",
"updatedAt": "2024-01-15T10:31:00Z"
}
}