curl --request POST \
--url https://api.salescaptain.com/v1/call-analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_ids": "52cd5521-394d-4676-a5dd-16f1a9d488c1,a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"start_time": "2026-02-12T00:00:00.000Z",
"end_time": "2026-08-12T23:59:59.999Z"
}
'{
"message": "Call analytics fetched successfully!",
"analytics": [
{
"account_id": "11111111-2222-3333-4444-555555555555",
"name": "Jane Doe",
"call_count": 12,
"total_duration": 1840,
"outgoing_call_count": 5,
"outgoing_total_duration": 720
},
{
"account_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"name": "John Smith",
"call_count": 3,
"total_duration": 410,
"outgoing_call_count": 1,
"outgoing_total_duration": 95
}
],
"start_time": "2026-02-12T00:00:00.000Z",
"end_time": "2026-08-12T23:59:59.999Z"
}Fetch call analytics by company
Retrieves inbound and outbound call analytics grouped by account for one or more companies.
company_ids is required (comma-separated UUIDs).
start_time and end_time are optional; if either is missing, the last 6 months is used.
Durations are in seconds.
call_count / total_duration are inbound; outgoing_* are outbound.
curl --request POST \
--url https://api.salescaptain.com/v1/call-analytics \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"company_ids": "52cd5521-394d-4676-a5dd-16f1a9d488c1,a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"start_time": "2026-02-12T00:00:00.000Z",
"end_time": "2026-08-12T23:59:59.999Z"
}
'{
"message": "Call analytics fetched successfully!",
"analytics": [
{
"account_id": "11111111-2222-3333-4444-555555555555",
"name": "Jane Doe",
"call_count": 12,
"total_duration": 1840,
"outgoing_call_count": 5,
"outgoing_total_duration": 720
},
{
"account_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"name": "John Smith",
"call_count": 3,
"total_duration": 410,
"outgoing_call_count": 1,
"outgoing_total_duration": 95
}
],
"start_time": "2026-02-12T00:00:00.000Z",
"end_time": "2026-08-12T23:59:59.999Z"
}Authorizations
Authentication token required for accessing protected endpoints. The token should be obtained from the main SalesCaptain authentication service.
Body
Comma-separated list of company UUIDs
"52cd5521-394d-4676-a5dd-16f1a9d488c1,a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Start of the analytics window (must be provided with end_time)
"2026-02-12T00:00:00.000Z"
End of the analytics window (must be provided with start_time)
"2026-08-12T23:59:59.999Z"

