const formData = new FormData();
formData.append('variables_map', JSON.stringify({
"name": "name",
"mobile_number": "mobile_number",
"custom_variable_1": "custom_variable_1",
"custom_variable_2": "custom_variable_2"
}));
formData.append('agent_id', 'your-assistant-id');
formData.append('call_config', JSON.stringify({
"max_concurrent_calls": 5,
"retry_count": 1
}));
formData.append('country_code', '+1');
formData.append('file', yourCsvFile);
const options = {
method: 'POST',
headers: {'X-API-KEY': 'your-api-key-here'},
body: formData
};
fetch('https://prod-api.ringg.ai/ca/api/v0/calling/contact/list', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));