POST
/
api
/
voice-analysis
Get detailed voice deployment analysis with billing breakdown
curl --request POST \
  --url https://brainbase-monorepo-api.onrender.com/api/voice-analysis \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "startDate": "2023-11-07T05:31:56Z",
  "endDate": "2023-11-07T05:31:56Z",
  "granularity": "monthly",
  "deploymentIds": [
    "<string>"
  ],
  "workerId": "<string>",
  "includeTransfers": true,
  "includeCallDetails": false,
  "timezone": "UTC"
}'
{
  "summary": {
    "totalCalls": 123,
    "totalMinutes": 123,
    "totalTransfers": 123,
    "totalTransferMinutes": 123,
    "averageCallDuration": 123
  }
}

Authorizations

x-api-key
string
header
required

API key authentication

Body

application/json
startDate
string<date-time>

Start date for analysis (ISO 8601)

endDate
string<date-time>

End date for analysis (ISO 8601)

granularity
enum<string>
default:monthly

Time granularity for breakdown

Available options:
daily,
weekly,
monthly,
yearly
deploymentIds
string[]

Optional filter by deployment IDs

workerId
string

Optional filter by worker ID

includeTransfers
boolean
default:true

Include transfer analysis

includeCallDetails
boolean
default:false

Include detailed call logs in response

timezone
string
default:UTC

Timezone for date calculations

Response

Voice deployment analysis results

summary
object