Upload Campaign CSV (Beta)
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--form 'variables_map={"mobile_number":"Mobile Number","callee_name":"Name"}' \
--form agent_id=00000000-0000-4000-8000-0000000000a1 \
--form 'country_code=+91' \
--form 'campaign_name=Renewal reminders - large upload' \
--form file=@example-file \
--form remove_invalid_rows=true \
--form transliterate_callee_name=false \
--form 'transliterate_fields=["callee_name"]'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"variables_map": "{\"mobile_number\":\"Mobile Number\",\"callee_name\":\"Name\"}",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"country_code": "+91",
"campaign_name": "Renewal reminders - large upload",
"remove_invalid_rows": "true",
"transliterate_callee_name": "false",
"transliterate_fields": "[\"callee_name\"]"
}
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('variables_map', '{"mobile_number":"Mobile Number","callee_name":"Name"}');
form.append('agent_id', '00000000-0000-4000-8000-0000000000a1');
form.append('country_code', '+91');
form.append('campaign_name', 'Renewal reminders - large upload');
form.append('file', '<string>');
form.append('remove_invalid_rows', 'true');
form.append('transliterate_callee_name', 'false');
form.append('transliterate_fields', '["callee_name"]');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "CSV uploaded successfully. Processing in background.",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "verifying",
"total_rows": 5000,
"campaign_name": "Renewal reminders - large upload"
}{
"message": "Invalid CSV file or variable mapping."
}{
"message": "Invalid credentials"
}{
"message": "You can only upload up to 100 contacts."
}Upload large campaign CSV (Beta)
Upload a calling list for validation in the background, and get the bulk_list_id you poll for status and then start calls with.
POST
/
campaign
/
upload-csv
Upload Campaign CSV (Beta)
curl --request POST \
--url https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-KEY: <api-key>' \
--form 'variables_map={"mobile_number":"Mobile Number","callee_name":"Name"}' \
--form agent_id=00000000-0000-4000-8000-0000000000a1 \
--form 'country_code=+91' \
--form 'campaign_name=Renewal reminders - large upload' \
--form file=@example-file \
--form remove_invalid_rows=true \
--form transliterate_callee_name=false \
--form 'transliterate_fields=["callee_name"]'import requests
url = "https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"variables_map": "{\"mobile_number\":\"Mobile Number\",\"callee_name\":\"Name\"}",
"agent_id": "00000000-0000-4000-8000-0000000000a1",
"country_code": "+91",
"campaign_name": "Renewal reminders - large upload",
"remove_invalid_rows": "true",
"transliterate_callee_name": "false",
"transliterate_fields": "[\"callee_name\"]"
}
headers = {"X-API-KEY": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('variables_map', '{"mobile_number":"Mobile Number","callee_name":"Name"}');
form.append('agent_id', '00000000-0000-4000-8000-0000000000a1');
form.append('country_code', '+91');
form.append('campaign_name', 'Renewal reminders - large upload');
form.append('file', '<string>');
form.append('remove_invalid_rows', 'true');
form.append('transliterate_callee_name', 'false');
form.append('transliterate_fields', '["callee_name"]');
const options = {method: 'POST', headers: {'X-API-KEY': '<api-key>'}};
options.body = form;
fetch('https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"message": "CSV uploaded successfully. Processing in background.",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "verifying",
"total_rows": 5000,
"campaign_name": "Renewal reminders - large upload"
}{
"message": "Invalid CSV file or variable mapping."
}{
"message": "Invalid credentials"
}{
"message": "You can only upload up to 100 contacts."
}The calling window, retries and caller numbers are not sent here; they go with Start large campaign calls.
The flow: upload → poll upload status until it is
draft → start calls.
Fields
The CSV follows the same rules as for Upload campaign contact list. A list may have up to 100 rows by default, and up to 5,000 once Company details are saved in the dashboard; a longer list returns402. Contact Ringg for a higher limit.
- Invalid rows never fail this upload: the valid rows load and the invalid ones are left out. With
remove_invalid_rowsoff, the uploader is also emailed the invalid rows. transliterate_fieldsis a JSON array of the agent’s own variable names, not CSV headers, whose values are transliterated into the agent’s language. Each must be mapped invariables_map, andmobile_numberis not allowed.transliterate_callee_name=trueis the same as addingcallee_name.
curl --request POST "https://prod-api.ringg.ai/ca/api/v0/campaign/upload-csv" \
--header "X-API-KEY: $RINGG_API_KEY" \
--form 'agent_id="your-agent-id"' \
--form 'campaign_name="EMI reminders - October"' \
--form 'country_code="+91"' \
--form 'variables_map="{\"mobile_number\":\"mobile_number\",\"callee_name\":\"callee_name\"}"' \
--form 'remove_invalid_rows="true"' \
--form "file=@emi-reminders.csv"
Response
{
"message": "CSV uploaded successfully. Processing in background.",
"bulk_list_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "verifying",
"total_rows": 5000,
"campaign_name": "EMI reminders - October"
}
total_rows counts the rows in the file, not counting fully blank rows. Valid and invalid counts come from upload status once validation finishes.
Store bulk_list_id. It is the campaign’s ID in every later call, in call history and in analytics.
Body
multipart/form-data
(Optional) JSON string array of the agent's own variable names (not CSV headers) whose values are transliterated into the agent's language, for example ["callee_name"]. Each must be mapped in variables_map; mobile_number is refused with 400. The original value stays available as original_<field>. Combined with transliterate_callee_name when both are sent.
Example:
"[\"callee_name\"]"
Response
CSV accepted. The list is checked in the background; poll Get Campaign Upload Status.
Was this page helpful?