MailMoo
EndpointsCampaigns

Import lead rows into a campaign

Imports rows the caller already has, such as a spreadsheet's contents, into a campaign, as a CSV upload in the app would: up to 1000 rows per call, each an object of column name to value. Keys are matched to the campaign's columns by name (case-insensitive), then by what a header names, so a profile URL or "Email" header fills that column whatever it is called. Other keys become new columns. People already in the campaign are skipped, people on the blocklist are never enrolled, and someone whose sequence is running in another campaign has it stopped there unless activeElsewhere is skip. Nobody is contacted until the campaign runs. AI columns that fill automatically run on the new rows. Pass dryRun to see the column mapping, how many people are new or already in the workspace, and who is running elsewhere, without importing.

POST/campaigns.importLeads

Authorization

bearerAuth
AuthorizationBearer <token>

Enter your MailMoo API key (format: sk_live_...)

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/campaigns.importLeads" \  -H "Content-Type: application/json" \  -d '{    "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",    "rows": [      {        "property1": "string",        "property2": "string"      }    ]  }'
{  "dryRun": true,  "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",  "campaignName": "string",  "rows": 0,  "columns": [    {      "header": "string",      "column": "string",      "new": true,      "holds": "string"    }  ],  "counts": {    "property1": 0,    "property2": 0  },  "runningElsewhere": {    "people": 0,    "campaigns": [      "string"    ],    "willBe": "stopped"  },  "leadIds": [    "0e7eb83f-f60a-4ca7-95b5-29e3c79907f5"  ]}