Skip to content
Signal
Dashboard

Import

Request, identity and result rules for importing JSON rows or a CSV file.

An import adds records to a campaign and researches them. It uses credits. A request returns 202 with a run of kind import.

JSON rows

start_import takes campaign_id, entity_type (account or person) and 1 to 1,000 objects in rows. Account rows use the account type of the campaign. Each row needs name; a person row can use first_name and last_name instead. A missing name gives 422 missing_name with the zero-based row index in error.details.row.

Rows accept identity fields, optional external_id correlation, and optional account_id for people. Extra fields remain research input. The ingest research can resolve records through the account identity rules and person identity rules.

curl --fail-with-body --request POST "$LINKT_API_URL/v2/runs/import" \
  --header "x-api-key: $LINKT_API_KEY" \
  --header "Content-Type: application/json" \
  --data "$(jq -cn --arg CAMPAIGN_ID "$CAMPAIGN_ID" '{"campaign_id":"0190a4e2-0000-7000-8000-000000000001","entity_type":"account","rows":[{"name":"Bluefin Analytics","website":"https://bluefin-analytics.example"},{"name":"Cedar Ridge Data","website":"https://cedar-ridge-data.example"}]} | walk(if . == "0190a4e2-0000-7000-8000-000000000001" then $CAMPAIGN_ID else . end)')"

API reference: start_import

CSV file

upload_import takes multipart form fields campaign_id, entity_type and file. Save the file as UTF-8.

  • The name ends in .csv, or the file part uses text/csv or application/csv. Otherwise the API gives 422 unsupported_file_type.
  • Include a header and at least one data row. Missing or malformed rows give 422 invalid_csv.
  • Include a name column, such as name or company_name. A person file can use first_name and last_name instead. A missing name column gives 422 missing_name_column.
  • The API defines no row or file-size limit for this operation.

Save this file as accounts.csv before running the request:

name,website
Bluefin Analytics,https://bluefin-analytics.example
curl --fail-with-body --request POST "$LINKT_API_URL/v2/runs/import/upload" \
  --header "x-api-key: $LINKT_API_KEY" \
  --form-string "campaign_id=$CAMPAIGN_ID" \
  --form-string 'entity_type=account' \
  --form 'file=@accounts.csv;type=text/csv'

API reference: upload_import

Results and identity

result.completed counts rows added and result.discarded counts rejected rows. Read GET /runs/{run_id}/rows when result.import_rows.availability is ready. Each row returns its index, external ID, outcome, and public identity ID or rejection reason. See Import outcomes. A matching record can retain its existing ID, so do not assume that every row produces a new ID. See Membership.

On this page