curl -X POST 'https://api.60db.ai/deep-analytics/analysis-agents/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f/batches' \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"source_kind": "direct_upload", "csv_text": "call_id,file_name\nA-1,one.mp3\nA-2,two.mp3\n"}'
const res = await fetch('https://api.60db.ai/deep-analytics/analysis-agents/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f/batches', {
method: 'POST',
headers: {
Authorization: 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"source_kind": "direct_upload",
"csv_text": "call_id,file_name\nA-1,one.mp3\nA-2,two.mp3\n"
}),
});
const { success, data, message, code } = await res.json();
if (!success) throw new Error(`${code}: ${message}`);
Call Analysis
Create Batch
Start a batch of recordings from files or URLs
POST
/
deep-analytics
/
analysis-agents
/
:agentId
/
batches
curl -X POST 'https://api.60db.ai/deep-analytics/analysis-agents/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f/batches' \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"source_kind": "direct_upload", "csv_text": "call_id,file_name\nA-1,one.mp3\nA-2,two.mp3\n"}'
const res = await fetch('https://api.60db.ai/deep-analytics/analysis-agents/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f/batches', {
method: 'POST',
headers: {
Authorization: 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"source_kind": "direct_upload",
"csv_text": "call_id,file_name\nA-1,one.mp3\nA-2,two.mp3\n"
}),
});
const { success, data, message, code } = await res.json();
if (!success) throw new Error(`${code}: ${message}`);
A batch is a CSV that lists your recordings. Audio never goes through the API. With
A row with a missing file name or URL is counted as
direct_upload you upload each file to storage (see Create upload slot). With csv_urls 60db downloads each recording_url.
Needs
manage on the analyzer.Request
Headers
Path
Body
The CSV text, with a header row. Up to 5 MiB, 5,000 rows, 50 columns and 2,000 characters per cell
CSV columns
| Column | Used for | Notes |
|---|---|---|
external_call_ref (or call_id) | your own call reference | |
file_name | direct_upload | the file you will upload for this row |
recording_url | csv_urls | public URL 60db downloads |
agent_external_id | the human agent | |
started_at | when the call started | ISO 8601 with UTC offset |
customer_number, campaign, disposition | metadata |
invalid and cannot take a recording.
Response
201 Created{
"success": true,
"data": {
"id": "9b7e6d5c-4b3a-4291-8f0e-1d2c3b4a5968",
"total": 2,
"valid": 2,
"invalid": 0
}
}
Errors
Errors use{ "success": false, "message": "...", "code": "..." }. See the overview for the codes every route can return.
This endpoint
| Status | Code | When |
|---|---|---|
| 400 | INVALID_MAPPING | The mapping does not fit the CSV headers |
| 400 | CSV_TOO_MANY_ROWS | More than 5,000 rows |
| 400 | VALIDATION_ERROR | A field is invalid |
Example
curl -X POST 'https://api.60db.ai/deep-analytics/analysis-agents/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f/batches' \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"source_kind": "direct_upload", "csv_text": "call_id,file_name\nA-1,one.mp3\nA-2,two.mp3\n"}'
const res = await fetch('https://api.60db.ai/deep-analytics/analysis-agents/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f/batches', {
method: 'POST',
headers: {
Authorization: 'Bearer your-api-key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"source_kind": "direct_upload",
"csv_text": "call_id,file_name\nA-1,one.mp3\nA-2,two.mp3\n"
}),
});
const { success, data, message, code } = await res.json();
if (!success) throw new Error(`${code}: ${message}`);