Import VICIdial files
Two imports read VICIdial’s own file formats. Both belong to a VICIdial connection, so connect your VICIdial first.
Do this
Section titled “Do this”- In VICIdial, export the leads as CSV. For do-not-call, use a text file with one number per line.
- Find the id of the VoDialer list that should receive the leads.
GET /api/core/v1/listsreturns the lists with their ids. - Find the connection’s id.
GET /api/integrations/v1/connectorsreturns your connections. - Send the file. These calls need a signed-in admin session, not an API key. Use the
vd_sessionandvd_csrfcookies and send thevd_csrfvalue in thex-vd-csrfheader.
curl -X POST "https://YOUR-HOST/api/integrations/v1/connectors/$CONNECTOR/vicidial/import-leads?list_id=$LIST" \ -H "Content-Type: text/csv" -H "x-vd-csrf: $CSRF" \ --cookie "vd_session=$SESSION; vd_csrf=$CSRF" \ --data-binary @vicidial-export.csv
curl -X POST "https://YOUR-HOST/api/integrations/v1/connectors/$CONNECTOR/vicidial/import-dnc" \ -H "Content-Type: text/plain" -H "x-vd-csrf: $CSRF" \ --cookie "vd_session=$SESSION; vd_csrf=$CSRF" \ --data-binary @dnc.txtLead files
Section titled “Lead files”- Format. CSV. A header row is optional. If any column is named
phone_number, the first row is a header. Otherwise VoDialer reads VICIdial’s standard column order, wherephone_numberis the 12th column. - Used columns.
lead_id(kept as your id for the person),phone_number,phone_code,first_name,last_name,state(made upper case),postal_code,date_of_birth. A date of birth that starts with0000is left empty. Aphone_codeother than 1 is put in front of the number. - Limits. Up to 50 MB and 200,000 rows. Past that you get a 413 or a 422 with the reason.
- Result.
rows,forwarded,rejected,rejected_rowsandcore, which is the list import’s own summary. - Bad rows. A row with no valid phone number is not imported. The first 50 are listed in
rejected_rowswith the row number and a reason:missing phone_numberorinvalid phone number. Row 1 is the first row of data. If no row is valid, the whole call fails with a 422.
The list’s own import then skips repeated numbers and leaves a number already in the list as it was. The leads arrive as new people. They still have to be checked before anyone calls them. See adding a list.
Do-not-call files
Section titled “Do-not-call files”- Format. Plain text, one number per line. Blank lines and lines starting with
#are skipped. A first line likephone_numberis read as a header. After the number on a line, anything separated by,,|,;or a tab is ignored. - Limits. Up to 50 MB and 1,000,000 lines. Over that is a 422: split the file.
- Result.
lines,accepted,rejectedandrejected_rows(the first 50, eachinvalid phone number). Repeated numbers count once. - Where it goes. Into your company’s own do-not-call list, with the source
vicidial_import. See do-not-call lists.