/v1/accounts/{accountId}/campaigns/{campaignId}/numbers/downloadDownloads the numbers of a campaign as a CSV (comma-separated values) file. The file includes all the records matching the filter, without pagination. It accepts the same filter and sort parameters as List campaign numbers, whose Filter fields and Sort fields sections list the fields that can be used.
ID of your SIP Caller account. See Account ID.
ID of the campaign.
Returns the CSV file, with a header row, as text/plain; charset=utf-8. The first column contains the number, followed by one column for each variable of the campaign. The Content-Disposition header contains a suggested file name. The file is generated while it's being sent, so if an error occurs halfway, the content ends with the line === RESPONSE ABORTED: INTERNAL SERVER ERROR === and must be discarded.
/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers/download
curl -G 'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers/download' \
-H 'Authorization: Bearer API_KEY_TOKEN' \
--data-urlencode 'filter={"status":["NotContacted","RetryPending"]}' \
--data-urlencode 'sort=["number","ASC"]' \
-o 'campaign-numbers.csv'Response
200 OK
Number,Customer Name,Due Balance
+18035551004,Stefan Robertson,$99.00
+18035551009,Clara White,$350.00