API Reference · Campaigns
Upload contacts (CSV)
Adds the rows of a CSV file to a campaign as contacts to call. Every column comes along, so the AI employee can use it as a {{placeholder}} — a name, an amount due, a date.
/campaigns/{campaign_id}/contactshttps://calling.ubiqproject.com/api/v1/campaigns/{campaign_id}/contacts · Auth: API key (full access)
Request
Path parameters
campaign_idstring (UUID)requiredBody
filefile (multipart/form-data)requiredName,Phone,EMI Amount,Due Date
Rahul Verma,+919876543210,4500,15 Oct
Anita Desai,+919812345678,12000,18 Oct
Imran Khan,+919898012345,7800,20 Octcurl -X POST https://calling.ubiqproject.com/api/v1/campaigns/9b4e6f12-8a3c-4d71-b05e-2f6a8c1d7e93/contacts \
-H "Authorization: Bearer vk_live_YOUR_KEY" \
-F "file=@contacts.csv"The phone column
One column must hold the phone number. Daffy Voice recognises these headers, in any case, with spaces, underscores or hyphens:
phone,phone number(alsophone_number,Phone-Number)mobile,mobile numbercontact number
Rows with no phone number are skipped. Every other column is kept under its header name, for the AI employee to use. Write phone numbers in international format, such as +919876543210 — they aren't checked here, and a bad number simply fails when it's dialled.
Response
The campaign, with its contact counts updated.
{
"id": "9b4e6f12-8a3c-4d71-b05e-2f6a8c1d7e93",
"name": "October EMI reminders",
"agent_id": "3f8c2a1e-6b4d-4c7a-9e21-5d0f7b8a9c34",
"agent_name": "Priya",
"phone_number": "+918046801234",
"created_by": "",
"concurrency": 5,
"contacts_total": 3,
"contacts_done": 0,
"contacts_failed": 0,
"contacts_pending": 3,
"state": "draft",
"created_at": "2026-10-08T09:14:22.512341Z",
"started_at": null,
"config": {
"daily": {
"enabled": true,
"start": "10:00",
"stop": "19:00",
"timezone": "Asia/Kolkata"
},
"retry": {
"enabled": true,
"max_attempts": 3,
"schedule": "custom",
"days": 0,
"hours": 2
}
}
}Response fields
idstring (UUID)namestringagent_idstring (UUID)agent_namestringphone_numberstring | nullcreated_bystring | nullconcurrencyintegercontacts_totalintegercontacts_doneintegercontacts_failedintegercontacts_pendingintegerstatestringdraft (not started), running, paused or done (every contact handled).created_atstring (ISO 8601)started_atstring | nullconfigobjectErrors
Responses
No valid contacts (need a phone/phone_number column)400Could not parse CSV: …400Campaign not found404Validation list422file field in the form.When the new contacts are called
Duplicates are skipped