leads-to-email

Create a leads-to-email workflow from a CSV: enrich the leads, compose AI emails, and enroll them into a sequence

Changed on

<strong>Content-Type</strong>: <code>multipart/form-data</code> with a <code>file</code> field (the CSV) plus the text fields below. JSON-valued fields (<code>columnMapping</code>, <code>exportColumns</code>, <code>filters</code>) must be sent as stringified JSON.

post/v1/leads-to-email

Request

Request body multipart/form-data

filestring binary required

CSV file with the leads to enrich

fileNamestring
totalRecordsstring required
revealTypestring required
columnMappingstring required
exportColumnsstring
webhookUrlstring
filtersstring
bodyTemplateIdstring
subjectTemplateIdstring
stepsstring
stepGapstring
stepContentstring

Stringified JSON array of caller-provided steps; skips AI compose

Example request

{
  "fileName": "q3-leads.csv",
  "totalRecords": "250",
  "revealType": "email",
  "columnMapping": "{\"First Name\":\"firstName\",\"Company Domain\":\"domain\"}",
  "exportColumns": "[\"firstName\",\"lastName\",\"email\"]",
  "webhookUrl": "https://example.com/webhooks/leads-to-email",
  "steps": "3",
  "stepGap": "3",
  "stepContent": "[{\"stepNumber\":1,\"subject\":\"Hi {{First Name}}\",\"content\":\"<p>Intro…</p>\"}]"
}

Response

Workflow created. Returns the workflow id to track progress.

messagestring

Example response

{
  "message": "Success",
  "payload": {
    "success": true,
    "id": "64f1a2b3c4d5e6f7a8b9c0d1",
    "status": "in_progress"
  }
}

Changes