Check Campaign Balance (Beta)
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/check-balance/{bulk_list_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/check-balance/{bulk_list_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/campaign/check-balance/{bulk_list_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "draft",
"message": "Balance is sufficient. You can now start the campaign via /make-call-async.",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"total_callees": 4988
}Check large campaign balance (Beta)
Re-check the workspace balance for a large campaign that stopped at insufficient_balance, after a top-up, so it returns to draft and calls can start.
POST
/
campaign
/
check-balance
/
{bulk_list_id}
Check Campaign Balance (Beta)
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/check-balance/{bulk_list_id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/check-balance/{bulk_list_id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://prod-api.ringg.ai/ca/api/v0/campaign/check-balance/{bulk_list_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "draft",
"message": "Balance is sufficient. You can now start the campaign via /make-call-async.",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"total_callees": 4988
}Add balance first (Billing), then call it with the
bulk_list_id from upload status. When the response’s status is draft, start calls again with the same bulk_list_id; there is no need to upload the list again.
If the balance is still short, status stays insufficient_balance and the response gives required_credits and additional_balance_required. A campaign in another status, or with no contacts or agent, returns 400. Get all campaigns runs the same check on every insufficient_balance campaign it lists.
Authorizations
Headers
(Required) Your Ringg AI API key.
Example:
"rg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Path Parameters
Bulk list ID to re-check.
Response
Balance checked. status is draft when the campaign can start, or still insufficient_balance.
Available options:
draft, insufficient_balance When status is draft.
When status is draft: valid contacts in the campaign.
When status is insufficient_balance: estimated cost of the campaign.
When status is insufficient_balance: how much more balance is needed.
Was this page helpful?