Skip to main content
GET
/
campaign-audience-stats
Campaign audience stats
curl --request GET \
  --url https://www.tryunleashx.com/api/v1/global/campaign-audience-stats \
  --header 'token: <token>'
{
  "total_audience": 123,
  "coverage": 123,
  "total_attempt": 123,
  "total_duration": 123,
  "successful_calls": 123
}
Use this endpoint to get aggregated call statistics for a campaign’s audience.

Endpoint

GET /campaign-audience-stats Authentication: Required (workspace auth)

Query Parameters

ParameterTypeRequiredDescription
campaign_idnumberYesCampaign identifier
mobile_nostringNoFilter by mobile number (partial match)
statusnumber | arrayNoAudience status filter
call_statusstring | arrayNoCall status filter
first_statusstring | arrayNoFirst call status filter
last_statusstring | arrayNoLast call status filter
attemptnumber | arrayNoAttempt count filter

Response

{
  "total_audience": 500,
  "coverage": 84.50,
  "total_attempt": 720,
  "total_duration": 18540,
  "successful_calls": 423
}
FieldTypeDescription
total_audiencenumberTotal number of audience records matching filters
coveragenumberPercentage of successful calls out of total attempts (2 decimal places)
total_attemptnumberSum of all call attempts made
total_durationnumberTotal call duration in seconds
successful_callsnumberCalls with status: AGENT_ENDED, USER_ENDED, COMPLETED, or ANSWER

Notes

  • coverage = (successful_calls / total_attempt) * 100, rounded to 2 decimal places.
  • Returns 0 for all fields if no matching records are found.
  • Same filters as the Audience List endpoint can be applied to narrow stats.

Example cURL

curl -X GET "https://www.tryunleashx.com/api/v1/global/campaign-audience-stats?campaign_id=42" \
  -H "Authorization: <api_key>"

Headers

token
string
required

API token for authentication

Query Parameters

campaign_id
integer
required

Campaign identifier

mobile_no
string

Filter by mobile number (partial match)

status
integer

Audience status filter

call_status
string

Call status filter

attempt
integer

Attempt count filter

Response

Audience stats retrieved successfully

total_audience
integer

Total audience records matching filters

coverage
number

Percentage of successful calls out of total attempts (2 decimal places)

total_attempt
integer

Sum of all call attempts

total_duration
integer

Total call duration in seconds

successful_calls
integer

Calls with terminal success statuses