Call Analysis
Create a call analysis job
Upload a new call recording
POST
/
v1
/
call-analysis
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
async function main() {
const callAnalysis = await client.callAnalysis.create({
callDirection: 'INBOUND',
interfaceType: 'WEB',
participants: [{ role: 'AGENT' }, { role: 'CUSTOMER' }],
recordingUrl: 'https://example.com/recording.wav',
startedAt: '2025-05-13T13:28:19.321Z',
});
console.log(callAnalysis.data);
}
main();
{
"data": {
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"call": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "IN_PROGRESS",
"summary": "<string>",
"callDirection": "INBOUND",
"startedAt": "<string>",
"endedAt": "<string>",
"durationMs": 123,
"endedReason": "<string>",
"isTest": false,
"participants": [
{
"name": "<string>",
"phoneNumber": "<string>",
"role": "AGENT",
"spokeFirst": true,
"isSimulated": true
}
],
"properties": {}
}
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Call analysis creation payload
Response
200 - application/json
Created call analysis job
The response is of type object
.
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
async function main() {
const callAnalysis = await client.callAnalysis.create({
callDirection: 'INBOUND',
interfaceType: 'WEB',
participants: [{ role: 'AGENT' }, { role: 'CUSTOMER' }],
recordingUrl: 'https://example.com/recording.wav',
startedAt: '2025-05-13T13:28:19.321Z',
});
console.log(callAnalysis.data);
}
main();
{
"data": {
"jobId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"call": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "IN_PROGRESS",
"summary": "<string>",
"callDirection": "INBOUND",
"startedAt": "<string>",
"endedAt": "<string>",
"durationMs": 123,
"endedReason": "<string>",
"isTest": false,
"participants": [
{
"name": "<string>",
"phoneNumber": "<string>",
"role": "AGENT",
"spokeFirst": true,
"isSimulated": true
}
],
"properties": {}
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.