Get All Campaigns
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/all \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/all"
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/campaign/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaigns": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Q4 Sales Campaign",
"campaign_status": "completed",
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T16:45:00Z",
"campaign_start_time": "2024-01-16T09:00:00Z",
"campaign_end_time": "2024-01-16T17:00:00Z",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"total_calls": 150,
"invalidated_rows_count": 2,
"additional_balance_required": "1250.00"
}
],
"pagination": {
"total": 25,
"limit": 10,
"offset": 0
}
}{
"message": "Invalid credentials"
}{
"message": "An unexpected error occurred. Please try again later."
}Get All Campaigns
List the campaigns in your workspace with their status, schedule and contact counts, to follow each campaign from upload to completion.
GET
/
campaign
/
all
Get All Campaigns
curl --request GET \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/all \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/all"
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/campaign/all', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaigns": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Q4 Sales Campaign",
"campaign_status": "completed",
"created_at": "2024-01-15T14:30:00Z",
"updated_at": "2024-01-15T16:45:00Z",
"campaign_start_time": "2024-01-16T09:00:00Z",
"campaign_end_time": "2024-01-16T17:00:00Z",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"total_calls": 150,
"invalidated_rows_count": 2,
"additional_balance_required": "1250.00"
}
],
"pagination": {
"total": 25,
"limit": 10,
"offset": 0
}
}{
"message": "Invalid credentials"
}{
"message": "An unexpected error occurred. Please try again later."
}A campaign’s
id is the list_id or bulk_list_id returned when its list was uploaded, so you can match rows to the campaigns you created.
Statuses
campaign_status | Meaning |
|---|---|
verifying | The uploaded list is being validated |
draft | Validated, calls not started |
insufficient_balance | The workspace balance does not cover the list. Listing the campaigns re-checks it and moves it back to draft once the balance covers it |
preparing | Launched; calls are being prepared |
scheduled | Calls are waiting for the start time |
ongoing | Calls are being placed |
completed | The campaign has finished |
terminated | Stopped with Terminate calls |
no_valid_contacts | Every row in the list was invalid |
failed | The list or the launch failed |
processing | A workflow campaign is being prepared |
null | The row is a list that is not a campaign, such as a contact list |
Notes
limitdefaults to10; page withoffset.total_callsis the number of valid contacts loaded from the list, not the number of calls placed. It is0until the list has been validated.invalidated_rows_countis the number of rows dropped as invalid.- Rows in
insufficient_balancealso carryadditional_balance_required, the extra balance needed, as a decimal string. - For the calls inside one campaign, use call history with
bulk_list_id.
Authorizations
Headers
(Required) Your Ringg AI API key.
Example:
"rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Query Parameters
Maximum number of campaigns to return (default: 10).
Number of campaigns to skip for pagination (default: 0).
Was this page helpful?