Docs/Guides

Add leads to a campaign

Add one lead or up to 1,000 in a single request with POST /leads. Leads are matched by email address, so sending the same lead twice updates it instead of creating a duplicate.

Find the campaign's ID first

List your campaigns and take the id of the one you want:

Shell
curl "https://api.emailchaser.com/r/campaigns?limit=50" \
  -H "Authorization: Bearer $EMAILCHASER_API_KEY"

Or create a new campaign with POST /campaigns. Either way, the campaign needs at least one email account attached before you add leads (POST /campaigns/{id}/sender-emails). Without one, the leads are saved but the call answers 500, and you have to retry after attaching an account.

Send the leads with campaignId at the top of the body

Shell
curl -X POST "https://api.emailchaser.com/r/leads" \
  -H "Authorization: Bearer $EMAILCHASER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "campaignId": 1234,
  "leads": [
    {
      "email": "jane@acme.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "company": "Acme",
      "title": "Head of Sales",
      "website": "https://acme.com",
      "customVariables": { "pain_point": "slow onboarding" }
    }
  ]
}'

campaignId goes at the top level, next to leads, never inside a lead. A campaignId inside a lead object is ignored: the lead is saved but not added to any campaign.

The answer is 201 with the ID of every lead it wrote:

JSON
{
  "message": "leads processed successfully",
  "count": 1,
  "leads": [{ "id": 8589949820, "email": "jane@acme.com" }]
}

count is the number of leads you sent, not the number that were new. To find a lead later, call GET /leads?email=jane@acme.com.

Every lead in a request must be valid

The whole request is checked before anything is saved. If one lead has a missing or invalid email, the request fails with 400 invalid request body and no lead is saved, so clean your list first. A request takes between 1 and 1,000 leads.

Leads that are valid but should not be emailed are still added, quietly marked to skip: blocklisted addresses, leads already in another campaign, and leads who already replied, when those settings are on in the campaign.

Send the full lead when you update one

When a lead with the same email already exists in the workspace, POST /leads updates it with what you send, and fields you leave out are cleared. Send every field you want to keep, not just the one that changed. Matching is on the exact email address.

If the campaign is running or paused, new leads get their emails scheduled straight away. If it is a draft, they start when you launch it.

Custom variables become merge tags in your emails

Anything the named fields don't cover goes in customVariables, and each key becomes a merge tag you can use in email copy:

  • Write a tag with one pair of curly braces: {pain_point}. Double braces are rejected when the sequence is saved.
  • Keys are matched case-insensitively, with spaces read as underscores, so Pain Point and pain_point are the same tag.
  • Send values as text. A value that isn't a string may be left out of the email.
  • Give a tag a fallback for leads without a value: {first_name|there} prints "there" when the first name is empty.

The built-in tags are {first_name}, {last_name}, {middle_name}, {company_name}, {company_website}, {job_title}, {email}, {phone_number}, {linkedin}, {city}, {country}, {industry} and {company_description}.

No-code tools can add leads too

Questions about the API? Email support@emailchaser.com.