Get Active Campaigns
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/campaigns \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/campaigns"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/analytics/v4/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaigns": [
{
"id": "00000000-0000-4000-8000-0000000000c1",
"name": "EMI reminders - October",
"agent_id": "00000000-0000-4000-8000-0000000000a1"
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch campaigns!"
}Get Active Campaigns
List your ongoing and completed campaigns with their ID, name and agent, to use as the bulk_list_id filter on the other analytics endpoints.
GET
/
analytics
/
v4
/
campaigns
Get Active Campaigns
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/analytics/v4/campaigns \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/analytics/v4/campaigns"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/analytics/v4/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaigns": [
{
"id": "00000000-0000-4000-8000-0000000000c1",
"name": "EMI reminders - October",
"agent_id": "00000000-0000-4000-8000-0000000000a1"
}
]
}{
"message": "invalid channel(s): sms"
}{
"message": "Failed to fetch campaigns!"
}Pass
agent_id to list only that agent’s campaigns. Use each id as bulk_list_id on the other analytics endpoints.
Errors
401:X-API-KEYis missing or invalid.
Was this page helpful?