/v1/accounts/{accountId}/campaigns/{campaignId}/numbers/copyFromContactListCopies all the numbers of a contact list, with their variable values, to a campaign.
If the campaign has no numbers yet, it takes the variable names of the contact list. Otherwise, both must have the same variable names, or the request fails with 409 Conflict.
Numbers can be added to campaigns in Draft state, and to Active or Paused campaigns with Dynamic number provisioning. Other campaigns return 409 Conflict.
Duplicates are handled differently depending on the state of the campaign. In Draft campaigns, a number with the same variable values as an existing one is skipped (the same number can be added again with different values). In Active or Paused campaigns, every number sent is added, even if it already exists, since it's considered a new call to make, for example to contact the same customer again.
ID of your SIP Caller account. See Account ID.
ID of the campaign.
ID of the contact list whose numbers are copied.
Returns an object with the result of the operation:
Number of numbers in the contact list.
Number of numbers added to the campaign.
Number of numbers not added because they were duplicated.
/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers/copyFromContactList
curl -X POST 'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers/copyFromContactList' \
-H 'Authorization: Bearer API_KEY_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"contactListId": "CONTACT_LIST_ID"
}'Response
200 OK
{
"totalNumbers": 2000,
"numbersAdded": 2000,
"numbersSkipped": 0
}