Export
Export request, CSV columns and download lifetime.
start_export takes campaign_id, entity_type (account or person) and optional review_state (new, reviewed or passed). Omit review_state to export every record. The request returns 202 with an export run. Export uses no credits.
curl --fail-with-body --request POST "$LINKT_API_URL/v2/runs/export" \
--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","review_state":"reviewed"} | walk(if . == "0190a4e2-0000-7000-8000-000000000001" then $CAMPAIGN_ID else . end)')"CSV columns
The format is CSV. Column names start with the record type, for example Company Name or Person Email. A person export also includes columns for its account when one exists. The request has no format parameter.
Download
-
result.download_urlandresult.download_expires_atappear when the export run succeeds and the file has records. -
When the export has no records, the run gets the status
succeededwithresult.completed0.download_urlanddownload_expires_atare then null. Checkdownload_urlfor null before you download. -
The download URL works for 1 hour after the export completes.
-
The export run exists for 24 hours. After that time,
list_runsdoes not show it. -
After the export expires,
get_runalso gives 404. Start another export for a fresh URL. -
Download with a GET request to the signed URL. The URL supplies authorization; send no API key to the storage host.
-
Export cannot be canceled. See Cancel rules.