Skip to main content
GET
/
export-campaign-audience-data
Export campaign audience data
curl --request GET \
  --url https://www.tryunleashx.com/api/v1/global/export-campaign-audience-data \
  --header 'token: <token>'
"<string>"
Use this endpoint to export campaign audience data as an Excel file (.xlsx) with optional filters.

Endpoint

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

Query Parameters

ParameterTypeRequiredDescription
campaign_idnumberYesCampaign identifier
mobile_nostringNoPartial mobile number search (LIKE)
statusstring | arrayNoAudience status filter (see values below)
call_statusstring | arrayNoFilter by call status
first_statusstring | arrayNoFilter by first call status
last_statusstring | arrayNoFilter by last call status
attemptnumber | arrayNoFilter by number of attempts made
date_rangestringNoDate range filter

Audience Status Values

StatusDescription
freshNot yet called
completedCall completed
haltedCall halted
inqueueIn queue for calling

Response

Returns an Excel file (.xlsx) with the following columns:
ColumnDescription
IDAudience record identifier
Mobile NoAudience mobile number
Dynamic ColumnsColumns based on agent metadata input fields
StatusAudience status label
AttemptAttempts made vs max retry (e.g., 2/3)
Call StatusLast call status
DurationTotal call duration
DispositionLast disposition
Modified ByUser who last modified
Updated DateLast update date

Notes

  • The response is a binary Excel file stream, not JSON.
  • Set your HTTP client to handle binary/file responses.
  • Dynamic columns are derived from the agent’s metadata input configuration.
  • The campaign_id must belong to the authenticated company and workspace.
  • Date filter applies to CREATED_DATE of the audience record.

Example cURL

curl -X GET "https://www.tryunleashx.com/api/v1/global/export-campaign-audience-data?campaign_id=42&status=completed" \
  -H "token: <api_key>" \
  -o campaign_audience.xlsx

Headers

token
string
required

API token for authentication

Query Parameters

campaign_id
integer
required

Campaign identifier

mobile_no
string

Partial mobile number search

status
enum<string>

Filter by audience status. Valid values: fresh, completed, halted, inqueue

Available options:
fresh,
completed,
halted,
inqueue
call_status
string

Filter by call status

first_status
string

Filter by first call status

last_status
string

Filter by last call status

attempt
integer

Filter by attempt count

date_range
string

Date range filter

Response

Excel file download

The response is of type file.