Lead imports

Import leads into a campaign

Starts importing a CSV of your own leads into the campaign with the column mapping you confirm, and answers 201 with the import while it runs. A lead costs no credits when the file already holds everything the sequence needs, and one credit when Bavlio fills a needed field in; rows without a name, without what the sequence needs, already in the campaign, opted out or beyond your credits are skipped and counted. Needs a plan.

POST
/campaigns/{id}/imports

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

idstringrequired

Campaign id.

Body

application/json
file_namestringrequired

Name the import is listed under.

Required string length: 1 - 120

csvstringrequired

The file's contents as CSV text, header row first.

Required string length: 1 - 5000000

mappingobjectrequired

Which column holds each lead field, by header; leave out a field no column holds.

custom_fieldsobject

Custom fields to keep, as field name to column header; templates use them as {@name|fallback}.

Response

application/json

Success

idstringrequired

Import id.

file_namestringrequired

The name the import was started with.

statusenum<string>required

running while rows are left, then done, or failed with the reason in failure.

Available options: running, done, failed

rowsintegerrequired

Rows in the file.

processedintegerrequired

Rows read so far.

addedintegerrequired

Leads added to the campaign.

creditsintegerrequired

Credits charged for the added leads.

skippedobjectrequired

Rows left out, counted by reason.

failurestring | nullrequired

Why the import stopped; null unless it failed.

started_atstringrequired

When the import started (ISO 8601).

finished_atstring | nullrequired

When it finished (ISO 8601); null while it runs.