Obtain ACCOUNT_ID and CAMPAIGN_ID values
Add number to a dynamic campaign
Add number with variable values to a dynamic campaign
Upload CSV file with new numbers for a dynamic campaign
SIP Caller offers a REST API which allows SIP Caller customers to perform different operations on their SIP Caller account from external programs. In this way, many useful custom integrations can be developed between SIP Caller and other systems.
In order to use the REST API, a SIP Caller customer must first create an API Key, as explained in this section, in order to obtain an API_KEY_TOKEN which will be used in the following examples for authenticating calls to the SIP Caller REST API from an external program.
The SIP Caller customer ACCOUNT_ID value, which will be used in the following examples, can be obtained from the Web Console, as shown below:
The SIP Caller CAMPAIGN_ID value, which will be used in the following examples, can also be obtained from the Web Console, as shown below:
The following example shows how to add a new number to a dynamic campaign which is already active:
curl \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer API_KEY_TOKEN' \
--request POST \
--data-raw '{"number": "+18005551234"}' \
'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers'
The following example shows how to add a new number to a dynamic campaign which is already active, including variable values which can be used by the campaign call flow:
curl \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer API_KEY_TOKEN' \
--request POST \
--data-raw '{"number": "+18005551234", "varValues": ["John", "199"]}' \
'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers'
The following example shows how to upload a CSV (comma separated values) file with multiple numbers to a dynamic campaign that is already active.
Firstly, a CSV file must be prepared which contains the new numbers to be added to the campaign. Here is an example of a CSV file with 5 numbers and their corresponding variable values:
5550001,John,199
5550002,Mary,299
5550003,Susan,149
5550004,James,300
5550005,Walter,42
Secondly, the prepared CSV file can be uploaded to SIP Caller with the following command:
curl \
--header 'Authorization: Bearer API_KEY_TOKEN' \
--form "file=@campaign-numbers.csv" \
'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/campaigns/CAMPAIGN_ID/numbers/upload
?firstRowIsHeader=false
&varCount=2'