Leads

Import leads into a workspace, without a campaign.

Use this when the leads are not tied to a landing page yet; link them to campaigns later through an audience.

The response depends on how the import ran. Queued imports (the default, and always the case when any enrichment or campaign is requested) answer with a job_id to poll on /leads/get-status. Immediate imports (sync: true with no enrichment and no campaigns) answer with the result directly and carry a job_id of null.

post/api/external/v1/leads/import-to-workspace

Request body

workspace_idinteger required

The workspace to import into.

fromstring nullable

The service sending the leads.

send_emailboolean nullable

Send the configured email for each imported lead. Defaults to false.

is_generate_ai_analysisboolean nullable

Generate the AI company analysis.

is_generate_person_analysisboolean nullable

Generate the AI person analysis.

is_scrape_person_postsboolean nullable

Scrape the lead's recent LinkedIn posts.

is_scrape_company_postsboolean nullable

Scrape the company page's recent LinkedIn posts.

enrich_databoolean nullable

Enrich the leads from their email/domain.

audience_idinteger nullable

An audience to add the imported leads to.

syncboolean nullable

Import immediately instead of queueing, when no enrichment is requested.

campaign_idsinteger[]

Campaigns to attach the leads to.

generate_ai_variablesboolean nullable

Generate AI variable values.

trigger_audience_summaryboolean nullable

Trigger the audience summary generation after the import.

Example request

{
  "workspace_id": 55,
  "leads": [
    {
      "values": {
        "first_name": "John",
        "email": "john@aws.com",
        "company_name": "Amazon Web Services"
      }
    }
  ],
  "from": "MyCompanyName",
  "audience_id": 3,
  "campaign_ids": [
    1,
    2
  ]
}

Response

OR

Example response

{
  "job_id": "9f1c8b2e-..."
}

Changes

Changed in 2 of the 3 revisions of this API.21

    • added the new required request property leads/items/values

      new-required-request-property

    • the leads/items/ request property type/format changed from string/ to object/

      request-property-type-changed

    • endpoint added

      endpoint-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog