Skip to content

Import VICIdial files

Two imports read VICIdial’s own file formats. Both belong to a VICIdial connection, so connect your VICIdial first.

  1. In VICIdial, export the leads as CSV. For do-not-call, use a text file with one number per line.
  2. Find the id of the VoDialer list that should receive the leads. GET /api/core/v1/lists returns the lists with their ids.
  3. Find the connection’s id. GET /api/integrations/v1/connectors returns your connections.
  4. Send the file. These calls need a signed-in admin session, not an API key. Use the vd_session and vd_csrf cookies and send the vd_csrf value in the x-vd-csrf header.
Terminal window
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.txt
  • 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, where phone_number is 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 with 0000 is left empty. A phone_code other 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_rows and core, 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_rows with the row number and a reason: missing phone_number or invalid 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.

  • Format. Plain text, one number per line. Blank lines and lines starting with # are skipped. A first line like phone_number is 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, rejected and rejected_rows (the first 50, each invalid 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.