Leads

Finalize staged lead import

Marks a staged import job queued and enqueues worker processing. Set verification_options.allow_catch_all on this call. The run result has counts and credits, and it does not include that choice. The server derives whether to call the verifier again. enrolled counts every address started on this import, including an address already in this campaign. updated is how many of those had their details refreshed, including a later copy of the same email in the same request. created is a new lead row. imported is the same number as enrolled. This call does not check other campaigns.

POST/v1/jobs/{id}/finalize

Authorization

bearerAuth
AuthorizationBearer <token>

Use an account API key in the Authorization header: Authorization: Bearer f_....

In: header

Path Parameters

idstring

Async import job id.

Formatuuid
curl -X POST "https://example.com/v1/jobs/497f6eca-6276-4993-bfeb-53cbbbba6f08/finalize"
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",    "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",    "created_by_api_key_id": "16a8c1ea-aaaf-49f0-9266-c657c48ceff3",    "status": "uploading",    "progress": 0,    "cursor": 0,    "input": {      "operation": "api_lead_import",      "global_lead_ids": [        "string"      ],      "saved_list_id": "66dbf949-b2e8-4ab0-88f6-7819d41ad41e",      "source_campaign_id": "2640cdba-4b3e-4560-9225-0360dc4a4884",      "target_list_id": "e020bfe9-7c71-4403-800b-700dad22bfd2",      "upload_id": "f2ef591b-135b-46fa-a604-3d4fda5bfbfb",      "list_id": "430bbdbc-9d7f-4d06-a273-67ca4ba4ae4b",      "leads": [        {          "email": "user@example.com",          "name": "string",          "first_name": "string",          "last_name": "string",          "company_name": "string",          "website": "string",          "linkedin_url": "string",          "company_linkedin_url": "string",          "phone_number": "string",          "mobile_phone_number": "string",          "custom_lead_data": {},          "tags": [            "string"          ],          "email_verification": {            "status": "ok",            "quality": "string",            "provider": "string",            "verified_at": "2019-08-24T14:15:22Z",            "is_free": true,            "is_role": true          }        }      ],      "total_count": 0,      "source": "string",      "exclusions": {        "list_id": "430bbdbc-9d7f-4d06-a273-67ca4ba4ae4b",        "campaign_id": "78614b6c-fe7c-41e2-8e25-c9b3a3c91904",        "global_lead_ids": [          "string"        ],        "emails": [          "user@example.com"        ]      },      "preview_id": "string",      "expected_count": 0,      "projection": "full",      "query": {},      "column_layout": [        {}      ],      "filename_base": "string"    },    "result": {      "created": 0,      "updated": 0,      "enrolled": 0,      "excluded": 0,      "skipped": 0,      "incomplete": 0,      "failed": 0,      "paused": 0,      "resumed": 0,      "removed": 0,      "added": 0,      "rows_exported": 0,      "imported": 0,      "errors": [        {          "globalLeadId": "string",          "index": 0,          "message": "string"        }      ]    },    "errors": [      {        "globalLeadId": "string",        "index": 0,        "message": "string"      }    ],    "cancel_requested_at": "2019-08-24T14:15:22Z",    "started_at": "2019-08-24T14:15:22Z",    "completed_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}
{  "error": {    "type": "invalid_request_error",    "code": "invalid_flow",    "message": "Flow validation failed"  },  "details": [    {      "path": "nodes[1].data.variants[0].id",      "code": "invalid_variant_id",      "message": "Email variants must have a stable UUID id."    }  ]}
{  "error": {    "type": "authentication_error",    "code": "invalid_api_key",    "message": "A valid Furnace API key is required"  }}
{  "error": {    "type": "invalid_request_error",    "code": "campaign_not_found",    "message": "Campaign not found"  }}
{  "error": {    "type": "rate_limit_error",    "code": "rate_limit_exceeded",    "message": "Rate limit exceeded for this account"  }}
{  "error": {    "type": "api_error",    "code": "internal_error",    "message": "Internal server error"  }}