This method will allow you to fill your campaigns in Power Dialer using API
Basic request parameters:
API request address: https://api.ringostat.net/power-dialer/campaigns/campaign-rows
Method: POST
Auth-key: an electronic key for accessing your project in Ringostat.
projectId: Project ID
In order to fill a Campaign in Power dialer, you need to create it.
To do this, go to "Settings" > "Ringostat Smart Phone Settings" > "Power Dialer".
2. In the “Power Dialer” settings, click “+Add campaign”, enter the Campaign name and save.
3. After this, you need to click on the three vertical dots to the right of the name and call up the context menu, in which you select “Edit list of campaign numbers”.
You will be taken to a page where you will be asked to upload a list of campaign numbers, but you do not need to do this.
You need to copy the page URL, it will look something like this:
For the future method we will need the parameter values:
projectId – value must be passed to Headers in x-project-id
editCampaign – value must be passed to Body in "campaignId".
4. The authorization key required to fill the campaign using the API can be found on the page “Settings” > “Integration” > “Ringostat API”. On this page, you need to copy the Auth-key to transfer it to Headers Auth-key.
5. To fill a campaign with numbers via API, you need these parameters:
URL | |
Headlines | x-project-id: 123 Auth-key: xxx Content-Type: application/json |
Method | POST |
Body | { "campaignId": 456, "fio": "name", "phone_number": "380930000000" } |
We take the campaignId from the page URL. https://power-dialer.ringostat.com/campaign/edit?projectId=123&editCampaign=456&campaignName=ddd- here for example 456
The fio parameter is optional and does not need to be passed.
The phone_number parameter is required, and the number must be in the international format: +380YYXXXXXXX
Example for Node.js:
const https = require('https');
const data = JSON.stringify({
campaignId: 456,
fio: "Ivan Petrenko",
Phone number: "380930000000"
});
const config = {
host: 'api.ringostat.net',
путь: '/power-dialer/campaigns/campaign-rows',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(data),
'x-project-id': '123',
'Authorization Key': 'your_unique_authorization_key'
}
};
const callback = (response) => {
let result = Buffer.alloc(0);
response.on('data', chunk => {
result = Buffer.concat([result, chunk]);
});
response.on('end', () => {
console.log(result.toString());
});
};
const request = https.request(config, callback);
request.write(data);
request.end();
Example for Axios.js
const axios = require('axios');
axios({
url: 'https://api.ringostat.net/power-dialer/campaigns/campaign-rows',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-project-id': '123',
'Authorization Key': 'xxx'
},
data: {
campaignId: 456,
fio: "Ivan Petrenko",
Phone number: "380930000000"
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error.response?.data || error.message);
});
Example for cURL
curl -X POST "https://api.ringostat.net/power-dialer/campaigns/campaign-rows" \
-H "Content-Type: application/json" \
-H "x-project-id: 123" \
-H "Authorization Key: xxx" \
-d '{
"campaignId": 456,
"fio": "Ivan Petrenko",
"phone_number": "380930000000"
}'
Result:
{
"result": true
}
Limitation:
Maximum 1 number per request
You should take the values of the fio and phone_number parameters from your CRM.
